File diff 97748a0f7ffa → 39b556b7ac4f
pinaxcon/templatetags/lca2017_tags.py
Show inline comments
 
import cms_pages
 
import hashlib
 
import urllib
 

	
 
from decimal import Decimal
 
from django import template
...
 
@@ -55,7 +54,9 @@ def speaker_photo(context, speaker, size):
 
    else:
 
        email = speaker.user.email.encode("utf-8")
 
        md5sum = hashlib.md5(email.strip().lower()).hexdigest()
 
        url = "https://secure.gravatar.com/avatar/%s?s=%d&d=%s" % (md5sum, size, "https://linux.conf.au/site_media/static/lca2017/images/speaker-fallback-devil.jpg")
 
        fallback_image = ("https://linux.conf.au/site_media/static/lca2017"
 
                          "/images/speaker-fallback-devil.jpg")
 
        url = "https://secure.gravatar.com/avatar/%s?s=%d&d=%s" % (md5sum, size, fallback_image)
 

	
 
        return url
 

	
...
 
@@ -94,6 +95,7 @@ def gst(amount):
 
def conference_name():
 
    return conference_models.Conference.objects.get(id=CONFERENCE_ID).title
 

	
 

	
 
@register.filter()
 
def trackname(room, day):
 
    try: