Skip to main content

Responsive ads using mediaquery for dfp.

Project description

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" %}

Project details


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.3.tar.gz (3.7 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for django-responsive-dfp-0.1.2.3.tar.gz
Algorithm Hash digest
SHA256 307f9a0cfb75fb03d2fdeb8b8c86c978519a38331fd2d73a058bd09c28fb4e4c
MD5 91dae8b8802bf38c4b322521142c4d12
BLAKE2b-256 a0e1bb50c992bedeaae586f55da9a3d5b554c6303f1a475e8ce1e3fc3da0d40c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page