diff --git a/cgi-bin/uebung07/master.html b/cgi-bin/uebung07/master.html index 885c605..e9c1aaf 100755 --- a/cgi-bin/uebung07/master.html +++ b/cgi-bin/uebung07/master.html @@ -12,7 +12,7 @@

Just try to think creatively

-

+





diff --git a/cgi-bin/uebung07/posts-show.py b/cgi-bin/uebung07/posts-show.py index 1402b14..bd52305 100755 --- a/cgi-bin/uebung07/posts-show.py +++ b/cgi-bin/uebung07/posts-show.py @@ -9,23 +9,23 @@ cgitb.enable() print("Content-type: text/html\n") print("") -print("""

MEIN TOLLER BLOG

""") +print("""

Blog

""") file_names= [f for f in os.listdir('posts') if os.path.isfile(os.path.join('posts', f))] file_names = sorted(file_names, reverse=True) -for lol in file_names: - lol = 'posts/' + lol - data = open(lol, "r") +for i in file_names: + i = 'posts/' + i + data = open(i, "r") data = json.load(data) - print('
') + print('
') print(str(data['title']) + '
Datum: ' + str(data['prettytime'])) print('
') print(str(data['content']) + '

') - for lel in data['tags']: - print('#' + str(lel) + '') + for k in data['tags']: + print('#' + str(k) + '') print('

') print() -print('Zeig mir alle Tags!
') -print('Ich will einen neuen Post bauen!') \ No newline at end of file +print('Alle Tags!
') +print('Einen neuen Post verfassen!') diff --git a/cgi-bin/uebung07/tags-show.py b/cgi-bin/uebung07/tags-show.py index ddf3857..d7e1e84 100755 --- a/cgi-bin/uebung07/tags-show.py +++ b/cgi-bin/uebung07/tags-show.py @@ -35,7 +35,7 @@ if tag: print('#' + str(i) + '') print('

') else: - print('
') + print('
') print("Tags
") for f in file_names: f = 'posts/' + f