dongpoliu / django-gravatar Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/django-gravatar
License: BSD 3-Clause "New" or "Revised" License
Automatically exported from code.google.com/p/django-gravatar
License: BSD 3-Clause "New" or "Revised" License
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;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
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:
[deleted issue]
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:
On my site a user has to choose mail or female when they register. When
displaying the gravatar I want different default images for males and females.
The patch I'm submitting keeps the old functionality but adds the ability
to specify default_image as a third argument.
Original issue reported on code.google.com by [email protected]
on 28 Sep 2009 at 10:01
Attachments:
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
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
django.po file
Original issue reported on code.google.com by [email protected]
on 10 Aug 2008 at 8:04
Attachments:
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.