Re: admin url error

2009-10-12 Thread A_Swtos

Thank you DR for your useful help :)

On Oct 12, 2:40 pm, Daniel Roseman  wrote:
> On Oct 12, 11:28 am, A_Swtos  wrote:
>
>
>
>
>
> > 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?
>
> Like the message says, you have indentation problems in urls.py. From
> the code you've pasted above, it looks like you've got extra spaces at
> the start of these lines:
>  from django.contrib import admin
>  admin.autodiscover()
> --
> DR.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: admin url error

2009-10-12 Thread Daniel Roseman

On Oct 12, 11:28 am, A_Swtos  wrote:
> 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?

Like the message says, you have indentation problems in urls.py. From
the code you've pasted above, it looks like you've got extra spaces at
the start of these lines:
 from django.contrib import admin
 admin.autodiscover()
--
DR.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



admin url error

2009-10-12 Thread A_Swtos

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
-~--~~~~--~~--~--~---