Welcome to cmsplugin-googleplus’s documentation!

Django-cms plugin for fetching Google+ activities.

An activity is a note that a user posts to their stream. You can list a collection of activities from one user or you can list a collection of activities as result of a search.

Info

Development Status: Beta Latest Version Downloads License Wheel Status Supported Python Versions

Continuous Integration

Build Status Coverage Status

Contents

Install

This package supports Python 2.7, Python 3.3, Python 3.4, Python 3.5

  1. Install these packages and their requirements:

  2. Install cmsplugin-googleplus in your environment.

Configure

Settings

  1. Configure django-cms
  2. Add cmsplugin_googleplus and 'django.contrib.humanize' to the INSTALLED_APPS list in your project’s settings.py.

Cache

The activities are cached so you need to:

  1. Set up your cache system

  2. (Optional) Decide the activities cache duration. Default is 5 minutes. Inside settings.py add:

    GOOGLEPLUS_PLUGIN_CACHE_DURATION = <custom_cache_duration>
    

Google

  1. Go to the google apis console and create a new project or select an existent one (a google account is required)
  2. Select APIs under APIs & Auth and activate Google+ API
_images/google-developers-console.png
  1. Select Credentials and Create new Key (Browser key)
  2. Add the API key to your plugin instance:

The actual ‘Courtesy Limit’ for the Google+ API is 10,000 requests/day

Templates

This plugin has a template that uses Material Design for Bootstrap .

You can use it as example skeleton for your templates.

As quickstart you can use a CDN for the related css:

<!-- Material Design fonts -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<!-- Bootstrap -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.5.2/css/bootstrap-material-design.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.5.2/css/ripples.min.css">

Custom Template

Create your template and inside settings.py add:

GOOGLEPLUS_PLUGIN_TEMPLATES = (
    ('cmsplugin_googleplus/twitter_bootstrap.html',
     _('Example Template using Twitter Bootstrap')),
    ('path/to/my/template',
     _('My beautiful template'))
)

Tests

Run tests with coverage

$ coverage run runtests.py && coverage report -m

It’s possible to run against multiple environments with tox.

$ pip install tox

$ tox

Translations

For translators I’ve set up a Transifex account where you can add languages and translate the .po

Preview

This is how the plugin looks with the example template.

_images/cmsplugin-googleplus-preview.png

Have Fun!

Marco