mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-03 05:04:25 +03:00
URL to django.contrib.admin is now configurable
This commit is contained in:
parent
bf98d7340b
commit
58ec2fe113
|
@ -16,6 +16,7 @@ You can either push the 'deploy' button in your generated README.rst or run thes
|
|||
heroku addons:create heroku-redis:hobby-dev
|
||||
heroku addons:create mailgun
|
||||
|
||||
heroku config:set DJANGO_SECRET_KEY=`openssl rand -base64 32`
|
||||
heroku config:set DJANGO_SECRET_KEY=`openssl rand -base64 32`
|
||||
heroku config:set DJANGO_SETTINGS_MODULE='config.settings.production'
|
||||
heroku config:set DJANGO_ALLOWED_HOSTS='.herokuapp.com'
|
||||
|
|
|
@ -9,6 +9,7 @@ For configuration purposes, the following table maps environment variables to th
|
|||
======================================= =========================== ============================================== ======================================================================
|
||||
Environment Variable Django Setting Development Default Production Default
|
||||
======================================= =========================== ============================================== ======================================================================
|
||||
DJANGO_ADMIN_URL n/a r'^admin/' raises error
|
||||
DJANGO_CACHES CACHES (default) locmem redis
|
||||
DJANGO_DATABASES DATABASES (default) See code See code
|
||||
DJANGO_DEBUG DEBUG True False
|
||||
|
|
|
@ -277,4 +277,8 @@ INSTALLED_APPS += ('kombu.transport.django',)
|
|||
BROKER_URL = env("CELERY_BROKER_URL", default='django://')
|
||||
########## END CELERY
|
||||
{% endif %}
|
||||
|
||||
# Location of root django.contrib.admin URL, use {% url 'admin:index' %}
|
||||
ADMIN_URL = r'^admin/'
|
||||
|
||||
# Your common stuff: Below this line define 3rd party library settings
|
||||
|
|
|
@ -217,4 +217,8 @@ RAVEN_CONFIG = {
|
|||
'DSN': SENTRY_DSN
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
# Custom Admin URL, use {% url 'admin:index' %}
|
||||
ADMIN_URL = env('ADMIN_URL')
|
||||
|
||||
# Your production stuff: Below this line define 3rd party library settings
|
||||
|
|
|
@ -12,8 +12,8 @@ urlpatterns = [
|
|||
url(r'^$', TemplateView.as_view(template_name='pages/home.html'), name="home"),
|
||||
url(r'^about/$', TemplateView.as_view(template_name='pages/about.html'), name="about"),
|
||||
|
||||
# Django Admin
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
# Django Admin, use {% url 'admin:index' %}
|
||||
url(settings.ADMIN_URL, include(admin.site.urls)),
|
||||
|
||||
# User management
|
||||
url(r'^users/', include("{{ cookiecutter.repo_name }}.users.urls", namespace="users")),
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
POSTGRES_PASSWORD=mysecretpass
|
||||
POSTGRES_USER=postgresuser
|
||||
|
||||
ADMIN_URL=
|
||||
DJANGO_SETTINGS_MODULE=config.settings.production
|
||||
DJANGO_SECRET_KEY=
|
||||
DJANGO_ALLOWED_HOSTS=
|
||||
|
@ -10,4 +11,4 @@ DJANGO_AWS_STORAGE_BUCKET_NAME=
|
|||
DJANGO_MAILGUN_API_KEY=
|
||||
DJANGO_MAILGUN_SERVER_NAME=
|
||||
DJANGO_SERVER_EMAIL=
|
||||
DJANGO_SECURE_SSL_REDIRECT=False
|
||||
DJANGO_SECURE_SSL_REDIRECT=False
|
||||
|
|
Loading…
Reference in New Issue
Block a user