Compare commits

..

No commits in common. "2022a924c4af7aea80eb197cd20ac8f8b2cc7b48" and "734d09df909a069d54cba2616ad681bcdc351dc1" have entirely different histories.

3 changed files with 3 additions and 8 deletions

View File

@ -27,7 +27,7 @@ def generate_profile_image_filename(instance, filename):
Returns filename as: explorer_pk-username.jpg 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): class Explorer(models.Model):
""" """

View File

@ -14,12 +14,6 @@
</div> </div>
<div class="LP-UserInfo__Meta"> <div class="LP-UserInfo__Meta">
<table> <table>
<tr>
{% if explorer.profile_image %}
<figure class="LP-UserInfo__Image">
<img src="{{ explorer.profile_image.url }}" class="LP-Image" />
</figure>
{% endif %}
<tr> <tr>
<td class="LP-UserInfo__Key"> <td class="LP-UserInfo__Key">
<span class="LP-Paragraph">{% trans 'Name' %}</span> <span class="LP-Paragraph">{% trans 'Name' %}</span>
@ -70,7 +64,7 @@
<div class="LP-PlaceList"> <div class="LP-PlaceList">
<h1 class="LP-Headline">{% trans 'Favorite places' %}</h1> <h1 class="LP-Headline">{% trans 'Favorite places' %}</h1>
<ul class="LP-PlaceList__List"> <ul class="LP-PlaceList__List">
{% for place in explorer.favorite_places.all %} {% for place in favorite_places %}
<li class="LP-PlaceList__Item"> <li class="LP-PlaceList__Item">
{% include 'partials/place_teaser.html' with place=place extended=True %} {% include 'partials/place_teaser.html' with place=place extended=True %}
</li> </li>

View File

@ -23,6 +23,7 @@ class ExplorerProfileView(IsAuthenticatedMixin, View):
'explorer': explorer, 'explorer': explorer,
'place_count': place_count, 'place_count': place_count,
'place_list': place_list, 'place_list': place_list,
'favorite_places': explorer.favorite_places.all(),
'assets': {} 'assets': {}
} }