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.
Requirements
Python 2.6 or 2.7
Django 1.5 or higher
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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fea161e24a7a404b7274aabe83c380b07d8f4d626dcd25e3c1ae83db35f512df |
|
MD5 | af1ce5f24b35887bce8cf19e6bd9e2f9 |
|
BLAKE2b-256 | c6a2df2c975e7a5efffc505421e90b56438bd8af0bc89c5df124b8789b4d895f |