Skip to main content

django-facebox

This is a Django integration of Facebox.

https://img.shields.io/pypi/v/django-facebox.svg https://img.shields.io/pypi/dm/django-facebox.svg https://img.shields.io/github/license/bashu/django-facebox.svg

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)

Source distribution for django-facebox 0.2.1
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)

Table of built distributions (wheels) for django-facebox 0.2.1
File Interpreter ABI Platform Actions
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.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

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