WebFaction
Community site: login 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

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:

import os
import sys

from django.core.handlers.wsgi import WSGIHandler

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

error.log:

[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 30 Oct '11, 05:15

momo
111
accept rate: 0%

edited 30 Oct '11, 09:29

seanf
12.2k41836


Hi,

The error seems to be:

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.

permanent link

answered 30 Oct '11, 05:28

neeravk
1.5k3412
accept rate: 41%

edited 30 Oct '11, 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?

permanent link

answered 30 Oct '11, 06:45

momo
111
accept rate: 0%

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.

(30 Oct '11, 07:08) iliasr ♦♦
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
×108
×19
×8

question asked: 30 Oct '11, 05:15

question was seen: 5,199 times

last updated: 30 Oct '11, 09:29

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