I use semantic-ui as template for crispy-forms. When trying to load the page it results in the following error:
TemplateSyntaxError at /forum/newpost/pqs53kqsbgsqd66pg0i60u-isjtvagbo4ii4q9/
crispy tag's template_pack argument should be in ('bootstrap', 'uni_form', 'bootstrap3', 'foundation-5')
Settings file contains entries below (among others):
CRISPY_TEMPLATE_PACK = 'semantic-ui'INSTALLED_APPS = ('crispy_forms', 'semantic_ui')
Here is the template code from forumpost_create.html:
{% extends 'forum/layouts/forum_main.html' %}
{% load crispy_forms_tags %}
{% block content %}
<div class="ui main text container">
<form action="" method="post" class="ui form">
{% csrf_token %}
{% crispy form %}
<input type="submit" value="Save" />
</form>
</div>
{% endblock %}
The error disappears when I use form|crispy in the template, but then the template is rendered unaffected, even when looking at the output HTML source, no changes whatsoever.
Code from forms.py
class ForumPostForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(ForumPostForm, self).__init__(*args, **kwargs)
self.helper = FormHelper(self)
self.helper.layout = Layout(
Fieldset(
'Post body',
'body'
),
ButtonHolder(
Submit('submit', 'Submit', css_class='ui primary button')
)
)
class Meta:
model = ForumPost
fields = ['body']
How to make this to work? Is it because I am using semantic-ui and something needs to be done differently? (Majority of the tutorials I encounter prefer bootstrap).
INSTALLED_APPS?