I'm new in django and i try to do what tutorial says about activating
the admin site but i take the following error:

IndentationError at /admin/
('unexpected indent', ('/home/sotathan/mysite/../mysite/urls.py', 4,
1, ' from django.contrib import admin\n'))
Request Method: GET
Request URL:    http://127.0.0.1:8000/admin/
Exception Type: IndentationError
Exception Value:
('unexpected indent', ('/home/sotathan/mysite/../mysite/urls.py', 4,
1, ' from django.contrib import admin\n'))
Exception Location:     /usr/local/lib/python2.6/dist-packages/django/
utils/importlib.py in import_module, line 35
Python Executable:      /usr/bin/python
Python Version: 2.6.2


my code:

settings.py:
...
INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
)


urls.py:

from django.conf.urls.defaults import *

 from django.contrib import admin
 admin.autodiscover()

urlpatterns = patterns('',
     (r'^admin/', include(admin.site.urls)),
)


Any help?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to