Django app for easy embedding social network widgets and plugins into your site. Supports Facebook, Twitter, Google+, YouTube, Instagram and Pinterest.
Project description
Django app for easy embedding social network widgets and plugins into your site. Supports Facebook, Twitter, Google+, YouTube, Instagram and Pinterest. Demo: https://creafz.github.io/django-social-widgets/index.html.
Quickstart
Install from PyPI:
pip install django-social-widgets
Add “social_widgets” to INSTALLED_APPS:
INSTALLED_APPS = ( ... "social_widgets", ... )
Load the social_widgets template library in every template you want to use it:
{% load social_widgets %}
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.
Supported Widgets
Google+
YouTube
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for django-social-widgets-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ad365db28fc6b7ae62025f3b445cce09166b4e01123fb2da3fd14f9c899017c |
|
MD5 | eba0d0800f237d7a9338ede7527cca4b |
|
BLAKE2b-256 | 03365f137f96e0218ec7529863a7aaa5b5b4fb10f80507216390a3e2112f6085 |