mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-23 01:57:03 +03:00
Allow rendering custom widgets from root templates dir (#2356)
* Allow rendering custom widgets from root templates dir Rendering custom widgets from the projects root template directory doesn't work out of the box. See: https://stackoverflow.com/questions/45844032/django-templatedoesnotexist-in-case-of-a-custom-widget/46208414#46-208414 This changes the setting to use the same template finding logic that the TEMPLATES setting uses. * update APP_DIRS=True * fixup! update APP_DIRS=True
This commit is contained in:
parent
f5aa06c160
commit
54a38bfb43
|
@ -68,6 +68,7 @@ DJANGO_APPS = [
|
|||
"django.contrib.staticfiles",
|
||||
# "django.contrib.humanize", # Handy template tags
|
||||
"django.contrib.admin",
|
||||
"django.forms",
|
||||
]
|
||||
THIRD_PARTY_APPS = [
|
||||
"crispy_forms",
|
||||
|
@ -196,6 +197,10 @@ TEMPLATES = [
|
|||
},
|
||||
}
|
||||
]
|
||||
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#form-renderer
|
||||
FORM_RENDERER = "django.forms.renderers.TemplatesSetting"
|
||||
|
||||
# http://django-crispy-forms.readthedocs.io/en/latest/install.html#template-packs
|
||||
CRISPY_TEMPLATE_PACK = "bootstrap4"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user