-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not show Django's builtin admin login page outside of development
- Loading branch information
1 parent
85c4c0d
commit 425b510
Showing
4 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from django.contrib.admin import AdminSite as DefaultAdminSite | ||
from django.conf import settings | ||
|
||
|
||
class AdminSite(DefaultAdminSite): | ||
if settings.DJANGO_ENV != settings.DEVELOPMENT: | ||
login_template = 'admin_login.html' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from django.contrib.admin.apps import AdminConfig as DefaultAdminConfig | ||
|
||
|
||
class AdminConfig(DefaultAdminConfig): | ||
default_site = 'csm_web.admin.AdminSite' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta http-equiv="refresh" content="0; url=/"> | ||
</head> | ||
</html> |