Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

The National Archives Frontend Django Templates

Main build status Latest release PyPi version Python version Licence

Django templates implementation of TNA components for inclusion in Python Django applications.

# Create a virtual environment
python3 -m venv venv
. ./venv/bin/activate

# Install the dependencies
pip install -r requirements.txt
npm install

# Run the server
python manage.py runserver 8080

http://localhost:8080/

# Run the tests against the running server
node tasks/test.mjs

How to use in your own Django project

Templates

  1. Install the nationalarchives-frontend-django package from PyPi
from distutils.sysconfig import get_python_lib

TEMPLATES = [
    {
        "DIRS": [
            os.path.join(get_python_lib(), "nationalarchives-frontend-django/templates")
        ],
    }
]

Styles

Install the @nationalarchives/frontend package from npm with npm install @nationalarchives/frontend

Add the config to enable you to use the static files:

STATICFILES_DIRS = [
    "node_modules/@nationalarchives/frontend"
]

Import the stylesheet with:

{% load static %}
<link rel="stylesheet" href="{% static 'nationalarchives/all.css' %}">

The @nationalarchives/frontend package also includes the SCSS if you wish to compile the CSS yourself.

Metadata

Release files for nationalarchives-frontend-django 0.1.2a0

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

Source distribution (sdist)

Source distribution for nationalarchives-frontend-django 0.1.2a0
File Size Uploaded Provenance Actions
nationalarchives-frontend-django-0.1.2a0.tar.gz 13.0 kB Without provenance Details for nationalarchives-frontend-django-0.1.2a0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nationalarchives-frontend-django 0.1.2a0
File Interpreter ABI Platform Actions
nationalarchives_frontend_django-0.1.2a0-py3-none-any.whl Python 3 none any Details for nationalarchives_frontend_django-0.1.2a0-py3-none-any.whl

Total release size: 30.6 kB

Release files / nationalarchives-frontend-django-0.1.2a0.tar.gz

Download URL nationalarchives-frontend-django-0.1.2a0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
36c6668d8c73eb86e4a5f575cb2a858c0b294212557ee403dfb28e572f9c2668
BLAKE2b-256 checksum
How to use checksums
31ea40b699de5cd257b97393588ee2a4c05e2826f07b5ed59d327980eb6d5259
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / nationalarchives_frontend_django-0.1.2a0-py3-none-any.whl

Download URL nationalarchives_frontend_django-0.1.2a0-py3-none-any.whl
Size 17.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a93ad51c80a096ab82eef3b596e33f24a6c5cd95a510e5e4682c1df028beb1e
BLAKE2b-256 checksum
How to use checksums
08e362b0da8ef6cb40c1cb4d56dd75b49ccdf864ad3d7989365902283486f5a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Security for nationalarchives-frontend-django 0.1.2a0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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