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

See the demo folder in this repository on GitHub, it is not included in distributions.

NB: Until version 1.0, there is likely going to be a lot of variation in the api, so it’s a good idea to pin a specific version.

Development

https://travis-ci.org/ministryofjustice/django-govuk-forms.svg?branch=master

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

  • Is HTML creation mechanic good?

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.5.tar.gz (12.1 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.5-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for django-govuk-forms-0.5.tar.gz
Algorithm Hash digest
SHA256 5c0839f122c14f1ac49bb393cf44c4131aa800da1d236a536577634a07f2e31b
MD5 5cb24fd72af72dfc08b1dec4942fc2ff
BLAKE2b-256 e6829e035985d111871cf03701de8dc93ad9c8a4f6b8d21fa25b6ec0f3d3945b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_govuk_forms-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7de0b5e47c0ccca0dd03afc4d76ba63710f605fe624c24571c8c11d35e08bbc2
MD5 6868cd0fc6a5c8fc41e23cd073157f34
BLAKE2b-256 9595625f2b44e121f191ebdb0552637d9793d2b8b7e64a45960cdd75ad1b43d7

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