Small extension for Flask to make using Gravatar easy
Project description
Flask Gravatar
==============
.. module:: flaskext.gravatar
This is small and simple integration `gravatar`_ into `flask`_.
.. _flask: http://flask.pocoo.org
.. _gravatar: http://gravatar.com
Installation
------------
Install the extension with one of the following commands:
::
$ easy_install Flask-Gravatar
or alternatively if you have pip installed:
::
$ pip install Flask-Gravatar
How to Use
----------
Initialize with flask application and default parameters:
::
gravatar = Gravatar(app,
size=100,
rating='g',
default='retro',
force_default=False,
force_lower=False)
Then in your template:
::
{{ 'zzz.sochi@gmail.com' | gravatar }}
Bigger and adult:
::
{{ 'zzz.sochi@gmail.com' | gravatar(size=200, rating='x') }}
Patameters
++++++++++
All parameters are described in `gravatar documentation`_.
.. _gravatar documentation: http://gravatar.com/site/implement/images
==============
.. module:: flaskext.gravatar
This is small and simple integration `gravatar`_ into `flask`_.
.. _flask: http://flask.pocoo.org
.. _gravatar: http://gravatar.com
Installation
------------
Install the extension with one of the following commands:
::
$ easy_install Flask-Gravatar
or alternatively if you have pip installed:
::
$ pip install Flask-Gravatar
How to Use
----------
Initialize with flask application and default parameters:
::
gravatar = Gravatar(app,
size=100,
rating='g',
default='retro',
force_default=False,
force_lower=False)
Then in your template:
::
{{ 'zzz.sochi@gmail.com' | gravatar }}
Bigger and adult:
::
{{ 'zzz.sochi@gmail.com' | gravatar(size=200, rating='x') }}
Patameters
++++++++++
All parameters are described in `gravatar documentation`_.
.. _gravatar documentation: http://gravatar.com/site/implement/images
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Flask-Gravatar-0.2.tar.bz2
(2.5 kB
view details)
File details
Details for the file Flask-Gravatar-0.2.tar.bz2
.
File metadata
- Download URL: Flask-Gravatar-0.2.tar.bz2
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27b925217b85ff336b34329c25aeee6147918faa89424baa566b9ecd9d0a51d1 |
|
MD5 | f605d5da6dc03a6f442658c7debc6ee8 |
|
BLAKE2b-256 | e4edc13f9e65002e98289db4f6c4653eaccbc0d883033643d5da9e5d8b47e102 |