Giter Site home page Giter Site logo

django-gravatar's People

Watchers

 avatar

django-gravatar's Issues

[patch] Support gravatars default parameter.

What steps will reproduce the problem?
1. django-gravatar does not support the default image parameter

What is the expected output? What do you see instead?
I would like to be able to specify a default image to use instead of the
default gravatar image.

What version of the product are you using? On what operating system?
trunk

Please provide any additional information below.
patch attached to support a new GRAVATAR_DEFAULT setting.

Original issue reported on code.google.com by [email protected] on 17 Feb 2009 at 10:06

Attachments:

Project abandoned ?

Is this project abandoned, moved to another place ? No problem but if so, 
please, mention clearly on the googlecode homepage where do you consider the 
django-gravatar home to be now. Thanks :)

Some people did developements after sept. 2009, among others, this guy seems to 
wish to maintain the fork : https://github.com/nvie/django-gravatar maybe he'd 
be happy to become the "official" home of django-gravatar ?

Original issue reported on code.google.com by [email protected] on 30 Aug 2011 at 2:35

Django-Avatar Support Please

Basically, I updated the API to the newest specification as defined on the 
Gravatar.com homepage 
(the endpoing that this was hitting before was the legacy URL I believe.)  
Also, added support for 
arbitrary domains other than gravatar.com for the endpoint, with a default back 
to gravatar.com.

This is patch is already assumed to be applied in the latest version of Pinax 
trunk.

Original issue reported on code.google.com by [email protected] on 2 Aug 2008 at 5:53

Attachments:

URL Construction does not print out ampersand correctly

When using:
{% gravatar_img_for_email comment.email 40 %}

It generates the following link:
<img src="http://www.gravatar.com/avatar/foo/?default=wavatar&amp;amp;s=40" 
height="40" width="40"/>

As you can see, the ampersand is not being printed correctly, and I'm 
receiving a 80x80-sized image which is then resized by the img tag, not very 
efficient.

Original issue reported on code.google.com by [email protected] on 27 Jun 2009 at 11:21

Hashed emails should be lowercase

Currently user e-mails are hashed as is which won't match gravatars because
gravatar uses exclusively lowercase urls.

The url should be constructed using a lower case email like so:

url = "%savatar/%s/" % (GRAVATAR_URL_PREFIX,
md5_constructor(email.lower()).hexdigest())

Original issue reported on code.google.com by [email protected] on 1 Feb 2009 at 6:35

Gravatar rating

Unable to add rating option. It would be a good feature.

"You can specify a "rating" or "r" parameter to the URL of g, pg, r, or x.
If you omit this step we use a default rating of g." 
from http://gravatar.com/site/implement/url

Original issue reported on code.google.com by akimov.alex on 27 Jun 2009 at 3:53

Query string separator ('?') missing from gravatar URL construction

Currently, the gravatar URL that gets the image for a user is constructed
as follows:

/gravatar/templatetags/gravatar.py:
def gravatar_for_email(email, size=80):
    url = "%savatar/%s/" % (GRAVATAR_URL_PREFIX,
hashlib.md5(email).hexdigest())
    url += urllib.urlencode({"s": str(size)})
    return escape(url)

The problem is that it returns a url that's missing the query string separator:

http://www.gravatar.com/avatar/.../s=80

The result is that the s attribute is ignored, and the size 80 is always
return no matter what s is set to.

A simple fix is to add the "?" before the query string is appended to the url.

def gravatar_for_email(email, size=80):
    url = "%savatar/%s/" % (GRAVATAR_URL_PREFIX,
hashlib.md5(email).hexdigest())
    url += "?" + urllib.urlencode({"s": str(size)})
    return escape(url)

This works as expected, and the image returned now responds to the s attribute.

Original issue reported on code.google.com by [email protected] on 10 Sep 2008 at 6:02

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.