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.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-nanopages 0.4.1
File Size Uploaded
django_nanopages-0.4.1.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-nanopages 0.4.1
File Interpreter ABI Platform
django_nanopages-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.3 kB

Release files / django_nanopages-0.4.1.tar.gz

Download URL django_nanopages-0.4.1.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
830b903eb2fcae3cbf730d4731c64c86813be22525c80dc1f1c4809c4351f417
BLAKE2b-256 checksum
How to use checksums
823453070fb6dd856758522c2cb89d665da3b73925cf886b738d04575512e96d
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 24, 2026.

Transparency log

Release files / django_nanopages-0.4.1-py3-none-any.whl

Download URL django_nanopages-0.4.1-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e932b168b24886fb243f9cb07db9d7ade4e438430d46149b3b1164e9a47c51b2
BLAKE2b-256 checksum
How to use checksums
9c9e6c78b9ebc9eb53657547ecf7d39c9e1db996016445fb9b205f9a181e547f
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 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

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