Compare commits
No commits in common. "2022a924c4af7aea80eb197cd20ac8f8b2cc7b48" and "734d09df909a069d54cba2616ad681bcdc351dc1" have entirely different histories.
2022a924c4
...
734d09df90
@ -27,7 +27,7 @@ def generate_profile_image_filename(instance, filename):
|
||||
Returns filename as: explorer_pk-username.jpg
|
||||
"""
|
||||
|
||||
return 'explorers/' + str(instance.user.pk) + '-' + str(instance.user.username) + '.' + filename.split('.')[-1]
|
||||
return 'explorers/' + str(instance.explorer.pk) + '-' + str(instance.explorer.username) + '.' + filename.split('.')[-1]
|
||||
|
||||
class Explorer(models.Model):
|
||||
"""
|
||||
|
@ -14,12 +14,6 @@
|
||||
</div>
|
||||
<div class="LP-UserInfo__Meta">
|
||||
<table>
|
||||
<tr>
|
||||
{% if explorer.profile_image %}
|
||||
<figure class="LP-UserInfo__Image">
|
||||
<img src="{{ explorer.profile_image.url }}" class="LP-Image" />
|
||||
</figure>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td class="LP-UserInfo__Key">
|
||||
<span class="LP-Paragraph">{% trans 'Name' %}</span>
|
||||
@ -70,7 +64,7 @@
|
||||
<div class="LP-PlaceList">
|
||||
<h1 class="LP-Headline">{% trans 'Favorite places' %}</h1>
|
||||
<ul class="LP-PlaceList__List">
|
||||
{% for place in explorer.favorite_places.all %}
|
||||
{% for place in favorite_places %}
|
||||
<li class="LP-PlaceList__Item">
|
||||
{% include 'partials/place_teaser.html' with place=place extended=True %}
|
||||
</li>
|
||||
|
@ -23,6 +23,7 @@ class ExplorerProfileView(IsAuthenticatedMixin, View):
|
||||
'explorer': explorer,
|
||||
'place_count': place_count,
|
||||
'place_list': place_list,
|
||||
'favorite_places': explorer.favorite_places.all(),
|
||||
'assets': {}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user