django-bootstrap-form
Project description
=====================
Django bootstrap form
=====================
.. image:: https://badge.fury.io/py/django-bootstrap-form.png
:alt: PyPI version
:target: https://pypi.python.org/pypi/django-bootstrap-form
.. image:: https://travis-ci.org/tzangms/django-bootstrap-form.png?branch=master
:target: https://travis-ci.org/tzangms/django-bootstrap-form
.. image:: https://coveralls.io/repos/tzangms/django-bootstrap-form/badge.png?branch=master
:target: https://coveralls.io/r/tzangms/django-bootstrap-form?branch=master
Twitter Bootstrap for Django Form.
A simple Django template tag to work with `Bootstrap <http://getbootstrap.com/>`_
Usage
======
Add "bootstrapform" to your INSTALLED_APPS.
At the top of your template load in our template tags::
{% load bootstrap %}
Then to render your 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>
You can also set class="form-vertical" on the form element.
To use class="form-inline" on the form element, also change the "|boostrap" template tag to "|bootstrap_inline".
It is also possible to create a horizontal form. The form class and template tag are both changed, and you will also need slightly different CSS around the submit button::
<form class="form-horizontal">
<legend>Form Title</legend>
{% csrf_token %}
{{ form|bootstrap_horizontal }}
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</form>
Demo
=====
Checkout this `Demo site <http://django-bootstrap-form.herokuapp.com/>`_ to see it in action.
Django bootstrap form
=====================
.. image:: https://badge.fury.io/py/django-bootstrap-form.png
:alt: PyPI version
:target: https://pypi.python.org/pypi/django-bootstrap-form
.. image:: https://travis-ci.org/tzangms/django-bootstrap-form.png?branch=master
:target: https://travis-ci.org/tzangms/django-bootstrap-form
.. image:: https://coveralls.io/repos/tzangms/django-bootstrap-form/badge.png?branch=master
:target: https://coveralls.io/r/tzangms/django-bootstrap-form?branch=master
Twitter Bootstrap for Django Form.
A simple Django template tag to work with `Bootstrap <http://getbootstrap.com/>`_
Usage
======
Add "bootstrapform" to your INSTALLED_APPS.
At the top of your template load in our template tags::
{% load bootstrap %}
Then to render your 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>
You can also set class="form-vertical" on the form element.
To use class="form-inline" on the form element, also change the "|boostrap" template tag to "|bootstrap_inline".
It is also possible to create a horizontal form. The form class and template tag are both changed, and you will also need slightly different CSS around the submit button::
<form class="form-horizontal">
<legend>Form Title</legend>
{% csrf_token %}
{{ form|bootstrap_horizontal }}
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</form>
Demo
=====
Checkout this `Demo site <http://django-bootstrap-form.herokuapp.com/>`_ to see it in action.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-bootstrap-form-3.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 806732e87785bd4fd235a98de64af2fd24845a9390dad6196bb3aeb13a01c74b |
|
MD5 | b199769a8f2b5eaaee23c4ba8f5c2b52 |
|
BLAKE2b-256 | 5e671b052262cf4cd94b2ee8d9be4754cafaf365db07d5c9dbaff5444e4aed3a |