get user profile show working

master
lza_menace 2 years ago
parent 17fe0cfe66
commit 251ded8708

@ -33,10 +33,10 @@ class User(pw.Model):
is_mod = pw.BooleanField(default=False)
is_verified = pw.BooleanField(default=False)
is_banned = pw.BooleanField(default=False)
website = pw.CharField(unique=True, default='')
twitter_handle = pw.CharField(unique=True, default='')
website = pw.CharField(unique=True, null=True)
twitter_handle = pw.CharField(unique=True, null=True)
bio = pw.TextField(default='')
email = pw.CharField(unique=True, default='')
email = pw.CharField(unique=True, null=True)
@property
def is_authenticated(self):

@ -20,6 +20,14 @@ a, a:visited {
margin-top: 4em;
}
.mt-2 {
margin-top: 2em;
}
.mt-1 {
margin-top: 1em;
}
.inline {
display: inline;
}

@ -5,20 +5,31 @@
<div class="container">
<div class="row">
<h2 class="no-margin"><strong>{{ user.handle }}</strong></h2>
<span>
<span class="">
{% if user.is_admin %}
<p class="inline nsfw">ADMIN</p>
{% endif %}
{% if user.is_verified %}
<p class="inline nsfw">VERIFIED</p>
{% endif %}
<h6 class="no-margin inline">
registered {{ user.register_date | humanize }} - last login {{ user.last_login_date | humanize }}
</h6>
<p class="no-margin inline">
registered {{ user.register_date | humanize }}
</p>
</span>
<br />
<br />
<h6 class="walletAddress mt-2">{{ user.wallet_address }}</h6>
{% if user.website %}
<p class="inline no-margin"><a href="{{ user.website }}" target="_blank">site</a></p>
{% endif %}
{% if user.twitter_handle %}
<p class="inline no-margin"><a href="https://twitter.com/{{ user.twitter_handle }}" target="_blank">twitter</a></p>
{% endif %}
{% if user.email %}
<p class="inline no-margin"><a href="mailto:{{ user.email }}" target="_blank">email</a></p>
{% endif %}
{% if user.bio %}
<p class="mt-1">{{ user.bio }}</p>
{% endif %}
<h6 class="walletAddress mt-1">{{ user.wallet_address }}</h6>
</div>
<hr>
<div class="row">

Loading…
Cancel
Save