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