mirror of
https://git.wownero.com/wownero/YellWOWPages.git
synced 2024-08-15 01:03:25 +00:00
Ignore accounts without address, add user page
This commit is contained in:
parent
cc0c35814f
commit
9a51c3c4fb
4 changed files with 59 additions and 2 deletions
|
@ -70,6 +70,19 @@ async def search():
|
|||
return await render_template('search.html', users=users)
|
||||
|
||||
|
||||
@bp_routes.route("/user/<path:name>")
|
||||
async def user_page(name: str):
|
||||
if not name or len(name) <= 1:
|
||||
raise Exception("invalid name")
|
||||
|
||||
_user = User.select().where(
|
||||
User.username == name,
|
||||
User.address.is_null(False)
|
||||
).get()
|
||||
|
||||
return await render_template('user.html', users=[_user])
|
||||
|
||||
|
||||
@bp_routes.route("/about")
|
||||
async def about():
|
||||
return await render_template('about.html')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue