So my problem is i can not custom default url patterns and expand it with my own urls:
in malex_admin.admin
class MalexAdminSite(admin.AdminSite):
site_header = "Malex"
def get_urls(self):
urls_patterns = super().get_urls()
new_patterns = [
path("orders", include("orders.urls"))
]
return urls_patterns + new_patterns
In orders.urls
from django.urls import path
from . import views
urlpatterns = [
path("", views.orders)
]
In settings
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'malex_admin.apps.MalexAdminConfig',
'orders.apps.OrdersConfig'
]
Everything is fine with installation of my own admin site, but i really don’t understand why after trying to get page under url path “admin/orders” it responds with error 404 and what is intersting, that in list of urls there is no modification. You can see it on screenshot:
Please help me, because i didn’t find any information in the Internet. Thanks