Not sure how I did this and have searched everywhere for a solution, but can not find one. I have managed to either install incorrectly or break my installation of a default Django 1.3.1 admin project so that the add widget is rendered with a broken link.
The above link should be rendered as http://mynode.com/admin/auth/group/add/
, but is being rendered as http://mynode.com/$auth/group/add/
instead. This is consistent on every page were the add widget is displayed. Any ideas what I have broken or what is missing from my settings?
Ok, very interesting... found it and feeling foolish now.
I put some prints throughout the Django admin and core code and discovered that my problem was coming from within the call...
found inside django/contrib/admin/widgets.py.
reverse()
in an effort to craft the URL for my projects link, iterates through theresolver.namespace_dict
looking for something that will match the namespace or current app, in this case admin. A quick check in myurl.py
file found the following entry...I guess I had added this entry in an attempt to do something (which I've completely forgotten... Dooh!) and this caused
reverse()
to render my widgets link incorrectly. :(Update I remember now. I was trying to add a root site handler.
mysite.com/
This works but the trick is to make sure this entry is afterin your urlpatterns.