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_mod = pw.BooleanField(default=False)
is_verified = pw.BooleanField(default=False) is_verified = pw.BooleanField(default=False)
is_banned = pw.BooleanField(default=False) is_banned = pw.BooleanField(default=False)
website = pw.CharField(unique=True, default='') website = pw.CharField(unique=True, null=True)
twitter_handle = pw.CharField(unique=True, default='') twitter_handle = pw.CharField(unique=True, null=True)
bio = pw.TextField(default='') bio = pw.TextField(default='')
email = pw.CharField(unique=True, default='') email = pw.CharField(unique=True, null=True)
@property @property
def is_authenticated(self): def is_authenticated(self):

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

@ -5,21 +5,32 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<h2 class="no-margin"><strong>{{ user.handle }}</strong></h2> <h2 class="no-margin"><strong>{{ user.handle }}</strong></h2>
<span> <span class="">
{% if user.is_admin %} {% if user.is_admin %}
<p class="inline nsfw">ADMIN</p> <p class="inline nsfw">ADMIN</p>
{% endif %} {% endif %}
{% if user.is_verified %} {% if user.is_verified %}
<p class="inline nsfw">VERIFIED</p> <p class="inline nsfw">VERIFIED</p>
{% endif %} {% endif %}
<h6 class="no-margin inline"> <p class="no-margin inline">
registered {{ user.register_date | humanize }} - last login {{ user.last_login_date | humanize }} registered {{ user.register_date | humanize }}
</h6> </p>
</span> </span>
<br /> <br />
<br /> {% if user.website %}
<h6 class="walletAddress mt-2">{{ user.wallet_address }}</h6> <p class="inline no-margin"><a href="{{ user.website }}" target="_blank">site</a></p>
</div> {% 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> <hr>
<div class="row"> <div class="row">
<h1>artworks</h1> <h1>artworks</h1>

Loading…
Cancel
Save