Skip to content

Commit

Permalink
Allows developers to make admin panel url complex
Browse files Browse the repository at this point in the history
  • Loading branch information
ShotaTanemura committed Jul 21, 2024
1 parent 313a808 commit 97efc14
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .devcontainer/.env-sample
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ DEBUG=False
OAUTH_CALLBACK_42API=oauth_callback_42api
CLIENT_ID_42API=client_id_42api
CLIENT_SECRET_42API=client_secret_42api
ADMIN_PANEL_URL=admin_panel_url
DJANGO_SUPERUSER_USERNAME=django_superuser_username
DJANGO_SUPERUSER_PASSWORD=django_superuser_password
DJANGO_SUPERUSER_EMAIL=django_superuser_email
Expand Down
2 changes: 2 additions & 0 deletions pong/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,5 @@
CSRF_TRUSTED_ORIGINS = [
NGINX_ORIGIN,
]

ADMIN_PANEL_URL = os.getenv("ADMIN_PANEL_URL")
3 changes: 2 additions & 1 deletion pong/config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@

from django.contrib import admin
from django.urls import path, re_path, include
from django.conf import settings
from pong.views.index import index

urlpatterns = [
path("admin/", admin.site.urls),
path(settings.ADMIN_PANEL_URL, admin.site.urls),
path("pong/", include("pong.urls")),
re_path(r"^.*$", index, name="index"),
]

0 comments on commit 97efc14

Please sign in to comment.