Merge branch 'devel' into 'master'

Merge in latest devel

See merge request oliver/ivatar!132
This commit is contained in:
Oliver Falk
2019-03-04 12:09:27 +01:00
3 changed files with 8 additions and 2 deletions

View File

@@ -21,7 +21,7 @@
<div class="row">
{% if mailurl %}
<div class="panel panel-tortin" style="min-width:132px;width:calc({{ size }}px + 32px);float:left;margin-left:30px">
<div class="panel panel-tortin" style="min-width:132px;width:calc({{ size }}px + 33px);float:left;margin-left:20px">
<div class="panel-heading">
<h3 class="panel-title">MD5 <i class="fa fa-lock" title="Secure connection (https)"></i>&nbsp;<i class="fa fa-at" title="mail: {{ form.mail.value }}"></i></h3>
</div>
@@ -44,7 +44,7 @@
{% endif %}
{% if openidurl %}
<div class="panel panel-tortin" style="min-width:122px;width:calc({{ size }}px + 33px);float:left;margin-left:30px">
<div class="panel panel-tortin" style="min-width:132px;width:calc({{ size }}px + 33px);float:left;margin-left:20px">
<div class="panel-heading">
<h3 class="panel-title">SHA256 <i class="fa fa-lock" title="Secure connection (http)"></i>&nbsp;<i class="fa fa-openid" title="openid: {{ form.openid.value }}"></i></h3>
</div>

View File

@@ -21,6 +21,7 @@ urlpatterns = [ # pylint: disable=invalid-name
url(
r'avatar/(?P<digest>\w{32})',
AvatarImageView.as_view(), name='avatar_view'),
url(r'avatar/$', AvatarImageView.as_view(), name='avatar_view'),
url(
r'avatar/(?P<digest>\w*)',
TemplateView.as_view(

View File

@@ -58,6 +58,11 @@ class AvatarImageView(TemplateView):
'''
# TODO: Do cache resize images!! Memcached?
def options(self, request, *args, **kwargs): # pylint: disable=too-many-branches,too-many-statements,too-many-locals,too-many-return-statements
response = HttpResponse("", content_type='text/plain')
response['Allow'] = "404 mm mp retro pagan wavatar monsterid robohash identicon"
return response
def get(self, request, *args, **kwargs): # pylint: disable=too-many-branches,too-many-statements,too-many-locals,too-many-return-statements
'''
Override get from parent class