This commit is contained in:
2019-06-24 12:10:43 +02:00
parent b07ed9df29
commit dfce27a382
2 changed files with 4 additions and 5 deletions

View File

@@ -11,7 +11,6 @@ param = False
try: try:
form = cgi.FieldStorage(encoding='utf8') form = cgi.FieldStorage(encoding='utf8')
# nehm die Sachen aus create und bau sie in einen Post :)
title = form.getvalue('title') title = form.getvalue('title')
content = form.getvalue('content') content = form.getvalue('content')
tags = form.getvalue('tags')[1:].split("#") tags = form.getvalue('tags')[1:].split("#")
@@ -21,7 +20,7 @@ try:
nicetime = strftime("%A, %d.%B %Y %H:%M Uhr") nicetime = strftime("%A, %d.%B %Y %H:%M Uhr")
file_content = { file_content = {
"title": title, "title": title,
"prettytime": nicetime, #das ist nicht unbedingt sinnvoll, aber mir gefällts. "prettytime": nicetime,
"content" : content, "content" : content,
"tags" : tags "tags" : tags
} }
@@ -34,6 +33,6 @@ try:
except: except:
print("Content-type: text/html\n") print("Content-type: text/html\n")
if not(param): if not(param):
print("Nothing here. You reached the end of the Internet. Turn back. H.P. Backster. Hyper, Hyper.") print("Nothing to see here")
else: else:
print("Feeehhhleeeerrrr") print("Error")

View File

@@ -48,5 +48,5 @@ else:
print() print()
print('<a href="posts-show.py">Alle Posts!</a><br>') print('<a href="posts-show.py">Alle Posts!</a><br>')
print('<a href="tags-show.py">Falls du noch nicht alle Tags siehst ist dies nach diesem Klick der Fall!</a><br>') print('<a href="tags-show.py">Alle Tags anzeigen.</a><br>')
print('<a href="posts-create.py">Neuen Post verfassen!</a>') print('<a href="posts-create.py">Neuen Post verfassen!</a>')