diff --git a/hasnew/templates/index.html b/hasnew/templates/index.html.jinja2 similarity index 74% rename from hasnew/templates/index.html rename to hasnew/templates/index.html.jinja2 index f82f8c1..90b5b8a 100644 --- a/hasnew/templates/index.html +++ b/hasnew/templates/index.html.jinja2 @@ -1,5 +1,5 @@ -{% extends "layout.html" %} -{% from "macros.html" import postlist %} +{% extends "layout.html.jinja2" %} +{% from "macros.html.jinja2" import postlist %} {% block titletags -%} {% block title %}{{ config['SITE_TITLE'] }}{% endblock %} diff --git a/hasnew/templates/layout.html b/hasnew/templates/layout.html.jinja2 similarity index 90% rename from hasnew/templates/layout.html rename to hasnew/templates/layout.html.jinja2 index f620664..eb07083 100644 --- a/hasnew/templates/layout.html +++ b/hasnew/templates/layout.html.jinja2 @@ -1,5 +1,5 @@ -{% extends "baseframe.html" -%} -{% from "baseframe/components.html" import flash_messages with context %} +{% extends "baseframe.html.jinja2" -%} +{% from "baseframe/components.html.jinja2" import flash_messages with context %} {% block messages %}{# Don't use baseframe's messages #}{% endblock %} {% block baseheadline %}{# Don't use baseframe's headline #}{% endblock %} diff --git a/hasnew/templates/macros.html b/hasnew/templates/macros.html.jinja2 similarity index 100% rename from hasnew/templates/macros.html rename to hasnew/templates/macros.html.jinja2 diff --git a/hasnew/templates/post.html b/hasnew/templates/post.html.jinja2 similarity index 81% rename from hasnew/templates/post.html rename to hasnew/templates/post.html.jinja2 index 17e8a9f..0bee17b 100644 --- a/hasnew/templates/post.html +++ b/hasnew/templates/post.html.jinja2 @@ -1,5 +1,5 @@ -{% extends "layout.html" %} -{% from "commentease/macros.html" import comments, ajaxcomments %} +{% extends "layout.html.jinja2" %} +{% from "commentease/macros.html.jinja2" import comments, ajaxcomments %} {% block title %}{{ post.title }}{% endblock %} {% block content %} {%- if post.url %} diff --git a/hasnew/templates/profile.html b/hasnew/templates/profile.html.jinja2 similarity index 61% rename from hasnew/templates/profile.html rename to hasnew/templates/profile.html.jinja2 index 3ca3275..b46649c 100644 --- a/hasnew/templates/profile.html +++ b/hasnew/templates/profile.html.jinja2 @@ -1,5 +1,5 @@ -{% extends "layout.html" %} -{% from "macros.html" import postlist %} +{% extends "layout.html.jinja2" %} +{% from "macros.html.jinja2" import postlist %} {% block title %}{{ profile.title }}{% endblock %} {% block content %} {{ postlist(profile.posts, profile=profile) }} diff --git a/hasnew/views/index.py b/hasnew/views/index.py index ae81e70..3a539fe 100644 --- a/hasnew/views/index.py +++ b/hasnew/views/index.py @@ -6,7 +6,7 @@ @app.route('/') -@render_with('index.html') +@render_with('index.html.jinja2') def index(): posts = Post.query.order_by(Post.created_at.desc()).limit(100).all() return {'posts': posts} diff --git a/hasnew/views/post.py b/hasnew/views/post.py index fd81724..75b24ac 100644 --- a/hasnew/views/post.py +++ b/hasnew/views/post.py @@ -9,7 +9,7 @@ @app.route('//') -@render_with('post.html') +@render_with('post.html.jinja2') @load_models( (Profile, {'name': 'profile'}, 'profile'), (Post, {'url_name': 'post', 'profile': 'profile'}, 'post') diff --git a/hasnew/views/profile.py b/hasnew/views/profile.py index 9434033..20050ae 100644 --- a/hasnew/views/profile.py +++ b/hasnew/views/profile.py @@ -7,7 +7,7 @@ @app.route('/') -@render_with('profile.html') +@render_with('profile.html.jinja2') @load_model(Profile, {'name': 'profile'}, 'profile') def profile_view(profile): if g.user: