Ver a proveniência

Bugfixes with blog and photo albums

pull/2/head
Noah Petherbridge há 5 anos
ascendente
cometimento
1d3dc51bca
  1. 6
      rophako/model/blog.py
  2. 3
      rophako/modules/photo/__init__.py

6
rophako/model/blog.py

@ -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():

3
rophako/modules/photo/__init__.py

@ -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

Carregando…
Cancelar
Guardar