No select.
This commit is contained in:
parent
bda5cfd52d
commit
afa40ada77
@ -1,26 +0,0 @@
|
|||||||
{% extends "app.html" %}
|
|
||||||
|
|
||||||
{% block title %}Search{% endblock %}
|
|
||||||
|
|
||||||
{% block main %}
|
|
||||||
|
|
||||||
<section class="chat-area">
|
|
||||||
<div class="chat-header"><h2>Search user</h2></div>
|
|
||||||
<div class="chat-messages">
|
|
||||||
<form method="get" action="/search-user.html">
|
|
||||||
<input type="text" placeholder="Username" name="query" value="{{query}}" REQUIRED></input>
|
|
||||||
<fancy-button size="auto" text="Back" url="submit"></fancy-button>
|
|
||||||
</form>
|
|
||||||
<ul>
|
|
||||||
{% for user in users %}
|
|
||||||
<li>
|
|
||||||
<a href="/user/{{user.username.value}}">{{user.username.value}}</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
@ -18,7 +18,7 @@ class SearchUserView(BaseFormView):
|
|||||||
|
|
||||||
if self.request.path.endswith(".json"):
|
if self.request.path.endswith(".json"):
|
||||||
return await super().get()
|
return await super().get()
|
||||||
return await self.render_template("search-user.html",dict(users=users,query=query or ''))
|
return await self.render_template("search_user.html",dict(users=users,query=query or ''))
|
||||||
|
|
||||||
async def submit(self, form):
|
async def submit(self, form):
|
||||||
if await form.is_valid:
|
if await form.is_valid:
|
||||||
|
Loading…
Reference in New Issue
Block a user