login community faq

i've uploaded a django project from my laptop to the webfaction server. went through the tutorial in getting django running. i get a 500 internal error when i try to access the site.

python2.7 manage.py syncdb works fine

my settings:

http.conf

 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
ServerRoot "/home/yogamomo/webapps/django/apache2"

LoadModule dir_module        modules/mod_dir.so
LoadModule env_module        modules/mod_env.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module       modules/mod_mime.so
LoadModule rewrite_module    modules/mod_rewrite.so
LoadModule setenvif_module   modules/mod_setenvif.so
LoadModule wsgi_module       modules/mod_wsgi.so

LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog /home/yogamomo/logs/user/access_django.log combined
ErrorLog /home/yogamomo/logs/user/error_django.log
KeepAlive Off
Listen 42962
MaxSpareThreads 3
MinSpareThreads 1
ServerLimit 1
SetEnvIf X-Forwarded-SSL on HTTPS=1
ThreadsPerChild 5
WSGIDaemonProcess django processes=2 threads=12 python-path=/home/yogamomo/webapps/django:/home/yogamomo/webapps/django/lib/python2.7
WSGIProcessGroup django
WSGIRestrictEmbedded On
WSGILazyInitialization On
WSGIScriptAlias / /home/yogamomo/webapps/django/yoga_momo.wsgi

yoga_momo.wsgi:

1
2
3
4
5
6
7
import os
import sys

from django.core.handlers.wsgi import WSGIHandler

os.environ['DJANGO_SETTINGS_MODULE'] = 'yoga_momo.settings'
application = WSGIHandler()

error.log:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
[Sun Oct 30 05:06:37 2011] [error] [client 127.0.0.1]     return do_translate(message, 'ugettext')
[Sun Oct 30 05:06:37 2011] [error] [client 127.0.0.1]   File "/home/yogamomo/webapps/django/lib/python2.7/django/utils/translation/trans_real.py", line 276, in do_translate
[Sun Oct 30 05:06:37 2011] [error] [client 127.0.0.1]     _default = translation(settings.LANGUAGE_CODE)
[Sun Oct 30 05:06:37 2011] [error] [client 127.0.0.1]   File "/home/yogamomo/webapps/django/lib/python2.7/django/utils/translation/trans_real.py", line 185, in translation
[Sun Oct 30 05:06:37 2011] [error] [client 127.0.0.1]     default_translation = _fetch(settings.LANGUAGE_CODE)
[Sun Oct 30 05:06:37 2011] [error] [client 127.0.0.1]   File "/home/yogamomo/webapps/django/lib/python2.7/django/utils/translation/trans_real.py", line 162, in _fetch
[Sun Oct 30 05:06:37 2011] [error] [client 127.0.0.1]     app = import_module(appname)
[Sun Oct 30 05:06:37 2011] [error] [client 127.0.0.1]   File "/home/yogamomo/webapps/django/lib/python2.7/django/utils/importlib.py", line 35, in import_module
[Sun Oct 30 05:06:37 2011] [error] [client 127.0.0.1]     __import__(name)
[Sun Oct 30 05:06:37 2011] [error] [client 127.0.0.1] TemplateSyntaxError: Caught ImportError while rendering: No module named send-mail

asked Oct 30 '11 at 05:15

momo's gravatar image

momo
1

edited Oct 30 '11 at 09:29

seanf's gravatar image

seanf ♦♦
56291220


Hi,

The error seems to be:

1
TemplateSyntaxError: Caught ImportError while rendering: No module named send-mail

You can get rid of this by adding the directory containing that module to your sys.path as shown here.

answered Oct 30 '11 at 05:28

neeravk's gravatar image

neeravk ♦♦
14061311

edited Oct 30 '11 at 05:29

thanks that solved it! i was under the impression that if the module wasn't in the path syncdb would throw an exception?

answered Oct 30 '11 at 06:45

momo's gravatar image

momo
1

The syncdb command looks at the INSTALLED_APPS tuple and creates their database models. If your module is being used by such an application but it doesn't define any database models then syncdb will probably pass it.

(Oct 30 '11 at 07:08) iliasr ♦♦ iliasr's gravatar image
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:

×643
×72
×15
×5

Asked: Oct 30 '11 at 05:15

Seen: 866 times

Last updated: Oct 30 '11 at 09:29

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