diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 3b0264e33..7892c4002 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -269,5 +269,11 @@ INSTALLED_APPS += ["compressor"] STATICFILES_FINDERS += ["compressor.finders.CompressorFinder"] {%- endif %} +# USER APPLICATION +# ------------------------------------------------------------------------------ +# Enable the User application. Note that this is a placeholder application +# and should not be used as is in production. +USER_APP_URLS_ENABLED = True + # Your stuff... # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 3db964b66..26527f7ac 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -287,5 +287,12 @@ sentry_sdk.init( sentry_sdk.init(dsn=SENTRY_DSN, integrations=[sentry_logging, DjangoIntegration()]) {% endif -%} {% endif %} + +# USER APPLICATION +# ------------------------------------------------------------------------------ +# Enable the User application. Note that this is a placeholder application +# and should not be used as is in production. +USER_APP_URLS_ENABLED = False + # Your stuff... # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/config/urls.py b/{{cookiecutter.project_slug}}/config/urls.py index dc0bcc3a9..2e0539dd0 100644 --- a/{{cookiecutter.project_slug}}/config/urls.py +++ b/{{cookiecutter.project_slug}}/config/urls.py @@ -17,12 +17,13 @@ urlpatterns = [ # Your stuff: custom urls includes go here ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) -if settings.DEBUG: +if settings.USER_APP_URLS_ENABLED: # User management urlpatterns += [ path("users/", include("{{ cookiecutter.project_slug }}.users.urls", namespace="users")) ] +if settings.DEBUG: # This allows the error pages to be debugged during development, just visit # these url in browser to see how these error pages look like. urlpatterns += [