djbanner /

Filename Size Date modified Message
dj_banner
1.7 KB
0 B
546 B
2.8 KB
790 B
DJ BANNER

(the name stands, of course, for DJango Banner")

This is a simple banner management system, not feature-full, but trivial to install
and use. Features will be added upon demand.

It is used in production on one site (http://nasze-wina.pl)

HOW IT WORKS

Banners are grouped in "banner sets". A banner set contains a couple of banners,
each of the banners is assigned a weight.

A tag placed on a web page draws banners from a set at random (taking weights into
account) and rotates them every few seconds. Views are counted, clicks are counted
and redirected appropriately.

A banner can be either and image (optionally with a target url), or a piece of arbitrary
html code which can contain links. Or Flash object. Or anything else.

INSTALLATION

Like every other Django app - add to INSTALLED_APPS, syncdb.

REQUIREMENTS

jQuery

CONFIGURATION

Create some banners, create a banner set, give it a slug, add banners to the set.

Inside your page template, add the following:

{% load djbanner_tags %}
{% banner_slot "[slug]" [height] [width] [rotation_speed] %}

(rotation speed is how many seconds should every banner be displayed)

Watch the banners, click on them. Then open a banner in the admin - you will
see some monthly statistics displayed at the bottom.

INTRICACIES

A banner set can be optionally related to a Contract - it has no practical implication
at the moment, though may be usefull for reporting.

Banners with zero weights are ignored.

If a banner set has no active banners (with non-zero weight) it is not displayed
at all.

TODO

 * View/click/time limits
 * Prevent banner counter editing through admin
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.