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" %}
======================
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.4.tar.gz
(112.1 kB
view details)
File details
Details for the file django-responsive-dfp-0.1.2.4.tar.gz
.
File metadata
- Download URL: django-responsive-dfp-0.1.2.4.tar.gz
- Upload date:
- Size: 112.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd3d79cdc62cc1d0554a536858c3d14a78bd578d6373e710546442d73a22b801 |
|
MD5 | 7c3e2463750563918c795d91298d3319 |
|
BLAKE2b-256 | a10de9699d3e84af2879d866df0106ff588d8fc6b47e7d8ea6bb70674999fb7a |