django-facebox
This is a Django integration of Facebox.
Installation
pip install django-facebox
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 facebox to INSTALLED_APPS:
INSTALLED_APPS += (
'facebox',
)
Be sure you have the django.template.context_processors.request processor
TEMPLATES = [
{
...
'OPTIONS': {
'context_processors': [
...
'django.template.context_processors.request',
],
},
},
]
and just include facebox templates
{% include "facebox/facebox_css.html" %} {# Before the closing head tag #}
{% include "facebox/facebox_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:"facebox/base.html,base.html" %}
Add rel="facebox" to a link, and set the href to a page you want to display
<a href="{% url 'remote.html' %}" rel="facebox">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.
License
django-facebox is released under the BSD license.
Metadata
Release files for django-facebox 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-facebox-0.2.1.tar.gz | 10.8 kB | Without provenance | Details for django-facebox-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_facebox-0.2.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for django_facebox-0.2.1-py2.py3-none-any.whl |
Total release size: 22.3 kB
Release files / django-facebox-0.2.1.tar.gz
| Download URL | django-facebox-0.2.1.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69f4a0c4b2f8e55032b8c61357c450a704b58b8a67e05c3f62fa646e4f3414a4
|
|
BLAKE2b-256 checksum How to use checksums |
6a466e8ab884824fafc2f19874f05d3461019d9167396dadf51921c8fb8281e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_facebox-0.2.1-py2.py3-none-any.whl
| Download URL | django_facebox-0.2.1-py2.py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d59105071acee29a5fd4de991d7628509a2563db2656e032f8060ded8dd805b3
|
|
BLAKE2b-256 checksum How to use checksums |
5a7724e2829eda7664415f6e1ed5c621b6e142676527b1a742658acedfbd0367
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-facebox 0.2.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.