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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d928b7a4ee5d67906191dad1d06717082eb6d6827d0cfb62fd1777380bbf61a1
|
|
| MD5 |
e18ee12d9e42b75f331b5dbceb22b6e6
|
|
| BLAKE2b-256 |
e2104369d37c7b33e88b1a15d35ca70ff49605eec3733b0b114dd81bea5a3fa0
|
Provenance
The following attestation bundles were made for django_fancybox-0.1.8.tar.gz:
Publisher:
release.yml on bashu/django-fancybox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_fancybox-0.1.8.tar.gz -
Subject digest:
d928b7a4ee5d67906191dad1d06717082eb6d6827d0cfb62fd1777380bbf61a1 - Sigstore transparency entry: 2464968474
- Sigstore integration time:
-
Permalink:
bashu/django-fancybox@55b685c941de03ce925d24904813068b55655379 -
Branch / Tag:
refs/tags/0.1.8 - Owner: https://github.com/bashu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@55b685c941de03ce925d24904813068b55655379 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64f2b22bd59862bd723b89d525d4c3d28b32fb4b1136b9ce6a32672c5ace9a2f
|
|
| MD5 |
260fc73ede622c658c5a328fef14303a
|
|
| BLAKE2b-256 |
bf95b07deb75a3665480e8e0db4cf2fb2600944584860570525036c966608013
|
Provenance
The following attestation bundles were made for django_fancybox-0.1.8-py3-none-any.whl:
Publisher:
release.yml on bashu/django-fancybox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_fancybox-0.1.8-py3-none-any.whl -
Subject digest:
64f2b22bd59862bd723b89d525d4c3d28b32fb4b1136b9ce6a32672c5ace9a2f - Sigstore transparency entry: 2464968582
- Sigstore integration time:
-
Permalink:
bashu/django-fancybox@55b685c941de03ce925d24904813068b55655379 -
Branch / Tag:
refs/tags/0.1.8 - Owner: https://github.com/bashu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@55b685c941de03ce925d24904813068b55655379 -
Trigger Event:
push
-
Statement type: