login community 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.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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 Feb 25 '12 at 14:33

ArrantSquid's gravatar image

ArrantSquid
266


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!

answered Feb 26 '12 at 14:44

ArrantSquid's gravatar image

ArrantSquid
266

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.

answered Feb 25 '12 at 17:11

johns's gravatar image

johns ♦♦
340427

edited Feb 25 '12 at 17:11

Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
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

Tags:

×642
×228
×5

Asked: Feb 25 '12 at 14:33

Seen: 1,177 times

Last updated: Feb 26 '12 at 14:44

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited