Skip to main content
Django responsive DFP
======================

Description
-----------

The `django-responsive-dfp` package allows you to easily display responsive ads using dfp ans media-queries.

Dependencies
------------

* Django >= 1.3

Installation
------------

pip install django-responsive-dfp

add the plugin to ``INSTALLED_APPS``::

INSTALLED_APPS = (
...
'dfp',
...
)

define settings for your dfp slots

DFP_SLOTS = {
"header": {
"account" : 12345678,
"slot" : "Leaderboard_Header",
"responsive" : [
{
"media_query" : "(min-width: 1248px)",
"sizes" : ((1150,120),)
},
{
"media_query" : "(min-width: 948px) and (max-width: 1248px)",
"sizes" : ((640,120),)
}
]
}
}

Usage
------------

In your templates, you need to load ``dfp``:

...
{% load dfp %}
...

then you simply call the tag with the slot name

{% dfp "header" %}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-responsive-dfp-0.1.2.4.tar.gz (112.1 kB view details)

Uploaded Source

File details

Details for the file django-responsive-dfp-0.1.2.4.tar.gz.

File metadata

File hashes

Hashes for django-responsive-dfp-0.1.2.4.tar.gz
Algorithm Hash digest
SHA256 fd3d79cdc62cc1d0554a536858c3d14a78bd578d6373e710546442d73a22b801
MD5 7c3e2463750563918c795d91298d3319
BLAKE2b-256 a10de9699d3e84af2879d866df0106ff588d8fc6b47e7d8ea6bb70674999fb7a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2.4 This release

1 file

0.1.2.3

1 file

0.1.2.2

1 file

0.1.2.1

1 file

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