WebFaction
Community site: login faq

Hello,i am trying to set up my first django project and i am having an internal server error when i try to access the site.

I tried to fix the error by myself,but it didnt work,so i need some help.

My error log

[Wed May 04 14:39:36 2011] [error] [client 127.0.0.1] mod_wsgi (pid=30203): Exception occurred processing WSGI script '/home/luterien/webapps/django_lessons/djangol.wsgi'. [Wed May 04 14:39:36 2011] [error] [client 127.0.0.1] Traceback (most recent call last): [Wed May 04 14:39:36 2011] [error] [client
127.0.0.1]   File "/home/luterien/webapps/django_lessons/lib/python2.7/django/core/handlers/wsgi.py", line 273, in __call__ [Wed May 04 14:39:36 2011] [error] [client
127.0.0.1]     response = self.get_response(request) [Wed May 04 14:39:36 2011] [error] [client
127.0.0.1]   File "/home/luterien/webapps/django_lessons/lib/python2.7/django/core/handlers/base.py", line 169, in get_response [Wed May 04 14:39:36 2011] [error] [client
127.0.0.1]     response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) [Wed May 04 14:39:36 2011] [error] [client
127.0.0.1]   File "/home/luterien/webapps/django_lessons/lib/python2.7/django/core/handlers/base.py", line 214, in handle_uncaught_exception [Wed May 04 14:39:36 2011] [error] [client 127.0.0.1]     if resolver.urlconf_module is None: [Wed May 04 14:39:36 2011] [error] [client
127.0.0.1]   File "/home/luterien/webapps/django_lessons/lib/python2.7/django/core/urlresolvers.py", line 274, in _get_urlconf_module [Wed May 04 14:39:36 2011] [error] [client
127.0.0.1]     self._urlconf_module = import_module(self.urlconf_name) [Wed May 04 14:39:36 2011] [error] [client
127.0.0.1]   File "/home/luterien/webapps/django_lessons/lib/python2.7/django/utils/importlib.py", line 35, in import_module [Wed May 04 14:39:36 2011] [error] [client
127.0.0.1]     __import__(name) [Wed May 04 14:39:36 2011] [error] [client
127.0.0.1]   File "/home/luterien/webapps/django_lessons/djangol/urls.py", line 5, in <module> [Wed May 04 14:39:36 2011] [error] [client
127.0.0.1]     admin.autodiscover() [Wed May 04 14:39:36 2011] [error] [client 127.0.0.1]   File "/home/luterien/webapps/django_lessons/lib/python2.7/django/contrib/admin/__init__.py", line 22, in autodiscover [Wed May 04 14:39:36 2011] [error] [client
127.0.0.1]     mod = import_module(app) [Wed May 04 14:39:36 2011] [error] [client
127.0.0.1]   File "/home/luterien/webapps/django_lessons/lib/python2.7/django/utils/importlib.py", line 35, in import_module [Wed May 04 14:39:36 2011] [error] [client
127.0.0.1]     __import__(name) [Wed May 04 14:39:36 2011] [error] [client
127.0.0.1] ImportError: No module named lessons

asked 04 May '11, 14:41

Luterien
312
accept rate: 0%


This is caused by the name of your application being wrong in the INSTALLED_APPS section of settings.py. The apps should be listed like this:

INSTALLED_APPS = (    
    'project_name.app_name',    
)

Replace project_name with the name of your Django project and app_name with the name of the application in your project.

Be sure to restart your apache after making the change http://docs.webfaction.com/software/django/config.html?highlight=restart%20django#restarting-a-django-application

permanent link

answered 04 May '11, 15:24

timg ♦♦
1.3k4
accept rate: 30%

oh thanks! i completely forgot about that

(04 May '11, 15:34) Luterien
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:

×904
×108
×97
×19
×8

question asked: 04 May '11, 14:41

question was seen: 2,618 times

last updated: 04 May '11, 15:34

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