This is a fork of original DJ Banner with some changes and enhancements

(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 (


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.


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




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

and include static/dj_banner.js with something like (copy/symlink file to your media directory or use django static):

<script src="{{ MEDIA_URL }}djbanner/dj_banner.js"></script>

(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.


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.


 * View/click/time limits
 * Prevent banner counter editing through admin