Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django admin on different domain

Tags:

django

dns

How can I make the Django backend (and some views) accessible in a different domain? Is it done via the Sites Framework?

like image 523
Donovan Avatar asked Nov 17 '25 05:11

Donovan


1 Answers

Create a copy of settings.py and run the admin server with that settings file. Also, create a copy of urls.py (let's call it admin_urls.py). Then, in the copied settings file change this line:

ROOT_URLCONF = 'admin_urls.py'

To prevent access to admin on the main site, remove admin app from INSTALLED_APPS in settings.py and all references to admin views in urls.py.

like image 200
Visa Kopu Avatar answered Nov 20 '25 04:11

Visa Kopu