WebFaction
Community site: login faq
0
1

I work all day in Python (not anything django or web based) so I wanted to try out Mezzanine and found this handy guide here installing mezzanine at webfaction so I figured I'd give it a go. Unfortunately after attempting to get this work for much longer than I'd hoped, I'm still getting errors. It may be my unfamiliarity with Django, however I can't seem to sort the issue out, so I'm hoping someone else can shed some light on this. Here's the traceback.

Environment:

Request Method: GET

Django Version: 1.3.1
Python Version: 2.6.6
Installed Applications:
['mezzanine.boot',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.redirects',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.sitemaps',
 'mezzanine.conf',
 'mezzanine.core',
 'mezzanine.generic',
 'mezzanine.blog',
 'mezzanine.forms',
 'mezzanine.pages',
 'mezzanine.twitter',
 'filebrowser_safe',
 'grappelli_safe',
 'django.contrib.admin',
 'django.contrib.comments']
Installed Middleware:
['django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'mezzanine.core.middleware.DeviceAwareFetchFromCacheMiddleware',
 'mezzanine.core.middleware.AdminLoginInterfaceSelector',
 'django.contrib.messages.middleware.MessageMiddleware']

Traceback:
File "/home/jneumann/lib/python2.6/django/core/handlers/base.py" in get_response
  101.                             request.path_info)
File "/home/jneumann/lib/python2.6/django/core/urlresolvers.py" in resolve
  250.             for pattern in self.url_patterns:
File "/home/jneumann/lib/python2.6/django/core/urlresolvers.py" in _get_url_patterns
  279.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/jneumann/lib/python2.6/django/core/urlresolvers.py" in _get_urlconf_module
  274.             self._urlconf_module = import_module(self.urlconf_name)
File "/home/jneumann/lib/python2.6/django/utils/importlib.py" in import_module
  35.     __import__(name)

Exception Type: ImportError at /
Exception Value: No module named mezzanine_server.urls

Here's my wsgi file

import os
import sys

sys.stdout = sys.stderr
from site import addsitedir
addsitedir('/home/jneumann/envs/mezz/lib/python2.6/site-packages')

from os.path import abspath, dirname, join
from django.conf import settings

os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'                                                                  
sys.path.insert(0, join(settings.PROJECT_ROOT, 'apps'))

from django.core.handlers.wsgi import WSGIHandler
application = WSGIHandler()

I've been able to get it to work on another host using fastcgi, but I switched to webfaction because I was hoping to get some speed improvements and a more developer friendly host, but I can't get it to work. Any help would be much appreciated. Thanks.

asked 25 Feb '12, 14:33

ArrantSquid
26116
accept rate: 50%


Thanks a lot. It was indeed a sys.path issue within my httpd.conf file. I needed to reference the webapps directory not the webapps/mezzanine directory. Ended up sorting it out. Thanks!

permanent link

answered 26 Feb '12, 14:44

ArrantSquid
26116
accept rate: 50%

Please submit a support ticket, we have to see the whole account including the file-system to find the real issue.

The error itself is a sys.path issue. They are common with Django/Apache/Mod_Wsgi for new users of the stack and we are happy to assist in finding the problem and showing you how to fix it in a support ticket.

permanent link

answered 25 Feb '12, 17:11

johns
5.4k312
accept rate: 23%

edited 25 Feb '12, 17:11

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×337
×7

question asked: 25 Feb '12, 14:33

question was seen: 4,813 times

last updated: 26 Feb '12, 14:44

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM