46 gravatar_url = 'http://www.gravatar.com/avatar/{0}?{1}'.format( 47 hashlib.md5(self.user.email.lower()).hexdigest(), 48 urllib.urlencode({'d': no_picture, 's': '256'})
2 import datetime 3 import pickle 4 5 from binascii import hexlify, unhexlify
22 23 token_key = "cbb0a3d727b802ef86d173c411df1285" 24 25 26 def token_blob(id, email):
54 55 return pickle.loads(d.update(ct) + d.finalize()) 56
87 88 except Exception: 89 pass
158 159 except Exception: 160 pass
117 118 except Exception: 119 pass
44 bucket = kind.__name__.lower() + "s" 45 results[bucket] = kind.objects.extra(where=[clause]) 46
11 12 SECRET_KEY = 'b3fd8e309ff18c83f7264720ed2f2056e64f1693' 13 14 # SECURITY WARNING: don't run with debug turned on in production! 15 DEBUG = True
137 138 FILE_UPLOAD_TEMP_DIR = '/tmp/' 139 FILE_UPLOAD_PERMISSIONS = 0o644
1 from lxml import etree 2 from StringIO import StringIO 3 from django.utils.html import escape
10 try: 11 tree = etree.parse(StringIO(str), etree.HTMLParser()) 12 root = tree.getroot()
24 25 return mark_safe(etree.tostring(root)) 26 except:
24 25 return mark_safe(etree.tostring(root)) 26 except:
26 except: 27 return mark_safe(escape(str))
26 except: 27 return mark_safe(escape(str))
50 def sel(seq): 51 return seq[randint(0, len(seq) - 1)] 52
132 lk.profile.notify_liked(post) 133 except: 134 pass
136 for i in range(3): 137 if randint(0, 1) == 1: 138 post.comment(user=sel(erbody), post=body.split(".")[1])