cmsplugin-googleplus 0.4.0

Django-CMS plugin for Google Plus Activities

Django-cms plugin for fetching Google+ activities. You can find a preview at the bottom of this README.

Status

Still in Beta.

<object data="https://pypip.in/license/django-cms/badge.svg" type="image/svg+xml">https://pypip.in/license/django-cms/badge.svg</object>

Continuous Integration

Install

  1. Install these packages and their requirements:

  2. Install cmsplugin-googleplus in your environment.

Configure

  1. Configure django-cms

  2. Add cmsplugin_googleplus and 'django.contrib.humanize' to the INSTALLED_APPS list in your project's settings.py.

  3. Go to the google apis console and create a new project (a google account is required)

  4. Select Services and activate Google+ API

  5. Select API Access and get the API key

  6. Add the API key to your settings.py:

    GOOGLEPLUS_PLUGIN_DEVELOPER_KEY = '<your_api_key>'
    

Run

Fresh install

python manage.py syncdb --all
python manage.py migrate --fake

The first command will prompt you to create a super user. Choose ‘yes’ and enter appropriate values.

Upgrade

python manage.py syncdb
python manage.py migrate

How to use it

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.

Example Template

This plugin has an example template that uses Twitter Bootstrap 3. You can use it as example skeleton for you templates.

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

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">

and the related javascript:

<script src="http://code.jquery.com/jquery.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>

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'))
)

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>
    

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

Translation

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

Tests

Run the test with coverage

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

Preview

This is how the plugin looks with the example template.

Have Fun!

Marco

MIT License

Author

Marco Badan

Pip

cmsplugin-googleplus==0.4.0

Classifiers

  • Topic :: Internet :: WWW/HTTP :: Dynamic Content
  • Topic :: Internet :: WWW/HTTP
  • Programming Language :: Python :: 2.7
  • Programming Language :: Python :: 2.6
  • Programming Language :: Python
  • Operating System :: OS Independent
  • License :: OSI Approved :: MIT License
  • Intended Audience :: Developers
  • Framework :: Django
  • Environment :: Web Environment
  • Development Status :: 4 - Beta
File Type Python Version Uploaded On Downloads
cmsplugin_googleplus-0.4.0-py2-none-any.whl Wheel 2.7 June 19, 2014 508
cmsplugin-googleplus-0.4.0.tar.gz Source June 19, 2014 612
Version Release Date
0.4.0 June 19, 2014
0.3.6 Dec. 14, 2013
0.3.6b Dec. 14, 2013
0.3.5 Nov. 2, 2013
0.3.4 Oct. 12, 2013
0.3.2 Aug. 20, 2013
0.3.1 Aug. 19, 2013
Date Package Version Action
Nov. 4, 2014, 11:57 a.m. cmsplugin-googleplus 0.3.6b Release Created
Nov. 4, 2014, 11:57 a.m. cmsplugin-googleplus 0.4.0 Release Created
Nov. 4, 2014, 11:57 a.m. cmsplugin-googleplus 0.3.5 Release Created
Nov. 4, 2014, 11:57 a.m. cmsplugin-googleplus 0.3.4 Release Created
Nov. 4, 2014, 11:57 a.m. cmsplugin-googleplus 0.3.6 Release Created
Nov. 4, 2014, 11:57 a.m. cmsplugin-googleplus 0.3.1 Release Created
Nov. 4, 2014, 11:57 a.m. cmsplugin-googleplus 0.3.2 Release Created
Nov. 4, 2014, 11:57 a.m. cmsplugin-googleplus Package Created