A PyBossa plugin for Gravatar integration.
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
pybossa_gravatar
tests
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
setup.cfg

README.md

pybossa-gravatar

Build Status Coverage Status

A PyBossa plugin for Gravatar integration.

Installation

Copy the pybossa_gravatar folder into your PyBossa plugins directory. The plugin will be available after you next restart the server.

Configuration

The default configuration settings for pybossa-gravatar are:

GRAVATAR_SIZE = 512
GRAVATAR_DEFAULT_IMAGE = 'identicon'
GRAVATAR_RATING = 'g'
GRAVATAR_FORCE_DEFAULT = False
GRAVATAR_SECURE_REQUESTS = False

You can modify these settings by adding them to your main PyBossa configuration file. See the Gravatar documentation for a description of each setting.

Usage

Once the plugin is installed a Gravatar will be set as the default avatar for all new users. Users can replace this by uploading their own avatar in the usual way. Users can also switch to using a Gravatar at any time via:

http://{pybossa-site-url}/account/<name>/update/gravatar/set

One option would be to add a button to update.html that will only appear if the plugin is installed, like this:

{% if 'pybossa-gravatar' in plugins.keys() %}
    <a href="{{url_for('set_gravatar', name=current_user.name)}}" class="btn btn-primary">
        Import Gravatar
    </a>
{% endif %}

Testing

This plugin makes use of the PyBossa test suite while running tests. The Travis CI configuration file contains all of the required commands to set up a test environment and run the tests.

Contributing

See the CONTRIBUTING file for guidelines on how to suggest improvements, report bugs or submit pull requests.