File: PKG-INFO

package info (click to toggle)
python-django-gravatar2 1.4.2-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 184 kB
  • sloc: python: 300; makefile: 6
file content (123 lines) | stat: -rw-r--r-- 4,863 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
Metadata-Version: 1.1
Name: django-gravatar2
Version: 1.4.2
Summary: Essential Gravatar support for Django. Features helper methods, templatetags and a full test suite!
Home-page: https://github.com/twaddington/django-gravatar
Author: Tristan Waddington
Author-email: tristan.waddington@gmail.com
License: MIT
Description: django-gravatar
        ================
        
        .. image:: https://secure.travis-ci.org/twaddington/django-gravatar.png
            :target: https://travis-ci.org/twaddington/django-gravatar
        
        A lightweight django-gravatar app. Includes helper methods for interacting with gravatars outside of template code.
        
        If you like this library and it's saved you some time, please consider
        supporting further development with a `Gittip donation`_!
        
        Features
        --------
        
        - Helper methods for constructing a gravatar url and checking an email for an existing gravatar
        - Templatetags for generating a gravatar url or gravatar <img> tag.
        - Full test suite!
        
        Installing
        ----------
        Install from PyPi:
        
        You can pip install the app directly from GitHub:
        
        ::
        
            $ pip install git+git://github.com/twaddington/django-gravatar.git#egg=DjangoGravatar
        
        Alternatively, you can now install directly from PyPi!
        
        ::
        
            $ pip install django-gravatar2
        
        Make sure you install `django-gravatar2 <http://pypi.python.org/pypi/django-gravatar2>`_ as
        there are several other incompatible django-gravatar libraries available.
        
        Add django_gravatar to your INSTALLED_APPS in settings.py:
        
        ::
        
            INSTALLED_APPS = (
                # ...
                'django_gravatar',
            )
        
        Basic Usage
        -----------
        Use in code:
        
        ::
        
            from django_gravatar.helpers import get_gravatar_url, has_gravatar, get_gravatar_profile_url, calculate_gravatar_hash
        
            url = get_gravatar_url('alice@example.com', size=150)
            gravatar_exists = has_gravatar('bob@example.com')
            profile_url = get_gravatar_profile_url('alice@example.com')
            email_hash = calculate_gravatar_hash('alice@example.com')
        
        Use in templates:
        
        ::
        
            {% load gravatar %}
        
            {% gravatar_url user.email 150 %}
            # https://secure.gravatar.com/avatar/hash.jpg?size=150
        
            {% gravatar user.email 150 %}
            # <img class="gravatar" src="https://secure.gravatar.com/avatar/hash.jpg?size=150" width="150" height="150" alt="" />
        
            {% gravatar user.email 150 "user@example.com" %}
            # <img class="gravatar" src="https://secure.gravatar.com/avatar/hash.jpg?size=150" width="150" height="150" alt="user@example.com" />
        
            {% gravatar_profile_url user.email %}
            # https://secure.gravatar.com/hash
        
        Configuring
        -----------
        The following options can be configured in your settings.py:
        
        GRAVATAR_URL            # Gravatar base url. Defaults to 'http://www.gravatar.com/'
        
        GRAVATAR_SECURE_URL     # Gravatar base secure https url. Defaults to 'https://secure.gravatar.com/'
        
        GRAVATAR_DEFAULT_SIZE   # Gravatar size in pixels. Defaults to '80'
        
        GRAVATAR_DEFAULT_IMAGE  # An image url or one of the following: 'mm', 'identicon', 'monsterid', 'wavatar', 'retro'. Defaults to 'mm'
        
        GRAVATAR_DEFAULT_RATING # One of the following: 'g', 'pg', 'r', 'x'. Defaults to 'g'
        
        GRAVATAR_DEFAULT_SECURE # True to use https by default, False for plain http. Defaults to True
        
        Contributing
        ------------
        Feel free to `fork django-gravatar <https://github.com/twaddington/django-gravatar>`_
        on GitHub! We'd love to see your pull requests. Please make sure you run
        tests before submitting a patch.
        
        .. _Gittip donation: https://www.gittip.com/twaddington/ 
        
Keywords: django gravatar avatar
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Framework :: Django