The problem was that I had a custom instance of admin, as well as my normal instance of admin that I created using admin.site.register() and admin.autodiscover().
The problem is that when you have two versions of admin, you need to differentiate them using the AdminSite "name" attribute. Otherwise Django seems to get confused and create bad links (could be a bug, but I'm sure it's the way you should do it anyway). Here is the documentation: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#adminsite-objects The result was something like this: #Register all the admin objects that live in the main admin main_admin = admin.AdminSite(name="main") #Register models and ModelAdmin definitions main_admin.register(Accession, AccessionAdmin) main_admin.register(Donor, DonorAdmin) main_admin.register(Project, ProjectAdmin) #Register all the admin objects that live under accession accession_admin = admin.AdminSite(name="tfc") accession_admin.register(Accession, AccessionAdmin) accession_admin.register(Donor, DonorAdmin) Then in urls.py: url(r'^tfc/admin/', include(accession_admin.urls)), url(r'^admin/', include(main_admin.urls)), On Jun 8, 1:21 pm, bfrederi <brfrederi...@gmail.com> wrote: > I am having some problems with the admin foreign key fields. The "+" > link leads to incorrect urls for adding new foreign keys. This happens > in nearly all instances in admin, such as the group foreign key in the > Django User model. Here is what the + link provides: > "http://example1.com/admin/auth/user/5/Noneauth/group/add/" > > I have another Django project on the same server, using the same > version of Django, and the links look fine: > "http://example2.com/admin/auth/group/add/" > > Does anyone recognize this issue, and what I may have done to allow > these links to be generated poorly? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.