mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-14 04:04:03 +00:00
Use latest master tree on GitHub for robohash and allow to choose the set with robohash= (set1-3)
This commit is contained in:
@@ -133,8 +133,11 @@ class AvatarImageView(TemplateView):
|
|||||||
content_type='image/png')
|
content_type='image/png')
|
||||||
|
|
||||||
if str(default) == 'robohash':
|
if str(default) == 'robohash':
|
||||||
|
roboset = 'any'
|
||||||
|
if request.GET.get('robohash'):
|
||||||
|
roboset = request.GET.get('robohash')
|
||||||
robohash = Robohash(kwargs['digest'])
|
robohash = Robohash(kwargs['digest'])
|
||||||
robohash.assemble(roboset='any', sizex=size, sizey=size)
|
robohash.assemble(roboset=roboset, sizex=size, sizey=size)
|
||||||
data = BytesIO()
|
data = BytesIO()
|
||||||
robohash.img.save(data, format='png')
|
robohash.img.save(data, format='png')
|
||||||
data.seek(0)
|
data.seek(0)
|
||||||
|
|||||||
@@ -34,4 +34,4 @@ psycopg2
|
|||||||
notsetuptools
|
notsetuptools
|
||||||
git+https://github.com/ofalk/monsterid.git
|
git+https://github.com/ofalk/monsterid.git
|
||||||
git+https://github.com/azaghal/pydenticon.git
|
git+https://github.com/azaghal/pydenticon.git
|
||||||
robohash
|
git+https://github.com/e1ven/Robohash.git
|
||||||
|
|||||||
Reference in New Issue
Block a user