5 Django packages that extend the functionality of forms or add new types of forms
- Mar 20, 2022
A fresh approach to autocomplete implementations, specially for Django. Status: v4 alpha, v3 stable, v2 & v1 deprecated.
Features
- Python 2.7, 3.4, Django 2.0+ support (Django 1.11 (LTS), is supported until django-autocomplete-light-3.2.10),
- Django (multiple) choice support,
- Django (multiple) model choice support,
- Django generic foreign key support (through django-querysetsequence),
- Django generic many to many relation support (through django-generic-m2m and django-gm2m)
- Multiple widget support: select2.js, easy to add more.
- Creating choices that don't exist in the autocomplete,
- Offering choices that depend on other fields in the form, in an elegant and innovative way,
- Dynamic widget creation (ie. inlines), supports YOUR custom scripts too,
- Provides a test API for your awesome autocompletes, to support YOUR custom use cases too,
- A documented automatically tested example for each use case in test_project.
Twitter Bootstrap for Django Form
<form role="form"> <legend>Form Title</legend> {% csrf_token %} {{ form|bootstrap }} <div class="form-group"> <button type="submit" class="btn btn-primary">Submit</button> </div> </form>
Bootstrap 3 integration with Django.
{% load bootstrap3 %}
{# Display a form #}
<form action="/url/to/submit/" method="post" class="form">
{% csrf_token %}
{% bootstrap_form form %}
{% buttons %}
<button type="submit" class="btn btn-primary">Submit</button>
{% endbuttons %}
</form>
bootstrap3 django python
The best way to have DRY Django forms. The app provides a tag and filter that lets you quickly render forms in a div format while providing an enormous amount of capability to configure and control the rendered HTML.
Full control of form rendering in the templates.
# in your template configuration TEMPLATES = [{ ..., # inside the directories parameter 'DIRS': [ # include django's form templates os.path.join( os.path.dirname(django.__file__), "forms/templates/" ), ... # the rest of your template directories }]