[enh] it appears than yaml already know date in its format

This commit is contained in:
Laurent Peuch 2015-12-08 08:08:32 +01:00
parent c8407e4e2a
commit 7c6cdb2b4b
2 changed files with 1 additions and 3 deletions

View File

@ -4,7 +4,6 @@ import os
import sys import sys
import yaml import yaml
from dateutil.parser import parse
from jinja2 import Environment, FileSystemLoader from jinja2 import Environment, FileSystemLoader
templates = Environment(loader=FileSystemLoader([os.path.realpath(os.path.join(os.getcwd(), "templates")), os.path.join(os.path.split(os.path.realpath(__file__))[0], "templates")])) templates = Environment(loader=FileSystemLoader([os.path.realpath(os.path.join(os.getcwd(), "templates")), os.path.join(os.path.split(os.path.realpath(__file__))[0], "templates")]))
@ -45,7 +44,7 @@ def main():
gallery_title = gallery_settings["title"] gallery_title = gallery_settings["title"]
gallery_sub_title = gallery_settings.get("sub_title", "") gallery_sub_title = gallery_settings.get("sub_title", "")
gallery_date = parse(gallery_settings["date"]) if "date" in gallery_settings else "" gallery_date = gallery_settings["date"] if "date" in gallery_settings else ""
front_page_galleries_cover.append({ front_page_galleries_cover.append({
"title": gallery_title, "title": gallery_title,

View File

@ -1,3 +1,2 @@
jinja2 jinja2
pyyaml pyyaml
python-dateutil