Compare commits

...

3 Commits

2 changed files with 19 additions and 3 deletions

View File

@ -40,6 +40,12 @@ class Explorer(models.Model):
on_delete=models.CASCADE, on_delete=models.CASCADE,
related_name='explorer' related_name='explorer'
) )
bio = models.TextField(
blank=True,
null=True,
verbose_name=_('Biography / Description'),
help_text=_('Describe yourself, your preferences, etc. in a few sentences.')
)
profile_image = ThumbnailerImageField( profile_image = ThumbnailerImageField(
blank=True, blank=True,
null=True, null=True,
@ -49,7 +55,6 @@ class Explorer(models.Model):
verbose_name=_('Profile image'), verbose_name=_('Profile image'),
help_text=_('Optional profile pic for display in explorer profile') help_text=_('Optional profile pic for display in explorer profile')
) )
favorite_places = models.ManyToManyField( favorite_places = models.ManyToManyField(
Place, Place,
related_name='favorite_places', related_name='favorite_places',

View File

@ -7,11 +7,16 @@
{% block maincontent %} {% block maincontent %}
<div class="LP-UserProfile"> <div class="LP-UserProfile">
<div class="LP-UserProfile__Bio">
<h2 class="LP-Headline">Bio</h2>
<p class="LP-Paragraph">{{explorer.bio}}</p>
</div>
<div class="LP-UserProfile__Info"> <div class="LP-UserProfile__Info">
<div class="LP-UserInfo"> <div class="LP-UserInfo">
<div class="LP-UserInfo__UserName"> <div class="LP-UserInfo__UserName">
<h1 class="LP-Headline">{{explorer.user.username}}</h1> <h1 class="LP-Headline">{{explorer.user.username}}</h1>
</div> </div>
<div class="LP-UserInfo__Meta"> <div class="LP-UserInfo__Meta">
<table> <table>
<tr> <tr>
@ -21,20 +26,26 @@
</figure> </figure>
{% endif %} {% endif %}
<tr> <tr>
{% if explorer.user.first_name %}
<td class="LP-UserInfo__Key"> <td class="LP-UserInfo__Key">
<span class="LP-Paragraph">{% trans 'Name' %}</span> <span class="LP-Paragraph">{% trans 'Name' %}</span>
</td> </td>
<td class="LP-UserInfo__Value"> <td class="LP-UserInfo__Value">
<span class="LP-Paragraph">{{explorer.user.first_name}} {{explorer.user.last_name}}</span> <span class="LP-Paragraph">{{explorer.user.first_name}} {{explorer.user.last_name}}</span>
</td> </td>
{% endif %}
</tr> </tr>
<tr> <tr>
<td class="LP-UserInfo__Key"> {% if explorer.user.email %}
<td class="LP-UserInfo__Key">
<span class="LP-Paragraph">{% trans 'E-Mail' %}</span> <span class="LP-Paragraph">{% trans 'E-Mail' %}</span>
</td> </td>
<td class="LP-UserInfo__Value"> <td class="LP-UserInfo__Value">
<span class="LP-Paragraph">{{explorer.user.email}}</span> <span class="LP-Paragraph">
<a href="{{explorer.user.email}}" class="LP-Link">{{explorer.user.email}}</a>
</span>
</td> </td>
{% endif %}
</tr> </tr>
<tr> <tr>
<td class="LP-UserInfo__Key"> <td class="LP-UserInfo__Key">