On Mon, Aug 17, 2009 at 8:39 PM, ringemup<[email protected]> wrote:
>
> I'm sure I'm doing something wrong, but I can't figure out what.  The
> list, add, and change links on the admin index all point to the
> correct URLs, but all URLs under /admin are returning the admin index
> page rather than the appropriate views.
>
> Using the following urls.py under Django 1.1:
>
> from django.conf.urls.defaults import *
>
> # Uncomment the next two lines to enable the admin:
> from django.contrib import admin
> admin.autodiscover()
>
> urlpatterns = patterns('',
>
>    # Uncomment the next line to enable the admin:
>    (r'^admin/(.*)', include(admin.site.urls)),
> )
>
> Interestingly, using admin.site.root instead of include
> (admin.site.urls) works, but my understanding is that the older use is
> now deprecated, so I'd like to get this working.
>
> Any suggestions on what I've screwed up, or how to debug this?
>

Thast's because you are mixing strategies for specifying the admin entry
on the URL map. Compare the relevant highlighted lines in the urlpatterns
variable assignment in the following documentation code excerpts:

http://docs.djangoproject.com/en/1.0/intro/tutorial02/#activate-the-admin-site
(Django < 1.1)
http://docs.djangoproject.com/en/dev/intro/tutorial02/#activate-the-admin-site
(Django 1.1)


-- 
Ramiro Morales
http://rmorales.net

PyCon 2009 Argentina - Vie 4 y Sab 5 Setiembre
Buenos Aires, Argentina
http://ar.pycon.org/2009/about/

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

Reply via email to