Django Nanopages
Generate Django pages from Markdown, HTML, and Django template files.
Integrates well with:
- nanodjango - build a site in just 5 lines of Python
- django-distill - turn it into a static site
- django-style - base templates with clean styles
- django-browser-reload - automatic browser reloading when writing your content
Read the full documentation or find the project on PyPI.
Creating pages
Nanopages supports
page.md- markdownpage.html- Django template
Where two files have the same name, the markdown file will be used. These would both be
served at /page/
HTML files are treated as Django templates, so you can also override blocks.
Files called index are special - they are the default content for their path, eg
section/index.mdwill be served at/section/section/page.mdwill be served at/section/page/
Source pages can also provide context for your Django templates - see context documentation
Quickstart
Try the example
Try out the example site using nanodjango:
git clone https://github.com/radiac/django-nanopages.git
cd django-nanopages/example
uv run example/website.py
Using with nanodjango
-
Install nanodjango along with its optional dependencies, including django-nanopages and django-distill:
pip install nanodjango[full]
-
In your nanodjango script, register your directory of pages at a URL, at the end of your script:
app.pages(url="", path="pages/")
-
Put your markdown, HTML, or Django template files under the
path- in this case, a dir next to your script called "pages". -
Optional: build to a static site with django-distill:
nanodjango manage myscript.py distill-local static_site/
(see django-distill docs for more configuration and deployment options)
Using with full Django
-
Install:
pip install django-nanopages
-
Add it to your
INSTALLED_APPSinsettings.py:INSTALLED_APPS = [ ... "django_nanopages", ]
-
In your
urls.py, register your directory of pages at a URL:from django_nanopages import Pages urlpatterns = [ ... path("", Pages("pages/")), ]
-
Put your markdown, HTML, or Django template files under the
path- in this case, a dir called "pages". -
Optional: build to a static site with django-distill:
./manage.py distill-local static_site/
(see django-distill docs for more configuration and deployment options)
Metadata
Release files for django-nanopages 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_nanopages-0.4.0.tar.gz | 10.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_nanopages-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.2 kB
Release files / django_nanopages-0.4.0.tar.gz
| Download URL | django_nanopages-0.4.0.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f99a78d2133412ef4eca3d4e535d51bf34470046c04526086c6c2c1d3838ee2
|
|
BLAKE2b-256 checksum How to use checksums |
593b00faa5fa0c9121371480be0f2432b373c549251e0794f006fde5673f938b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / django_nanopages-0.4.0-py3-none-any.whl
| Download URL | django_nanopages-0.4.0-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a608c3f37e213a997dac83d6632cace0c64b8a5a001207b707663e3eeaaf3e67
|
|
BLAKE2b-256 checksum How to use checksums |
6c6d1128a790450ec805d3c8b560239e37014ef622a3c42a8cf9bd126659f0da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency log