4 Commits

3 changed files with 21 additions and 7 deletions

View File

@@ -41,11 +41,13 @@ def save_user_profile(sender, instance, **kwargs):
class Voucher(Expireable): class Voucher(Expireable):
""" """
Vouchers are authorization to created_when = models.DateTimeField(auto_now_add=True) Vouchers are authorization tokens to allow the registration of new users.
expires_when = models.DateTimeField()kens to allow the registration of new users.
A voucher has a code, a creation and a deletion date, which are all A voucher has a code, a creation and a deletion date, which are all
positional. Creation date is being set automatically during voucher positional. Creation date is being set automatically during voucher
creation. creation.
created_when = models.DateTimeField(auto_now_add=True)
expires_when = models.DateTimeField()
""" """
code = models.CharField(unique=True, max_length=30) code = models.CharField(unique=True, max_length=30)

View File

@@ -14,6 +14,22 @@
</div> </div>
<div class="LP-UserInfo__Meta"> <div class="LP-UserInfo__Meta">
<table> <table>
<tr>
<td class="LP-UserInfo__Key">
<span class="LP-Paragraph">{% trans 'Name' %}</span>
</td>
<td class="LP-UserInfo__Value">
<span class="LP-Paragraph">{{explorer.user.first_name}} {{explorer.user.last_name}}</span>
</td>
</tr>
<tr>
<td class="LP-UserInfo__Key">
<span class="LP-Paragraph">{% trans 'E-Mail' %}</span>
</td>
<td class="LP-UserInfo__Value">
<span class="LP-Paragraph">{{explorer.user.email}}</span>
</td>
</tr>
<tr> <tr>
<td class="LP-UserInfo__Key"> <td class="LP-UserInfo__Key">
<span class="LP-Paragraph">{% trans 'Joined' %}</span> <span class="LP-Paragraph">{% trans 'Joined' %}</span>

View File

@@ -33,13 +33,9 @@ class ExplorerProfileView(IsAuthenticatedMixin, View):
asset_count += objects.count() asset_count += objects.count()
context['asset_count'] = asset_count context['asset_count'] = asset_count
print(context['assets'])
return render( return render(
request=request, request=request,
template_name='explorer/profile.html', template_name='explorer/profile.html',
context=context context=context
) )