Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 852587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:37:17+00:00 2026-05-15T07:37:17+00:00

I am using django 1.2 to create a multi site shop. I need multiple

  • 0

I am using django 1.2 to create a multi site shop. I need multiple admin logins for each shop instance, e.g.

site.com/au/admin
site.com/uk/admin
and so on.

I have a middleware class and a dbrouter that handles database connections based on the URL. This works fine.

I am trying to add some customisation per admin system based on what is available for that particular shop. So:

in admin.py :
if country == ‘au’:
admin.site.register(Orders)
admin.site.register(Payment)

if country == ‘uk’:
admin.site.register(Store_locator)
etc.

Hers’s the problem: If I log into the AU version of the site the admin system displays the correct elements for AU. If I then log into UK, it still shows the AU version of the admin system, so the above code seems to only get used on the first load. if I kill the django server and restart it, then go into the different shop admin page, it will have reconfigured for that shop.

How I can get it to pick up a change in country each time the admin system loads? Why is this problem happening in the first place?

Any help would be greatly appreciated.

Thanks,
imanc

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T07:37:18+00:00Added an answer on May 15, 2026 at 7:37 am

    I’d bet that Django doesn’t read the admin config on each request, but on each time the server is restarted – that’s why it ‘sticks’ to whichever you accessed first.

    Why not do something with Django.contrib.auth’s permissions to limit what a particular admin user can see in the admin, and register all the models in admin.py as standard?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Django to create a stock photo site, I have an ImageField in
I created a database for a site i'm doing using Django as the admin
I'm using django to create a application download site. I try to write a
I am tasked to create a web site using Django. It will be a
I need to create and save image thumbnails in database. I am using django
I'm using Django to create a site that provides a separate web UI for
I am using Django's generic views to create a blog site. The templates I
I would like to create a Site specific Sitemap using Django Sitemaps. My idea
I have seen various questions on multi-site and multi-host Django, including subdomains and specific
After some months of using Django, I feel the need to create the first

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.