Skip to content
Provides the necessary utilities to access the new OpenX-API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


You need to add the following setting to django:

OPENX_URL = 'http://www.your-openx-server.tld/www/api/v1/xmlrpc/'
OPENX_USERNAME = 'username'
OPENX_PASSWORD = 'password'

From Google code:

OpenX will feature a new API to manage publishers, zones, advertisers, ... via XML-RPC ( This django application will provide a simple layer to wrap the calls to OpenX inside objects.

Currently there is no real validation of the data, but simple requests are useable (create objects, link banners to zones, ...).

Outdated Example (code reformatted to fit your screen):
>>> from django_openx import Zone
>>> z = Zone.get(2)
>>> z.generate_tag()
'<!--/* OpenX Javascript Tag v2.5.70-beta */-->\n\n<script type=\'text/javascript\'>[...]'
>>> z.publisher
	'publisherName': 'Some Publisher',
	'contactName': '',
	'agencyId': 1,
	'emailAddress': 'foo@bar.tld',
	'publisherId': 2,
	'accountId': 6
>>> p = z.publisher
>>> p.zones
		'width': 468,
		'zoneName': 'Some Zone',
		'type': 0,
		'zoneId': 2,
		'publisherId': 2,
		'height': 60
		'width': 250,
		'zoneName': 'Another Zone',
		'type': 0,
		'zoneId': 1,
		'publisherId': 2,
		'height': 250

Things still missing (contributions welcome):
 * Documentation (for now, just put django_openx into sys.path and read the source)
 * Better support for OpenX statistics
 * Support for getting banners via XML-RPC (XML-RPC ad delivery)
 * Validation of data in objects or wrapping of XML-RPC exceptions to make working with API easier
 * unittests
You can’t perform that action at this time.