Django — Registering Multiple Admin Sites


To register multiple admin sites with Django, import AdminSite from django.contrib.admin.sites

Instantiate the class and you have your new admin site that you can import anywhere and register the urls for.

Note that the register function is directly in the AdminSite, it is not AdminSite().site.register but AdminSite().register

from django.contrib.admin.sites import AdminSite

my_new_admin = AdminSite(name='My New Admin')

my_new_admin.index_template = "myadmin/index.html"

from myproject.admin import my_new_admin

(r'^my_new_admin/(*.)', my_new_admin.root)

from my_admin import my_new_admin

14 thoughts on “Django — Registering Multiple Admin Sites

  1. I would like to thank you for the efforts you’ve put in writing this blog. I am hoping to see the same high-grade blog posts from you later on as well. In truth, your creative writing abilities has inspired me to get my own, personal blog now 😉

  2. Hello my loved one! I want to say that this article is amazing, nice written and include approximately all significant infos. I’d like to see extra posts like this .

  3. I rarely comment, however I browsed some responses on Django. I actually do have 2 questions for you if you do not mind. Is it simply me or does it look like a few of these remarks look like they are coming from brain dead individuals? 😛 And, if you are writing on additional online social sites, I would like to follow everything new you have to post. Would you list of all of your public pages like your twitter feed, Facebook page or linkedin profile?

  4. And single colored dress is recommended for plus size women, because it can make one look taller. It’s extremely important that you look around to locate a dress like this. These dresses are available in many different designs and cuts that can make accentuate your figure and make you the most eye-catching lady at your social gathering.

  5. If you have accounts in any, or all of these IM clients, you’ll want to have Meebo IM on your Android phone. Targets of the Anti-excess Website Optimization Update. One reason why the numbers have grown so quickly is because Google doesn’t have an approval system like Apple does with their app store.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s