Skip to main content

Django P3P

https://travis-ci.org/jjanssen/django-p3p.svg?branch=develop https://img.shields.io/pypi/v/django-p3p.svg https://img.shields.io/pypi/dm/django-p3p.svg https://img.shields.io/badge/wheel-yes-green.svg https://img.shields.io/pypi/l/django-p3p.svg https://img.shields.io/pypi/pyversions/Django.svg https://coveralls.io/repos/jjanssen/django-p3p/badge.svg?branch=develop

About Django P3P

If your webpage uses sessions you willl lose your session in Internet Explorer when your page gets embedded into in iFrame. This problem can be solved by setting application specific P3P headers.

Django P3P is an application which makes it easier to set those specific headers for your Django application. You can use an editor like IBM’s P3P Policy Editor to configure your website policy to its needs.

Requirements

Django 1.8.x or greater, Python 2.7 or greater.

Installation

Install django-p3p with pip:

$ pip install django-p3p

Configuration

Configuring django-p3p

Add the following to your settings file:

  • Add p3p to INSTALLED_APPS

  • Add p3p.middleware.P3PMiddleware to MIDDLEWARE_CLASSES

URL Configuration

You need to include the p3p.urls urlpatterns in your root url configuration, for e.g.:

(r'^w3c/', include('p3p.urls', namespace='p3p')),
...
(r'^admin/', include(admin.site.urls)),

Overriding templates

You need to override at least 2 templates to configure your project specific HTTP headers and policy:

  • templates/p3p/headers.txt

Contains the actual HTTP headers which are sent to the browser. For e.g.: CP="NOI CURa ADMa DEVa TAIa CONa OUR DELa BUS IND PHY ONL UNI PUR COM NAV DEM STA"

  • templates/p3p/policy.p3p

Contains the policy as required for the application. You can generate one by using the IBM P3P Policy Editor.

Metadata

Release files for django-p3p 1.2.0

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-p3p 1.2.0
File Size Uploaded Provenance Actions
django-p3p-1.2.0.tar.gz 10.0 kB Without provenance Details for django-p3p-1.2.0.tar.gz

Release files / django-p3p-1.2.0.tar.gz

Download URL django-p3p-1.2.0.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a50edc00c3e32a723aa52a8ed6cc821ab00cefb705a39f38b9acfeab2ebf738c
BLAKE2b-256 checksum
How to use checksums
b7cfa6e00f42546029dbe8057da65e561e9972a41c31162fe9351af05d36eb18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-p3p 1.2.0

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.

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