Bugfixes with blog and photo albums

pull/2/head
Noah 2016-04-19 22:31:55 +00:00
parent b36e764507
commit 1d3dc51bca
2 ha cambiato i file con 7 aggiunte e 2 eliminazioni

Vedi File

@ -45,12 +45,14 @@ def get_index():
db = JsonDB.get("blog/index")
# Hide any private posts if we aren't logged in.
new_db = dict()
if not g.info["session"]["login"]:
for post_id, data in db.items():
if data["privacy"] == "private":
del db[post_id]
continue
new_db[post_id] = db[post_id]
return db
return new_db
def rebuild_index():

Vedi File

@ -43,6 +43,9 @@ def album_index(name):
g.info["album"] = name
g.info["album_info"] = Photo.get_album(name)
if not g.info["album_info"]:
flash("That photo album wasn't found!")
return redirect(url_for(".albums"))
g.info["markdown"] = render_markdown(g.info["album_info"]["description"])
g.info["photos"] = photos