All Projects → creafz → django-social-widgets

creafz / django-social-widgets

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

Programming Languages

HTML
75241 projects
python
139335 projects - #7 most used programming language
CSS
56736 projects
javascript
184084 projects - #8 most used programming language

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].