I've just installed the latest version of Django (1.4.1) on Ubuntu 12.04. The new docs and everything else I've been able to find seems to think the directory structure should be as follows:
mysite/
manage.py
mysite/
__init__.py
settings.py
urls.py
wsgi.py
However, running $ django-admin.py startproject mysite
resulted in the following directory structure:
mysite/
__init.py__
manage.py
settings.py
mysite/
__init__.py
settings.py
urls.py
wsgi.py
templates/
urls.py
There seems to be little difference between mysite/urls.py
and mysite/mysite/urls.py
, the difference being in line 1 of the files, where the mysite/urls.py
import statement begins from django.conf.urls.defaults
instead of from django.conf.urls
. There is similarly little difference between the two settings.py
files.
My question is:
EDIT: Oberon's answer solved the problem for me (thanks!), but I'd still be interested in knowing what the problem was in the first place, if anybody has any ideas.
I've met the same problem with it, and what I do is to remove django and reinstall it And it works like the first one you've shown.