mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-03 13:14:28 +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 heroku-redis:hobby-dev
|
||||||
heroku addons:create mailgun
|
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_SECRET_KEY=`openssl rand -base64 32`
|
||||||
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'
|
||||||
|
|
|
@ -9,6 +9,7 @@ For configuration purposes, the following table maps environment variables to th
|
||||||
======================================= =========================== ============================================== ======================================================================
|
======================================= =========================== ============================================== ======================================================================
|
||||||
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_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
|
||||||
|
|
|
@ -277,4 +277,8 @@ INSTALLED_APPS += ('kombu.transport.django',)
|
||||||
BROKER_URL = env("CELERY_BROKER_URL", default='django://')
|
BROKER_URL = env("CELERY_BROKER_URL", default='django://')
|
||||||
########## END CELERY
|
########## END CELERY
|
||||||
{% endif %}
|
{% 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
|
# Your common stuff: Below this line define 3rd party library settings
|
||||||
|
|
|
@ -217,4 +217,8 @@ RAVEN_CONFIG = {
|
||||||
'DSN': SENTRY_DSN
|
'DSN': SENTRY_DSN
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
# Custom Admin URL, use {% url 'admin:index' %}
|
||||||
|
ADMIN_URL = env('ADMIN_URL')
|
||||||
|
|
||||||
# Your production stuff: Below this line define 3rd party library settings
|
# 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'^$', TemplateView.as_view(template_name='pages/home.html'), name="home"),
|
||||||
url(r'^about/$', TemplateView.as_view(template_name='pages/about.html'), name="about"),
|
url(r'^about/$', TemplateView.as_view(template_name='pages/about.html'), name="about"),
|
||||||
|
|
||||||
# Django Admin
|
# Django Admin, use {% url 'admin:index' %}
|
||||||
url(r'^admin/', include(admin.site.urls)),
|
url(settings.ADMIN_URL, include(admin.site.urls)),
|
||||||
|
|
||||||
# User management
|
# User management
|
||||||
url(r'^users/', include("{{ cookiecutter.repo_name }}.users.urls", namespace="users")),
|
url(r'^users/', include("{{ cookiecutter.repo_name }}.users.urls", namespace="users")),
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
POSTGRES_PASSWORD=mysecretpass
|
POSTGRES_PASSWORD=mysecretpass
|
||||||
POSTGRES_USER=postgresuser
|
POSTGRES_USER=postgresuser
|
||||||
|
|
||||||
|
ADMIN_URL=
|
||||||
DJANGO_SETTINGS_MODULE=config.settings.production
|
DJANGO_SETTINGS_MODULE=config.settings.production
|
||||||
DJANGO_SECRET_KEY=
|
DJANGO_SECRET_KEY=
|
||||||
DJANGO_ALLOWED_HOSTS=
|
DJANGO_ALLOWED_HOSTS=
|
||||||
|
|
Loading…
Reference in New Issue
Block a user