Skip to content
Snippets Groups Projects
Commit 5601e8f0 authored by Mitchell Moore's avatar Mitchell Moore
Browse files

Reintroduce Ishan's file script

parent 9189ed9c
No related branches found
No related tags found
No related merge requests found
......@@ -56,8 +56,18 @@ def create_app(config_name):
print(tempString, file=sys.stdout)
try:
subprocess.check_output([tempString], shell=True)
# function to write out a flatdb with the name of the file being a timestamp and the content
# of the file beieng blazerID the user submitted from the flask form (fullname)
time_stamp = time.strftime("%m-%d-%Y_%H:%M:%S")
directory = "/var/www/ood/register/flask_user_reg/app/flat_db"
complete_file_name = os.path.join(directory, time_stamp + ".txt")
if not os.path.exists(directory):
os.makedirs(directory)
file = open(complete_file_name, "w")
file.write(fullname)
file.close()
return redirect(return_url, 302)
except:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment