django-forms-bootstrap

A simple form filter for using Django forms with Twitter Bootstrap
Download

django-forms-bootstrap Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Luke Hatcher
  • Publisher web site:
  • http://github.com/pinax/

django-forms-bootstrap Tags


django-forms-bootstrap Description

django-forms-bootstrap is a simple Twitter bootstrap filter for Django forms. Extracted from the bootstrap theme for Pinax.Quick StartInclude "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 layoutsBootstrap 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 DescriptionVertical (default) .form-vertical Stacked, left-aligned labels over controlsHorizontal .form-horizontal Float left, right-aligned labels on same line as controlsInline .form-inline Left-aligned label and inline-block controls for compact styleSearch .form-search Extra-rounded text input for a typical search aestheticProduct's homepage


django-forms-bootstrap Related Software