Compare commits

..

3 Commits

Author SHA1 Message Date
gashapwn
fbf6a38903 added some comments 2020-11-27 00:47:31 +00:00
gashapwn
f5fe59ed6b cleaned up print statement 2020-11-27 00:37:51 +00:00
gashapwn
835e26b442 on app.py.... dont need to save rules_read to file. added pub_key to file write 2020-11-27 00:35:36 +00:00

8
app.py
View File

@ -76,7 +76,7 @@ def req():
def __init__(self, w_name, w_type, w_opt): def __init__(self, w_name, w_type, w_opt):
self.w_name = w_name self.w_name = w_name
self.w_type = w_type self.w_type = w_type
self.w_opt = w_opt self.w_opt = w_opt # only for choice type widg
# Configuration for our request form # Configuration for our request form
rt = { rt = {
@ -96,6 +96,7 @@ def signup():
# request # request
username = request.form["username"] username = request.form["username"]
email = request.form["email"] email = request.form["email"]
pub_key = request.form["pub_key"]
shell = request.form["shell"] shell = request.form["shell"]
rule_read = request.form["rule_read"] rule_read = request.form["rule_read"]
@ -118,6 +119,8 @@ def signup():
# this checks how many requests we have # this checks how many requests we have
# and gives us a free ID so we can save # and gives us a free ID so we can save
# our request # our request
# This sets the ID of the request we're
# abou to save to dsik
if(len(glob.glob("./test/[0-9]*ident*")) == 0): if(len(glob.glob("./test/[0-9]*ident*")) == 0):
new_id = int(INIT_REQ_ID) new_id = int(INIT_REQ_ID)
new_id_str = INIT_REQ_ID new_id_str = INIT_REQ_ID
@ -133,9 +136,8 @@ def signup():
ident_file.write(str(username) + "\n") ident_file.write(str(username) + "\n")
ident_file.write(str(email) + "\n") ident_file.write(str(email) + "\n")
ident_file.write(str(shell) + "\n") ident_file.write(str(shell) + "\n")
ident_file.write(str(rule_read) + "\n") ident_file.write(str(pub_key) + "\n")
print(username + " " + email + " " + shell + " " + rule_read)
return render_template("signup.html", is_email_user = is_email_user) return render_template("signup.html", is_email_user = is_email_user)
if __name__=="__main__": if __name__=="__main__":