Use latest master tree on GitHub for robohash and allow to choose the set with robohash= (set1-3)

This commit is contained in:
Oliver Falk
2018-12-03 16:17:33 +01:00
parent 64f804b876
commit 7c1b821820
2 changed files with 5 additions and 2 deletions

View File

@@ -133,8 +133,11 @@ class AvatarImageView(TemplateView):
content_type='image/png')
if str(default) == 'robohash':
roboset = 'any'
if request.GET.get('robohash'):
roboset = request.GET.get('robohash')
robohash = Robohash(kwargs['digest'])
robohash.assemble(roboset='any', sizex=size, sizey=size)
robohash.assemble(roboset=roboset, sizex=size, sizey=size)
data = BytesIO()
robohash.img.save(data, format='png')
data.seek(0)

View File

@@ -34,4 +34,4 @@ psycopg2
notsetuptools
git+https://github.com/ofalk/monsterid.git
git+https://github.com/azaghal/pydenticon.git
robohash
git+https://github.com/e1ven/Robohash.git