django_pony_forms 0.3.8

Django-pony-forms helps you to write better html for your Django forms

Django-pony-forms helps you to write better html for your Django forms.

Read the documentation on readthedocs

1: Better form html by default

The form html that Django produces is not very nice or useful. For example, the default output of a Django form is a table.

Just mixin PonyFormMixin to produce better html:

class ExampleForm(PonyFormMixin, forms.Form):
    name = forms.CharField()

This produces the following html:

<div class="form-row row-name">
    <label for="id_name">Name</label>
    <input type="text" id="id_name" name="name" />
</div>

2: Write your own form templates

You can also write your own form templates:

class ExampleForm(PonyFormMixin, forms.Form):
    name = forms.CharField()

    form_template = 'my_form.html'
    row_template = 'my_row.html'

my_form.html:

<div class="my_form">
    {{ hidden_fields }}
    {{ top_errors }}
    {{ rows }}
</div>

Requirements

The package is tested with Django 1.4 - 1.8 and Python 2.6, 2.7, 3.3 and 3.4.

Installation

Install the package:

$ pip install django_pony_forms

Add django_pony_forms to your installed apps in settings.py.

INSTALLED_APPS = (
    ..
    'django_pony_forms',
)
Apache License, Version 2.0

Author

Marco Braak

Pip

django_pony_forms==0.3.8

Classifiers

  • Development Status :: 5 - Production/Stable
  • Framework :: Django
  • Intended Audience :: Developers
  • Programming Language :: Python :: 2.6
  • Programming Language :: Python :: 2.7
  • Programming Language :: Python :: 3.3
  • Programming Language :: Python :: 3.4
  • License :: OSI Approved :: Apache Software License
  • Programming Language :: Python :: Implementation :: CPython
  • Programming Language :: Python :: Implementation :: PyPy
File Type Python Version Uploaded On Downloads
django_pony_forms-0.3.8.tar.gz Source March 31, 2015 782
django_pony_forms-0.3.8-py2.7.egg Egg 2.7 March 31, 2015 564
django_pony_forms-0.3.8-py2-none-any.whl Wheel 2.7 March 31, 2015 1,309
Version Release Date
0.3.8 March 31, 2015
0.3.7 Nov. 28, 2014
0.3.6 March 14, 2014
0.3.5 Oct. 4, 2013
0.3.4 July 5, 2013
0.3.3.3 Feb. 22, 2013
0.3.3.2 Dec. 11, 2012
0.3.3.1 Oct. 5, 2012
0.3.3 Sept. 19, 2012
0.3.2 July 3, 2012
0.3.1 June 7, 2012
0.3.0.2 May 27, 2012
0.3.0.1 May 27, 2012
0.3 May 27, 2012
Date Package Version Action
Aug. 26, 2015, 12:21 a.m. django_pony_forms 0.3.0.1 Release Created
Aug. 26, 2015, 12:21 a.m. django_pony_forms 0.3 Release Created
Aug. 26, 2015, 12:21 a.m. django_pony_forms 0.3.0.2 Release Created
Aug. 26, 2015, 12:21 a.m. django_pony_forms 0.3.2 Release Created
Aug. 26, 2015, 12:21 a.m. django_pony_forms 0.3.5 Release Created
Aug. 26, 2015, 12:21 a.m. django_pony_forms 0.3.4 Release Created
Aug. 26, 2015, 12:21 a.m. django_pony_forms 0.3.7 Release Created
Aug. 26, 2015, 12:21 a.m. django_pony_forms 0.3.6 Release Created
Aug. 26, 2015, 12:21 a.m. django_pony_forms 0.3.3.2 Release Created
Aug. 26, 2015, 12:21 a.m. django_pony_forms 0.3.3.3 Release Created
Aug. 26, 2015, 12:21 a.m. django_pony_forms 0.3.3 Release Created
Aug. 26, 2015, 12:21 a.m. django_pony_forms 0.3.3.1 Release Created
Aug. 26, 2015, 12:21 a.m. django_pony_forms 0.3.1 Release Created
Aug. 26, 2015, 12:21 a.m. django_pony_forms 0.3.8 Release Created
Aug. 26, 2015, 12:21 a.m. django_pony_forms Package Created