소스 검색

Fix dates not being displayed correctly

ghorsington 4 년 전
부모
커밋
3878fbdd31
1개의 변경된 파일1개의 추가작업 그리고 10개의 파일을 삭제
  1. 1 10
      src/app.py

+ 1 - 10
src/app.py

@@ -36,7 +36,7 @@ class Artifact:
 
     def __init__(self, id, date, changelog, artifacts):
         self.id = id
-        self.date = date
+        self.date = date.strip()
         self.changelog = changelog
         self.artifacts = [ArtifactItem(**item)
                           for item in artifacts]
@@ -140,14 +140,5 @@ def index():
     projects = get_projects()
     return render_template("main.html", projects=projects)
 
-@app.template_filter('timestamp')
-def timestamp_filter(filename):
-  try:
-      timestamp = str(os.path.getmtime(filename[1:]))
-  except OSError:
-      return filename
-  newfilename = "{0}?v={1}".format(filename, timestamp)
-  return newfilename
-
 if __name__ == "__main__":
     app.run(host='0.0.0.0')