Skip to main content

Control of widgets in templates sans BS.

Project description

https://badge.fury.io/py/django_reform.png https://travis-ci.org/alixedi/django_reform.png?branch=master https://pypip.in/d/django_reform/badge.png

Control of widgets in templates sans BS.

Installation

We are at the cheeseshop:

pip install django_reform

Usage

To use django_reform in a project:

  1. Include it in INSTALLED_APPS in your settings file.

  2. Render your forms like so:

    {% load bootstrap_toolkit %}
    {{ form|as_bootstrap }}
  3. Open reform/field.html

    {% load widget_tweaks reform %}
    {% with field_type=field|get_form_field_type %}
        {% if field_type == 'DateField' %}
            {% render_field field type="date" %}
        {% elif field_type == 'EmailField' %}
            {% render_field field type="email" %}
        {% elif field_type == 'URLField' %}
            {% render_field field type="url" %}
        {% else %}
            {{ field }}
        {% endif %}
    {% endwith %}

Sans BS as promised :)

History

0.1.0 (2013-11-25)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_reform-0.1.1.tar.gz (5.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page