Skip to main content

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

Project description

Build Status Version

Coverage Status Requirements Status


Django pony 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" />

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'


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


The package is tested with Django 2.2 - 3.1 and Python 3.6 - 3.8.


Install the package:

$ pip install django_pony_forms

Add django_pony_forms to your installed apps in


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_pony_forms-1.1.0.tar.gz (6.0 kB view hashes)

Uploaded source

Built Distributions

django_pony_forms-1.1.0-py3.8.egg (5.4 kB view hashes)

Uploaded 3 8

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page