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).
Metadata
Release files for django-fancybox 0.1.8
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_fancybox-0.1.8.tar.gz | 32.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_fancybox-0.1.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.6 kB
Release files / django_fancybox-0.1.8.tar.gz
| Download URL | django_fancybox-0.1.8.tar.gz |
|---|---|
| Size | 32.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d928b7a4ee5d67906191dad1d06717082eb6d6827d0cfb62fd1777380bbf61a1
|
|
BLAKE2b-256 checksum How to use checksums |
e2104369d37c7b33e88b1a15d35ca70ff49605eec3733b0b114dd81bea5a3fa0
|
| 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 Aug 14, 2026.
Transparency logRelease files / django_fancybox-0.1.8-py3-none-any.whl
| Download URL | django_fancybox-0.1.8-py3-none-any.whl |
|---|---|
| Size | 31.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64f2b22bd59862bd723b89d525d4c3d28b32fb4b1136b9ce6a32672c5ace9a2f
|
|
BLAKE2b-256 checksum How to use checksums |
bf95b07deb75a3665480e8e0db4cf2fb2600944584860570525036c966608013
|
| 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 Aug 14, 2026.
Transparency log