mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-10 15:04:52 +03:00
User app is now enabled with USER_APP_URLS_ENABLED setting
This commit is contained in:
parent
133aab2638
commit
0dd4ebb93b
|
@ -269,5 +269,11 @@ INSTALLED_APPS += ["compressor"]
|
||||||
STATICFILES_FINDERS += ["compressor.finders.CompressorFinder"]
|
STATICFILES_FINDERS += ["compressor.finders.CompressorFinder"]
|
||||||
|
|
||||||
{%- 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 = True
|
||||||
|
|
||||||
# Your stuff...
|
# Your stuff...
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
|
@ -287,5 +287,12 @@ sentry_sdk.init(
|
||||||
sentry_sdk.init(dsn=SENTRY_DSN, integrations=[sentry_logging, DjangoIntegration()])
|
sentry_sdk.init(dsn=SENTRY_DSN, integrations=[sentry_logging, DjangoIntegration()])
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
{% 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...
|
# Your stuff...
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
|
@ -17,12 +17,13 @@ urlpatterns = [
|
||||||
# Your stuff: custom urls includes go here
|
# Your stuff: custom urls includes go here
|
||||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
|
||||||
if settings.DEBUG:
|
if settings.USER_APP_URLS_ENABLED:
|
||||||
# User management
|
# User management
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
path("users/", include("{{ cookiecutter.project_slug }}.users.urls", namespace="users"))
|
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
|
# This allows the error pages to be debugged during development, just visit
|
||||||
# these url in browser to see how these error pages look like.
|
# these url in browser to see how these error pages look like.
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user