Reputation: 1
I would like to run Django from location https://www.example.com/abc/ so that I have the admin interface at https://www.example.com/abc/admin/. And web app login interface at https://www.example.com/abc/
Where can I set the base URL of Django to https://www.example.com/abc/?
Django Version=3.2.5
Tried path('abc/', views.getLogin, name="Login Page"), path('abc/login', views.handeLogin, name="handleLogin"),
But these are not working, while b below admin path is working fine.
path('abc/admin/', admin.site.urls),
Upvotes: 0
Views: 1827
Reputation: 44
This seems to be a duplicate to How to set base URL in Django
Overall is django a highly used and well documented project. Most common questions are answered multiple times.
EDIT: If you want to change f.e. the whole admin path use urlpatterns in the urls.py of your base project.
from django.contrib import admin
urlpatterns = [
path('abc/admin/', admin.site.urls),
]
Upvotes: 1