Skip to main content

This can be used as a base to build MoJ Django applications. It includes some useful Django packages along with the Gov.uk template. It also includes flake8 code style test.

Includes

Django

django-cors-headers

django-extended-choices

django-filter

django-moj-irat

django-rest-swagger

djangorestframework

flake8

openpyxl

PyYAM

requests

Dependencies

  • Python 3.5 (can be installed using brew install python3)

Installation

Install via pypi

pip install django-gov

Features

govuk_template Django template and static directory are included in the package. You can extend the GovUK Template directly

{% extends 'govuk_template/base.html' %}

You can also download the latest govuk_template taball and extract the contentents to a directory of you choice

./manage.py update_gov_template -d /path/to/directory/to/unpack/

This will add the templates and static directories from the latest release of govuk_template to the directory passed as -d

You can include the default settings for all the included apps above by including the default settings in your app settings.py file

from django_gov.settings import *

You can include the urls for the healthcheck endpoints

url(r'^', include('django_gov.urls'))

Testing

If you include the whole default settings, this will add flake8 code style tests to the directory you run your apps.

You can add a setup.cfg file containing your flake8 settings to the base directory of your app.

[flake8]
exclude = .git/,env/,venv/,node_modules/, manage.py
max-complexity = 10
max-line-length = 120

API Docs

django-rest-swagger is also included. The template has been modified to use the govuk_template as a base.

see https://github.com/marcgibbons/django-rest-swagger for instructions on how to set up Swagger

History

0.2.0 (2017-04-05)

  • Update govuk template to 0.19.2.

0.1.2 (2016-12-05)

  • Add flake8 tests to READEME.

0.1.1 (2016-11-18)

  • Update READEME and HISTORY.

0.1.0 (2016-11-17)

  • First release on PyPI.

Release files for django-gov 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-gov 0.2.1
File Size Uploaded
django-gov-0.2.1.tar.gz 468.0 kB Details

Release files / django-gov-0.2.1.tar.gz

Download URL django-gov-0.2.1.tar.gz
Size 468.0 kB
Tags Source
SHA-256 checksum
How to use checksums
416131c66f42047d2194335c9cf742e5ea345fee38651a5dfc094d30fd2b65bb
BLAKE2b-256 checksum
How to use checksums
d3883ed3a28eeb2a87c141a3321fc127e7c71a0368a8941f39049461d11b1c13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page