Yes it does work, I've tried this with a brand new project in the same virtualenv. Reverese resolution of urls for the AdminSite in django.contrib.admin does work with the latest trunk revision. Here's simplest situation where I'm having a problem:
I have an app called admin in my project which contains some templatetags and a subcalss of AdminSite, you can see the relevant code in this dpaste: http://dpaste.com/68309/ The shell interaction is here: http://dpaste.com/68303/ Note in my installed apps I have both my admin application and the admin app from django.contrib. The same shell interaction would work without a problem if I try it in another project where I use just django.contrib.admin.sites.AdminSite Note that changing the url regex for the admin from empty to r'^admin/' doesn't change anything, it's like that because the django project is just an admin site for a larger project done in Java/Flex. Thanks. On Fri, Jul 17, 2009 at 4:46 PM, Michael<newmani...@gmail.com> wrote: > On Fri, Jul 17, 2009 at 10:28 AM, Vasil Vangelovski <vvangelov...@gmail.com> > wrote: >> >> I'm using svn trunk version of django (rev. #11263). In my project I >> have only one admin site registered in the urlconf. This admin site is >> a subcalss of django.contrib.admin.sites.AdminSite and is instantiated >> with the name 'admin'. I'm trying to use reverse url lookups for the >> admin site as described in the docs: >> http://docs.djangoproject.com/en/dev/ref/contrib/admin/#admin-reverse-urls >> But it doesn't work, I always get a NoReverseMatch exception. >> Can someone confirm that reverse url lookups for admin sites work as >> described in the docs with the latest trunk revision? > > I can confirm they work, but they were only checked in less than 48 hours > ago, so I would first double check and make sure you have the newest version > of the django svn. If you are all updated and it still doesn't work, posting > your admin site, model admin and where the urlreversing is happening, we can > help you. > Also, sometimes you can get a more helpful error message from the shell. The > reverse() function that you can use is available in > django.core.urlresolvers. > Let us know how it is going, > Michael > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---