Skip to main content

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]

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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file django-govuk-forms-0.2.tar.gz.

File metadata

File hashes

Hashes for django-govuk-forms-0.2.tar.gz
Algorithm Hash digest
SHA256 1fedc3c828095d324a877d97e101d1c06abe8f5fd1d12578dbb8b447501c907c
MD5 8d828bee682183eb6e4fe5c8496695a7
BLAKE2b-256 3d400c5b01e027690430fc0143240ee89f74e405b3d0bbd3ce58faf00c68902c

See more details on using hashes here.

File details

Details for the file django_govuk_forms-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_govuk_forms-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6ba470f443fe470b217f4a50a53b7b6de093d247f9744bc5abffb6d8b8715d67
MD5 ee027fb2848800088012f9b248006598
BLAKE2b-256 6bb9a569008d845f56ce8ea2fee3782c8c274f06d04420a7712fc88c76df5284

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page