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 7557697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:12:00+00:00 2026-05-30T12:12:00+00:00

I have two apps in my Django project: a public-facing app, and a management

  • 0

I have two apps in my Django project: a public-facing app, and a management app (not django’s built-in admin site). I want one domain name to point to the public site and another to point to the management site. (i.e. so the /index.html route, for example, would point to a view in a different app depending on the domain name.) Each app has its own URLconf and they are both being included into the main URLconf. What’s the best way to do this?

  • 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-30T12:12:02+00:00Added an answer on May 30, 2026 at 12:12 pm

    There are many ways, here are some which can work for you depending on your specific constraints.

    1. Light hack: blacklist or whitelist urls in the HTTP server configuration for each domain

    2. Monkey patch the url router to check for the request[‘META’][‘HTTP_HOST’], because it’s definitively not available at the time urls are being configured

    3. 2 Django instances: make 2 settings files:

      • Make one urls script per site,

      • Make one settings per site as such

      • Run one Django instance per domain

    Example settings files:

    management_settings.py

    from settings import *
    ROOT_URLCONF='management_urls.py'
    

    public_settings.py

    from settings import *
    ROOT_URLCONF='public_urls.py'
    

    And run one Django server on each. Don’t forget to use the –settings switch for management commands as such:

    # run public
    ./manage.py runserver --settings public_settings
    # run management
    ./manage.py runserver --settings management_settings
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Django project which has two apps (one created as debug test).
I have a django project which has two apps, one is AppA and AppB
Possible stupid question: let's say I have two apps contained within one project. Can
I have two apps - One is the public face of the application, and
Here is the situation. I have a django project with two installed apps. Both
I have two servers: one running a django app and one running both a
I have successfully created my first django project. I have two apps in my
We have two Apps live on the Appstore. One for free, and one full
I have two apps, one runs in namespace com.gtosoft.voyager and the other is com.gtosoft.dash.
My second not-so-adept question of the day: I have a django project with four

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.