mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-09 14:34:53 +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"]
|
||||
|
||||
{%- 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...
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -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...
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -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 += [
|
||||
|
|
Loading…
Reference in New Issue
Block a user