Skip to main content

Django app that creates forms based on Government Digital Services style guide

Project description

It should be easy to make a Django-based service that follows Government Digital Services’ style guide and reference materials.

This Django app allows forms to be output using the HTML that can be styled using GOV.UK elements. The styles themselves are provided by another package [1].

Usage

  • Install django-govuk-forms or django-govuk-template[forms]

  • Add govuk_forms to INSTALLED_APPS

  • Inherit forms from govuk_forms.forms.GOVUKForm and use widgets from govuk_forms.widgets

Development

Please report bugs and open pull requests on GitHub.

Use python setup.py test to run all tests.

This repository does not need to be updated for every release of GDS’s packages, only breaking changes for overridden components may need fixes.

If any localisable strings change, run python setup.py makemessages compilemessages.

Distribute a new version to PyPi by updating the VERSION tuple in govuk_forms and run python setup.py compilemessages sdist bdist_wheel upload.

To do

  • Allow fields to be grouped into field sets

  • Is HTML creation mechanic good?

  • Support conditionally-revealed input boxes [2]

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-govuk-forms-0.2.tar.gz (12.2 kB view hashes)

Uploaded Source

Built Distribution

django_govuk_forms-0.2-py3-none-any.whl (18.2 kB view hashes)

Uploaded Python 3

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