Skip to main content

Django Social Widgets

Downloads Documentation Status https://travis-ci.org/creafz/django-social-widgets.svg?branch=master https://coveralls.io/repos/creafz/django-social-widgets/badge.png?branch=master

Django app for easy embedding social network widgets and plugins into your site. Supports Facebook, Twitter, Google+, YouTube, Instagram and Pinterest.

Useful links: Documentation, Demo.

Requirements

  • Python 2.6, 2.7, 3.3 - 3.5

  • Django 1.6 or higher

Quickstart

  1. Install from PyPI:

    pip install django-social-widgets
  2. Add social_widgets to INSTALLED_APPS:

    INSTALLED_APPS = (
     ...
     "social_widgets",
     ...
    )
  3. Load the social_widgets template library in every template you want to use it:

    {% load social_widgets %}
  4. Place {% social_widget_render %} code where you want to show the widget. For example if you want to show Facebook Likebox for Facebook Developers page put this code in your template:

    {% social_widget_render 'facebook/likebox.html' href='https://www.facebook.com/FacebookDevelopers' %}

Passing parameters

Parameter names for widgets are similar to the original parameters with only one change: they use underscore instead of hyphen. So for example if you need to set show-screen-name parameter for Twitter Follow Button, you should use code like this:

{% social_widget_render "twitter/follow_button.html" username="BillGates" show_screen_name=True %}

As a value for all parameters you can use a Python value like string, integer or Boolean, for example:

{% social_widget_render "facebook/likebox.html" app_id=12345678 href="https://www.facebook.com/FacebookDevelopers" show_border=True %}

See this demo page with all supported widgets, their code and available parameters.

Example project

You can find an example project in “example_project” directory.

Facebook

Twitter

Google+

YouTube

Instagram

Pinterest

Metadata

Release files for django-social-widgets 0.5.0

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-social-widgets 0.5.0
File Size Uploaded Provenance Actions
django-social-widgets-0.5.0.tar.gz 9.7 kB Without provenance Details for django-social-widgets-0.5.0.tar.gz

Release files / django-social-widgets-0.5.0.tar.gz

Download URL django-social-widgets-0.5.0.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b6aea30a61b344ce9ab5be9bb2d5d37134dd73265a6b1d981890b9f3ef18abf0
BLAKE2b-256 checksum
How to use checksums
8dbb0b1d407f605b43d7342b75d8f61325c91e9a91c52bf4bf83d2f2ea22135d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Security for django-social-widgets 0.5.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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