Skip to main content

django-addthis

https://badge.fury.io/py/django-addthis.svg https://img.shields.io/pypi/pyversions/django-addthis.svg https://img.shields.io/pypi/djversions/django-addthis.svg https://github.com/bashu/django-addthis/actions/workflows/test.yml/badge.svg

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

Maintained by Basil Shubin, and some great contributors.

Installation

First install the module, preferably in a virtual environment. It can be installed from PyPI:

pip install django-addthis

Setup

You’ll need to add addthis to INSTALLED_APPS in your project’s settings.py file:

INSTALLED_APPS += [
    'addthis',
]

Configuration

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:).

There are a few configuration options for 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

Please see the example application. This application is used to manually test the functionalities of this package. This also serves as a good example.

You need Django 1.8 or above to run that. It might run on older versions but that is not tested.

Usage

  1. First of all, load the addthis in every template where you want to use it:

    {% load addthis %}

    then load the widget:

    {% addthis_widget %}
  2. 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

Contributing

If you’ve found a bug, implemented a feature or customized the template and think it is useful then please consider contributing. Patches, pull requests or just suggestions are welcome!

Credits

django-addthis was originally started by Raymond Wanyoike who has now unfortunately abandoned the project.

License

django-addthis is released under the GNU GPL v3 license.

Changes

3.0.4 (2026-10-10)

  • Add support for Python 3.15

  • Drop support for Python 3.10; 3.11 is now the minimum required version

  • Exclude the addthis.tests package from the built distribution

3.0.3 (2026-08-14)

  • Modernize packaging: switch from setup.py/setup.cfg to pyproject.toml

  • Replace Travis CI with GitHub Actions for tests and PyPI releases

  • Add Dependabot and pre-commit configuration

  • Support Django 5.2, 6.0 and 6.1; drop support for Python < 3.10

  • Clean up ruff lint findings in template tags and tests

3.0.2 (2021-09-13)

  • Made sure the app runs on Django 3.2

3.0.1 (2020-10-13)

  • Nothing…

3.0.0 (2015-08-04)

  • Support Django 1.6+

  • New template tag

2.0.2 (2015-03-26)

  • Refactor

2.0.1 (2014-11-24)

  • Add GNU GPL v3.0 license

2.0.0 (2014-11-24)

1.0.1 (2014-11-24)

  • Fix/Remove invalid “ui_use_css” config

1.0.0 (2014-11-24)

  • Initial release

Metadata

Release files for django-addthis 3.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-addthis 3.0.4
File Size Uploaded Provenance Actions
django_addthis-3.0.4.tar.gz 20.6 kB With provenance Details for django_addthis-3.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-addthis 3.0.4
File Interpreter ABI Platform Actions
django_addthis-3.0.4-py3-none-any.whl Python 3 none any Details for django_addthis-3.0.4-py3-none-any.whl

Total release size: 39.4 kB

Release files / django_addthis-3.0.4.tar.gz

Download URL django_addthis-3.0.4.tar.gz
Size 20.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1705376b25cd6931588529d2647f00ecc3c6fd5c266c01c578117140f447b399
BLAKE2b-256 checksum
How to use checksums
22791dd2e647f73f5cd3e9e7263d7752f6378c6586ac9a009c62c6f3a07852c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release files / django_addthis-3.0.4-py3-none-any.whl

Download URL django_addthis-3.0.4-py3-none-any.whl
Size 18.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
527fadeb441f8685c39702df54d5ccad17f556747983091fcde23d24b6934320
BLAKE2b-256 checksum
How to use checksums
d05055bbebdd973cfbfdc09e7d38652b85093d6336b14a1d4925694897acce36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Security for django-addthis 3.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_addthis-3.0.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page