Use thumbnail in profile_update.
This commit is contained in:
parent
67ce6cb50b
commit
011a58f6b3
@ -1,5 +1,6 @@
|
|||||||
{% extends 'global.html'%}
|
{% extends 'global.html'%}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load thumbnail %}
|
||||||
{% load widget_tweaks %}
|
{% load widget_tweaks %}
|
||||||
|
|
||||||
# {% block title %}{% trans 'Edit Explorer profile' %}{% endblock %}
|
# {% block title %}{% trans 'Edit Explorer profile' %}{% endblock %}
|
||||||
@ -34,9 +35,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="LP-Form__Composition">
|
<div class="LP-Form__Composition">
|
||||||
{% if explorer_image_url %}
|
{% if explorer_image %}
|
||||||
<div class="LP-Form__Field">
|
<div class="LP-Form__Field">
|
||||||
<img class="LP-Form__Field LP-Image" src="{{ explorer_image_url }}"/>
|
<img src="{% thumbnail explorer_image 200x200 %}"/>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="LP-Form__Field">
|
<div class="LP-Form__Field">
|
||||||
|
@ -52,7 +52,7 @@ class ExplorerProfileUpdateView(IsAuthenticatedMixin, View):
|
|||||||
'explorer_change_form': ExplorerChangeForm(instance=request.user.explorer)
|
'explorer_change_form': ExplorerChangeForm(instance=request.user.explorer)
|
||||||
}
|
}
|
||||||
if request.user.explorer.profile_image:
|
if request.user.explorer.profile_image:
|
||||||
context['explorer_image_url'] = request.user.explorer.profile_image.url
|
context['explorer_image'] = request.user.explorer.profile_image
|
||||||
return render(request, 'explorer/profile_update.html', context)
|
return render(request, 'explorer/profile_update.html', context)
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
|
Loading…
Reference in New Issue
Block a user