django-forms-bootstrap 3.0.1

a simple form filter for using Django forms with Bootstrap
<object data="https://img.shields.io/travis/pinax/django-forms-bootstrap.svg" type="image/svg+xml">https://img.shields.io/travis/pinax/django-forms-bootstrap.svg</object> <object data="https://img.shields.io/coveralls/pinax/django-forms-bootstrap.svg" type="image/svg+xml">https://img.shields.io/coveralls/pinax/django-forms-bootstrap.svg</object> <object data="https://img.shields.io/pypi/dm/django-forms-bootstrap.svg" type="image/svg+xml">https://img.shields.io/pypi/dm/django-forms-bootstrap.svg</object> <object data="https://img.shields.io/pypi/v/django-forms-bootstrap.svg" type="image/svg+xml">https://img.shields.io/pypi/v/django-forms-bootstrap.svg</object> <object data="https://img.shields.io/badge/license-MIT-blue.svg" type="image/svg+xml">https://img.shields.io/badge/license-MIT-blue.svg</object>

Simple Bootstrap filter for Django forms. Extracted from the bootstrap theme for Pinax.

Quick Start

Include "django-forms-bootstrap" in your requirements file and "django_forms_bootstrap" in your INSTALLED APPS.

Make sure your template loader finders includes app directories.

To style forms, add the following to the top of your template

{% load bootstrap_tags %}

and include your form using something like the following markup:

<form>
    <legend>My Form</legend>
    {% csrf_token %}
    {{ form|as_bootstrap }}
    <div class="form-actions">
      <a href="#back" class="btn">Go back</a>
      <button type="submit" class="btn btn-primary">Save changes</button>
    </div>
</form>

Specifying form layouts

Bootstrap includes styles for four types of forms. To change the display of your form, add one of the following class attributes to your form tag:

Name Class Description
Vertical (default) .form-vertical Stacked, left-aligned labels over controls
Horizontal .form-horizontal Float left, right-aligned labels on same line as controls
Inline .form-inline Left-aligned label and inline-block controls for compact style
Search .form-search Extra-rounded text input for a typical search aesthetic

License & Attribution

Django Forms Bootstrap is released under the MIT license. It does not include any styles or scripts from the Bootstrap project.

MIT

Author

Luke Hatcher

Pip

django-forms-bootstrap==3.0.1

Classifiers

  • Development Status :: 5 - Production/Stable
  • Environment :: Web Environment
  • Framework :: Django
  • Intended Audience :: Developers
  • License :: OSI Approved :: MIT License
  • Operating System :: OS Independent
  • Programming Language :: Python
File Type Python Version Uploaded On Downloads
django-forms-bootstrap-3.0.1.tar.gz Source Sept. 17, 2014 15,564
Version Release Date
3.0.1 Sept. 17, 2014
3.0.0 Jan. 28, 2014
2.0.3.post2 Aug. 2, 2013
2.0.3.post1 May 3, 2012
Date Package Version Action
Aug. 24, 2015, 11:03 p.m. django-forms-bootstrap 3.0.1 Release Created
Aug. 24, 2015, 11:03 p.m. django-forms-bootstrap 3.0.0 Release Created
Aug. 24, 2015, 11:03 p.m. django-forms-bootstrap 2.0.3.post1 Release Created
Aug. 24, 2015, 11:03 p.m. django-forms-bootstrap 2.0.3.post2 Release Created
Aug. 24, 2015, 11:03 p.m. django-forms-bootstrap Package Created