On Apr 9, 1:02 pm, Xpineapple <kenned...@gmail.com> wrote:
> Thanks for the reply.  Again, my goal is just to access admin site
> successfully.
>
> Okay, referencing:http://www.djangobook.com/en/1.0/chapter06/
>
> My urls.py:
>
> from django.conf.urls.defaults import *
> # Uncomment the next two lines to enable the admin:
> ###from django.contrib import admin
> ###admin.autodiscover()
>
> from mysite.views import hello
> from mysite.views import my_homepage_view
> from mysite.views import current_datetime, hours_ahead
>
> urlpatterns = patterns('',
>     ('^hello/$', hello),
>     ('^$', my_homepage_view),
>     ('^time/$', current_datetime),
>     (r'^time/plus/(\d{1,2})/$', hours_ahead),
>     #(r'^admin/', include(admin.site.urls)),
>     (r'^admin/', include('django.contrib.admin.urls')),
> )
>

No, as Alex says, consult the actual documentation for 1.0. The first
edition of the Django book refers to pre-1.0 code.
Here:
http://docs.djangoproject.com/en/1.0/ref/contrib/admin/#adminsite-objects
--
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to