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

A simple integration of the AddThis social sharing widget for Django projects.

Requirements

  • Python 2.5+
  • Django 1.4+

Installation

  1. Install the latest stable version using pip:

    pip install django-addthis
    
  2. Add addthis to your INSTALLED_APPS setting:

    INSTALLED_APPS = (
        ...
        'addthis',
    )
    

Configuration

  1. The addthis_widget template tag requires a site profile id. pub_id. Either pass it as pub_id, or set PUB_ID in your ADDTHIS_SETTINGS settings dictionary:

    ADDTHIS_SETTINGS = {
        'PUB_ID': 'xx-xxxxxxxxxxxxxxxx',
        ...
    }
    

    The site profile id can be found by visiting its Profile Options page on AddThis (ID:).

  2. There are a few configuration options for django-addthis that can be placed in your ADDTHIS_SETTINGS settings dictionary:

    Option Default
    USERNAME  
    SERVICES_EXCLUDE  
    SERVICES_COMPACT  
    SERVICES_EXPANDED  
    SERVICES_CUSTOM  
    UI_CLICK False
    UI_DELAY 0
    UI_HOVER_DIRECTION 0
    UI_LANGUAGE  
    UI_OFFSET_TOP 0
    UI_OFFSET_LEFT 0
    UI_HEADER_COLOR  
    UI_HEADER_BACKGROUND  
    UI_COBRAND  
    UI_USE_CSS True
    UI_USE_ADDRESSBOOK False
    UI_508_COMPLIANT False
    DATA_TRACK_CLICKBACK True
    DATA_GA_TRACKER  

Basic Usage

  1. Load the tag library:

    {% load addthis %}
    

    You can pass these options as arguments:

    Option Default Description
    pub_id   Site profile id (see configuration above).
  2. Load the widget:

    {% addthis_widget %}
    
  3. Visit the AddThis Get the Code page and create/generate your social sharing code, e.g:

    <!-- Go to www.addthis.com/dashboard to customize your tools -->
    <div class="addthis_sharing_toolbox"></div>
    

    Be sure to omit the:

    <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=xx-xxxxxxxxxxxxxxxx"></script>
    

    part of the (generated) code as the addthis_widget template tag takes care of this.

Example

{% load addthis %}


<!DOCTYPE html>

<html>

<head>
  <meta charset="utf-8">
  <title>django-addthis Example</title>
</head>

<body>
  <!-- Go to www.addthis.com/dashboard to customize your tools -->
  <div class="addthis_sharing_toolbox"></div>

  <p>Well, the way they make shows is, they make one show. That show's
  called a pilot. Then they show that show to the people who make shows,
  and on the strength of that one show they decide if they're going to
  make more shows. Some pilots get picked and become television programs.
  Some don't, become nothing. She starred in one of the ones that became
  nothing.</p>

  <!-- Placed at the end of the document so the page load faster -->
  {% addthis_widget %}
</body>

</html>
Release History

Release History

3.0.0

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

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

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

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

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

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-addthis-3.0.0.tar.gz (18.4 kB) Copy SHA256 Checksum SHA256 Source Aug 3, 2015

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