Semantic UI for Django Form.
A simple Django template tag to work with Semantic UI
This project is a fork from django-bootstrap-form by tzangms.
Add semanticuiform
to your INSTALLED_APPS
.
At the top of your template load in our template tags:
{% load semanticui %}
Then to render your form:
<form class="ui form"> <legend>Form Title</legend> {% csrf_token %} {{ form|semanticui }} <button class="ui button" type="submit">Submit</button> </form>
To make the form with inline element, change the |semanticui
template
tag to |semanticui_inline
.:
<form class="ui form"> <legend>Form Title</legend> {% csrf_token %} {{ form|semanticui_inline }} <button class="ui button" type="submit">Submit</button> </form>
To automatically enable some features with javascript, include the script after
your <body>
:
<script src="{% static 'semanticui/auto-enable.js' %}"></script>
Not yet.