mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-16 22:20:24 +00:00
19 lines
483 B
Python
19 lines
483 B
Python
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
from django.urls import re_path
|
|
|
|
from djadmin2.site import djadmin2_site
|
|
|
|
from djadmin2.views import LoginView
|
|
|
|
|
|
class CustomLoginView(LoginView):
|
|
default_template_name = "custom_login_template.html"
|
|
|
|
|
|
djadmin2_site.login_view = CustomLoginView
|
|
djadmin2_site.autodiscover()
|
|
|
|
urlpatterns = [
|
|
re_path(r'^admin2/', djadmin2_site.urls),
|
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|