Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

A Django model and data for adding licensing info to data.

Project Description

Licensing provides some utilities needed in order to save and show licensable content. As default it provides descriptions and localizations of Creative Commons licenses, but any license could be added.

The characters in the symbols fields of the provided Creative Commons licenses are intended to be displayed with this Creative Commons icons font:

Supported Django versions

Licensing is tested against Django versions 1.8 and 1.9.

Quick start

  1. Install it using pip

    $ pip install django-licensing

  2. Add “licensing” to your INSTALLED_APPS setting like this:

  3. Create a model that subclass Licensed (an abstract base class)

from licensing.models import Licensed

class Whatever(Licensed):

The model Whatever will contain a ForeignKey field named license.

  1. Run python migrate to create the licensing models.

5. Where is needed to show the symbol associated with the license you can use the tag show_license: it uses the openweb font to render it; it’s simple as

{% load licensing_tags %}

{% block head %}

{% licensing_style %}

{% endblock %}
{% block foobar %}
    {% show_license license %}
{% endblock %}

where license is an instance of the License model.

The licensing_style tag simply renders a <style> block with all the necessary to use the correct font, like the code below:

/* */
@import url("");

/* openwebicons */
i.openwebicons {
  font-family: 'OpenWeb Icons', sans-serif;
  font-style: normal;

It’s possible to customize the css class and template used in these tags, read the source code for more details.


If you want to modify this app, there are available several tests that you can launch to check that nothing is broken:

$ python

It’s also available a tox configuration file to test it on multiple Django versions.

Release history Release notifications

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-licensing-1.0.1.tar.gz (133.5 kB) Copy SHA256 hash SHA256 Source None Mar 18, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page