Electronics & Programming


Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Multiple Admins, improper object linking [RSS Feed]

#1 Jan. 25, 2011 11:20:15

Lakshman P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Multiple Admins, improper object linking


I have a lot of admin customization. Queryset overriding, custom urls per
object, per admin site, save methods overriding and calling some external
services, template changes, you name it.

So, In my application, I like to have another instance of admin I call
"bare-tables" in which I auto register all existing models in a project
level admin.py using the following:

from django.db.models import get_models

from django.contrib.admin import AdminSite

from reversion.admin import VersionAdmin

class BareTables(AdminSite):


new_admin = BareTables(name='bare_tables')

for el in get_models():


And I link up both the admins in the URL using the following:

urlpatterns = patterns('',

url(r'^admin_tools/', include('admin_tools.urls')),

(r'^admin/doc/', include('django.contrib.admindocs.urls')),

(r'^admin/', include(admin.site.urls)),

(r'^bare-tables/', include(new_admin.urls)),

I was all good and happy. Except, I included the admin tools, to customize
only the first admin with all the Jazz, dashboard and menus, the way I like
it. Now, when I go to the admin, or to the plain admin that I called
"bare-tables", the objects are linked to the main admin. :( If I manually
change the "admin" in the url above to "bare-tables", it works.

I think the problem is that admin_tools templates don't use the prefix to
reverse the urls, or that I need to pass it the prefix somehow and I am not.
What simple change that I can make to make it work properly. I am ok, even
if the plain admin retains the old skin, Is there a way I can tell
admin-tools, not to get involved if the base url is something.


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
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.


  • Root
  • » Django
  • » Multiple Admins, improper object linking [RSS Feed]

Board footer

Moderator control

Enjoy the 24th of May

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support