This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
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: http://pfefferle.github.io/openwebicons/#cc-icons

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:

    INSTALLED_APPS = (
        ...
        'licensing',
    )
    
  3. Create a model that subclass Licensed (an abstract base class)

from licensing.models import Licensed

class Whatever(Licensed):
    pass

The model Whatever will contain a ForeignKey field named license.

  1. Run python manage.py 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:

/* http://pfefferle.github.io/openwebicons/usage/ */
@import url("http://weloveiconfonts.com/api/?family=openwebicons");

/* 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.

Tests

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

$ python runtests.py

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

Release History

Release History

1.0.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-licensing-1.0.1.tar.gz (133.5 kB) Copy SHA256 Checksum SHA256 Source Mar 18, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting