Skip to main content
https://badge.fury.io/py/django-fancybox.svg https://img.shields.io/pypi/pyversions/django-fancybox.svg https://img.shields.io/pypi/djversions/django-fancybox.svg https://github.com/bashu/django-fancybox/actions/workflows/test.yml/badge.svg

This is a Django integration of Fancybox.

Installation

First install the module, preferably in a virtual environment. It can be installed from PyPI:

pip install django-fancybox

External dependencies

  • jQuery - This is not included in the package since it is expected that in most scenarios this would already be available.

Setup

Add fancybox to INSTALLED_APPS:

INSTALLED_APPS += (
    'fancybox',
)

Be sure you have the django.template.context_processors.request processor

TEMPLATES = [
    {
        ...
        'OPTIONS': {
            'context_processors': [
                ...
                'django.template.context_processors.request',
            ],
        },
    },
]

and just include fancybox templates

{% include "fancybox/fancybox_css.html" %} {# Before the closing head tag #}
{% include "fancybox/fancybox_js.html" %} {# Before the closing body tag #}

When deploying on production server, don’t forget to run :

python manage.py collectstatic

Usage

Extend base template for ajax requests

{% extends request.is_ajax|yesno:"fancybox/base.html,base.html" %}

Add class="fancybox" to a link, and set the href to a page you want to display

<a data-fancybox data-type="ajax" href="{% url 'remote.html' %}" class="fancybox">Click here</a>

Please see example application. This application is used to manually test the functionalities of this package. This also serves as a good example.

You need only Django 1.4 or above to run that. It might run on older versions but that is not tested.

Contributing

If you like this module, forked it, or would like to improve it, please let us know! Pull requests are welcome too. :-)

License

django-fancybox is released under the BSD license.

Changes

0.1.7 (2026-08-14)

  • Migrate packaging to pyproject.toml and modern tooling (ruff, pre-commit, tox, versionflow).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_fancybox-0.1.8.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_fancybox-0.1.8-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file django_fancybox-0.1.8.tar.gz.

File metadata

  • Download URL: django_fancybox-0.1.8.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for django_fancybox-0.1.8.tar.gz
Algorithm Hash digest
SHA256 d928b7a4ee5d67906191dad1d06717082eb6d6827d0cfb62fd1777380bbf61a1
MD5 e18ee12d9e42b75f331b5dbceb22b6e6
BLAKE2b-256 e2104369d37c7b33e88b1a15d35ca70ff49605eec3733b0b114dd81bea5a3fa0

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_fancybox-0.1.8.tar.gz:

Publisher: release.yml on bashu/django-fancybox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_fancybox-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: django_fancybox-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 31.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for django_fancybox-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 64f2b22bd59862bd723b89d525d4c3d28b32fb4b1136b9ce6a32672c5ace9a2f
MD5 260fc73ede622c658c5a328fef14303a
BLAKE2b-256 bf95b07deb75a3665480e8e0db4cf2fb2600944584860570525036c966608013

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_fancybox-0.1.8-py3-none-any.whl:

Publisher: release.yml on bashu/django-fancybox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

1 file

0.1.2

1 file

0.1.1

1 file

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