added logic for req template
This commit is contained in:
parent
a60b5267a7
commit
4b981c00b9
13
app.py
13
app.py
@ -15,6 +15,18 @@ def home2(name):
|
||||
def success(name):
|
||||
return "welcome %s" % name
|
||||
|
||||
def req():
|
||||
rt = {
|
||||
"username": "bob",
|
||||
"displayname": "bob",
|
||||
"default to display name?": "no",
|
||||
"email for account lockout / registration confirmation (optional)": "fuck no",
|
||||
"SSH public key": "123",
|
||||
"shell of choice": "/bin/bash",
|
||||
"have you read the rules?": "lolyeah"
|
||||
};
|
||||
return render_template("req.html", req_tab = rt)
|
||||
|
||||
def login():
|
||||
if request.method == "POST":
|
||||
user = request.form["nm"]
|
||||
@ -26,4 +38,5 @@ if __name__=="__main__":
|
||||
app.add_url_rule('/home2/<name>', 'home2', home2)
|
||||
app.add_url_rule('/success/<name>', 'success', success)
|
||||
app.add_url_rule('/login', 'login', login, methods = ['POST', 'GET'])
|
||||
app.add_url_rule('/req', 'req', req, methods = ['POST', 'GET'])
|
||||
app.run(host="192.168.1.228",debug=True)
|
||||
|
23
templates/req.html
Normal file
23
templates/req.html
Normal file
@ -0,0 +1,23 @@
|
||||
{%extends "layout.html"%}
|
||||
|
||||
{%block content%}
|
||||
<p>
|
||||
|
||||
<table>
|
||||
{% for key, value in req_tab.items() %}
|
||||
<tr><td>{{ key }}</td><td>{{ value }}</td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
A requested feature is to have to allow users to have a unicode username since unicode allows for more interesting aesthics
|
||||
</br>
|
||||
If you enter a unicode display name, the system will try to display your unicode name when possbile. It will also be your default in terminal prompt, chat and your tilde path
|
||||
</br>
|
||||
the linux os only sees your true ascii username. so your ssh login, file permissions etc will user your true username
|
||||
</br>
|
||||
feedback on this feature welcome
|
||||
</p>
|
||||
|
||||
{%endblock%}
|
Loading…
Reference in New Issue
Block a user