The National Archives frontend Django templates
Project description
The National Archives Frontend Django Templates
Django templates implementation of TNA components for inclusion in Python applications.
python3 -m venv venv
. ./venv/bin/activate
pip install -r requirements.txt
npm install
python manage.py runserver 8080
node tasks/test.mjs
git tag v0.1.0
git push origin --tags
python3 -m build
python3 -m pip install --upgrade twine
# python3 -m twine upload --repository testpypi dist/*
python3 -m twine upload dist/*
How to use in your own Django project
Templates
- 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for nationalarchives-frontend-django-0.1.0a0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 743fe3e06b9bd52952fa642335cca141198ff5bb2e5cf668a7f64eebf2131346 |
|
MD5 | 7a10076c2018700b66a088f6fe94794b |
|
BLAKE2b-256 | 013dcc44725afcd5de9b3b98113889cc70d0242cc8fa7ca9eddd9d8e565baf0b |
Close
Hashes for nationalarchives_frontend_django-0.1.0a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9070161ba87f9514a0757ffd8acb35970cfc939da7fc1cbd0d495f6075b8f101 |
|
MD5 | 48ee5e06066f144dc53b4db99750fe35 |
|
BLAKE2b-256 | e78fd2cbbd023e953fd48f21f97d49d2ea3f3af570f3d4f1ccae0a38ecd42acb |