Skip to main content

Django Nanopages

PyPI Documentation Tests Coverage

Generate Django pages from Markdown, HTML, and Django template files.

Integrates well with:

Read the full documentation or find the project on PyPI.

Creating pages

Nanopages supports

  • page.md - markdown
  • page.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.md will be served at /section/
  • section/page.md will 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

  1. Install nanodjango along with its optional dependencies, including django-nanopages and django-distill:

    pip install nanodjango[full]
    
  2. In your nanodjango script, register your directory of pages at a URL, at the end of your script:

    app.pages(url="", path="pages/")
    
  3. Put your markdown, HTML, or Django template files under the path - in this case, a dir next to your script called "pages".

  4. 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

  1. Install:

    pip install django-nanopages
    
  2. Add it to your INSTALLED_APPS in settings.py:

    INSTALLED_APPS = [
        ...
        "django_nanopages",
    ]
    
  3. In your urls.py, register your directory of pages at a URL:

    from django_nanopages import Pages
    
    urlpatterns = [
        ...
        path("", Pages("pages/")),
    ]
    
  4. Put your markdown, HTML, or Django template files under the path - in this case, a dir called "pages".

  5. 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)

Source distribution for django-nanopages 0.4.0
File Size Uploaded
django_nanopages-0.4.0.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-nanopages 0.4.0
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

0.4.1

2 release files

This release

0.4.0 This release

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

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