I have this code

{% load crispy_forms_tags %}
{% crispy form %}

That is throwing this error:

TemplateDoesNotExist at /student_update/13
foundation/field.html

I have these two apps installed:

'crispy_forms',
'crispy_forms_foundation'

This does not happen when developing locally on my computer, only when it's deployed.

有帮助吗?

解决方案

I've just run into this issue. You have to be explicit what foundation you are using, 3 or 5. In your settings, change (you likely have this):

CRISPY_TEMPLATE_PACK = 'foundation'

for one of these two:

CRISPY_TEMPLATE_PACK = 'foundation-5'
CRISPY_TEMPLATE_PACK = 'foundation-3'
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top