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.
Contents¶
Install¶
This package supports Python 2.7, Python 3.3, Python 3.4, Python 3.5
Install these packages and their requirements:
Install cmsplugin-googleplus in your environment.
Configure¶
Settings¶
- Configure django-cms
- Add
cmsplugin_googleplus
and'django.contrib.humanize'
to theINSTALLED_APPS
list in your project’ssettings.py
.
Cache¶
The activities are cached so you need to:
(Optional) Decide the activities cache duration. Default is 5 minutes. Inside
settings.py
add:GOOGLEPLUS_PLUGIN_CACHE_DURATION = <custom_cache_duration>
Google¶
- Go to the google apis console and create a new project or select an existent one (a google account is required)
- Select APIs under APIs & Auth and activate Google+ API

- Select Credentials and Create new Key (Browser key)
- 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¶
Requirements¶
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