File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,6 @@ def nl2br(eval_ctx, value):
64
64
app .run (
65
65
ssl_context = ssl_context ,
66
66
host = 'localhost' ,
67
- port = 8080 ,
67
+ port = 8082 ,
68
68
debug = True
69
69
)
Original file line number Diff line number Diff line change 1
1
from flask import Flask , render_template
2
2
from db .db_model import get_db_session
3
3
from db .db_queries import get_published_posts , get_post
4
- from main import datetimeformat
5
4
from tools .local_utils import get_settings
6
5
from utils import fix_double_slash_escaping
7
6
11
10
ini = get_settings ()
12
11
app .jinja_env .globals ['CONFIG' ] = ini ['blog_config' ]
13
12
13
+ @app .template_filter ()
14
+ def datetimeformat (value , format = '%Y-%m-%d' ):
15
+ return value .strftime (format )
14
16
15
17
@app .route ('/' )
16
18
def posts_list ():
@@ -29,4 +31,4 @@ def post(slug):
29
31
30
32
if __name__ == '__main__' :
31
33
app .jinja_env .filters ['datetimeformat' ] = datetimeformat
32
- app .run (host = '127.0.0.1' , port = 8080 , debug = True )
34
+ app .run (host = '127.0.0.1' , port = 8082 , debug = True )
You can’t perform that action at this time.
0 commit comments