mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-08 14:04:52 +03:00
Replace more admin urls
This commit is contained in:
parent
558649929a
commit
4134104308
|
@ -18,7 +18,7 @@ Run these commands to deploy the project to Heroku:
|
||||||
|
|
||||||
heroku config:set WEB_CONCURRENCY=4
|
heroku config:set WEB_CONCURRENCY=4
|
||||||
# Generating a 32 character-long random string without any of the visually similiar characters "IOl01":
|
# Generating a 32 character-long random string without any of the visually similiar characters "IOl01":
|
||||||
heroku config:set DJANGO_ADMIN_URL="^$(openssl rand -base64 4096 | tr -dc 'A-HJ-NP-Za-km-z2-9' | head -c 32)/"
|
heroku config:set DJANGO_ADMIN_URL="$(openssl rand -base64 4096 | tr -dc 'A-HJ-NP-Za-km-z2-9' | head -c 32)/"
|
||||||
heroku config:set DJANGO_SECRET_KEY="$(openssl rand -base64 64)"
|
heroku config:set DJANGO_SECRET_KEY="$(openssl rand -base64 64)"
|
||||||
heroku config:set DJANGO_SETTINGS_MODULE=config.settings.production
|
heroku config:set DJANGO_SETTINGS_MODULE=config.settings.production
|
||||||
heroku config:set DJANGO_ALLOWED_HOSTS='.herokuapp.com'
|
heroku config:set DJANGO_ALLOWED_HOSTS='.herokuapp.com'
|
||||||
|
|
|
@ -18,7 +18,7 @@ DJANGO_READ_DOT_ENV_FILE READ_DOT_ENV_FILE False
|
||||||
======================================= =========================== ============================================== ======================================================================
|
======================================= =========================== ============================================== ======================================================================
|
||||||
Environment Variable Django Setting Development Default Production Default
|
Environment Variable Django Setting Development Default Production Default
|
||||||
======================================= =========================== ============================================== ======================================================================
|
======================================= =========================== ============================================== ======================================================================
|
||||||
DJANGO_ADMIN_URL n/a r'^admin/' raises error
|
DJANGO_ADMIN_URL n/a 'admin/' raises error
|
||||||
DJANGO_CACHES CACHES (default) locmem redis
|
DJANGO_CACHES CACHES (default) locmem redis
|
||||||
DJANGO_DATABASES DATABASES (default) See code See code
|
DJANGO_DATABASES DATABASES (default) See code See code
|
||||||
DJANGO_DEBUG DEBUG True False
|
DJANGO_DEBUG DEBUG True False
|
||||||
|
|
|
@ -160,7 +160,7 @@ def set_django_admin_url(file_path):
|
||||||
django_admin_url = set_flag(
|
django_admin_url = set_flag(
|
||||||
file_path,
|
file_path,
|
||||||
"!!!SET DJANGO_ADMIN_URL!!!",
|
"!!!SET DJANGO_ADMIN_URL!!!",
|
||||||
formatted="^{}/",
|
formatted="{}/",
|
||||||
length=32,
|
length=32,
|
||||||
using_digits=True,
|
using_digits=True,
|
||||||
using_ascii_letters=True,
|
using_ascii_letters=True,
|
||||||
|
|
|
@ -35,7 +35,7 @@ if settings.DEBUG:
|
||||||
kwargs={"exception": Exception("Bad Request!")},
|
kwargs={"exception": Exception("Bad Request!")},
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
r"403/",
|
"403/",
|
||||||
default_views.permission_denied,
|
default_views.permission_denied,
|
||||||
kwargs={"exception": Exception("Permission Denied")},
|
kwargs={"exception": Exception("Permission Denied")},
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user