From 177db071d8ce0c176e1fa537b7939926c344a19f Mon Sep 17 00:00:00 2001 From: Stephanie Br Date: Thu, 12 Oct 2017 14:46:26 +0530 Subject: [PATCH 1/6] rename .html to .html.jinja2 --- geekup/templates/{404.html => 404.html.jinja2} | 0 .../{accesskey.html => accesskey.html.jinja2} | 0 .../{approve.html => approve.html.jinja2} | 0 .../{confirm.html => confirm.html.jinja2} | 0 .../{datatable.html => datatable.html.jinja2} | 0 geekup/templates/{event.html => event.html.jinja2} | 0 geekup/templates/{index.html => index.html.jinja2} | 0 .../templates/{layout.html => layout.html.jinja2} | 0 .../templates/{macros.html => macros.html.jinja2} | 0 ...{participants.html => participants.html.jinja2} | 0 .../{regform.html => regform.html.jinja2} | 0 .../{regsuccess.html => regsuccess.html.jinja2} | 0 geekup/templates/{rsvp.html => rsvp.html.jinja2} | 0 .../{rsvpform.html => rsvpform.html.jinja2} | 0 .../{rsvpsuccess.html => rsvpsuccess.html.jinja2} | 0 geekup/templates/{stats.html => stats.html.jinja2} | 0 .../{venuereg.html => venuereg.html.jinja2} | 0 ...regdetails.html => venueregdetails.html.jinja2} | 0 ...{venueregform.html => venueregform.html.jinja2} | 0 .../{venueregnew.html => venueregnew.html.jinja2} | 0 ...regsuccess.html => venueregsuccess.html.jinja2} | 0 .../{venuesheet.html => venuesheet.html.jinja2} | 0 geekup/views/errors.py | 2 +- geekup/views/user.py | 14 +++++++------- 24 files changed, 8 insertions(+), 8 deletions(-) rename geekup/templates/{404.html => 404.html.jinja2} (100%) rename geekup/templates/{accesskey.html => accesskey.html.jinja2} (100%) rename geekup/templates/{approve.html => approve.html.jinja2} (100%) rename geekup/templates/{confirm.html => confirm.html.jinja2} (100%) rename geekup/templates/{datatable.html => datatable.html.jinja2} (100%) rename geekup/templates/{event.html => event.html.jinja2} (100%) rename geekup/templates/{index.html => index.html.jinja2} (100%) rename geekup/templates/{layout.html => layout.html.jinja2} (100%) rename geekup/templates/{macros.html => macros.html.jinja2} (100%) rename geekup/templates/{participants.html => participants.html.jinja2} (100%) rename geekup/templates/{regform.html => regform.html.jinja2} (100%) rename geekup/templates/{regsuccess.html => regsuccess.html.jinja2} (100%) rename geekup/templates/{rsvp.html => rsvp.html.jinja2} (100%) rename geekup/templates/{rsvpform.html => rsvpform.html.jinja2} (100%) rename geekup/templates/{rsvpsuccess.html => rsvpsuccess.html.jinja2} (100%) rename geekup/templates/{stats.html => stats.html.jinja2} (100%) rename geekup/templates/{venuereg.html => venuereg.html.jinja2} (100%) rename geekup/templates/{venueregdetails.html => venueregdetails.html.jinja2} (100%) rename geekup/templates/{venueregform.html => venueregform.html.jinja2} (100%) rename geekup/templates/{venueregnew.html => venueregnew.html.jinja2} (100%) rename geekup/templates/{venueregsuccess.html => venueregsuccess.html.jinja2} (100%) rename geekup/templates/{venuesheet.html => venuesheet.html.jinja2} (100%) diff --git a/geekup/templates/404.html b/geekup/templates/404.html.jinja2 similarity index 100% rename from geekup/templates/404.html rename to geekup/templates/404.html.jinja2 diff --git a/geekup/templates/accesskey.html b/geekup/templates/accesskey.html.jinja2 similarity index 100% rename from geekup/templates/accesskey.html rename to geekup/templates/accesskey.html.jinja2 diff --git a/geekup/templates/approve.html b/geekup/templates/approve.html.jinja2 similarity index 100% rename from geekup/templates/approve.html rename to geekup/templates/approve.html.jinja2 diff --git a/geekup/templates/confirm.html b/geekup/templates/confirm.html.jinja2 similarity index 100% rename from geekup/templates/confirm.html rename to geekup/templates/confirm.html.jinja2 diff --git a/geekup/templates/datatable.html b/geekup/templates/datatable.html.jinja2 similarity index 100% rename from geekup/templates/datatable.html rename to geekup/templates/datatable.html.jinja2 diff --git a/geekup/templates/event.html b/geekup/templates/event.html.jinja2 similarity index 100% rename from geekup/templates/event.html rename to geekup/templates/event.html.jinja2 diff --git a/geekup/templates/index.html b/geekup/templates/index.html.jinja2 similarity index 100% rename from geekup/templates/index.html rename to geekup/templates/index.html.jinja2 diff --git a/geekup/templates/layout.html b/geekup/templates/layout.html.jinja2 similarity index 100% rename from geekup/templates/layout.html rename to geekup/templates/layout.html.jinja2 diff --git a/geekup/templates/macros.html b/geekup/templates/macros.html.jinja2 similarity index 100% rename from geekup/templates/macros.html rename to geekup/templates/macros.html.jinja2 diff --git a/geekup/templates/participants.html b/geekup/templates/participants.html.jinja2 similarity index 100% rename from geekup/templates/participants.html rename to geekup/templates/participants.html.jinja2 diff --git a/geekup/templates/regform.html b/geekup/templates/regform.html.jinja2 similarity index 100% rename from geekup/templates/regform.html rename to geekup/templates/regform.html.jinja2 diff --git a/geekup/templates/regsuccess.html b/geekup/templates/regsuccess.html.jinja2 similarity index 100% rename from geekup/templates/regsuccess.html rename to geekup/templates/regsuccess.html.jinja2 diff --git a/geekup/templates/rsvp.html b/geekup/templates/rsvp.html.jinja2 similarity index 100% rename from geekup/templates/rsvp.html rename to geekup/templates/rsvp.html.jinja2 diff --git a/geekup/templates/rsvpform.html b/geekup/templates/rsvpform.html.jinja2 similarity index 100% rename from geekup/templates/rsvpform.html rename to geekup/templates/rsvpform.html.jinja2 diff --git a/geekup/templates/rsvpsuccess.html b/geekup/templates/rsvpsuccess.html.jinja2 similarity index 100% rename from geekup/templates/rsvpsuccess.html rename to geekup/templates/rsvpsuccess.html.jinja2 diff --git a/geekup/templates/stats.html b/geekup/templates/stats.html.jinja2 similarity index 100% rename from geekup/templates/stats.html rename to geekup/templates/stats.html.jinja2 diff --git a/geekup/templates/venuereg.html b/geekup/templates/venuereg.html.jinja2 similarity index 100% rename from geekup/templates/venuereg.html rename to geekup/templates/venuereg.html.jinja2 diff --git a/geekup/templates/venueregdetails.html b/geekup/templates/venueregdetails.html.jinja2 similarity index 100% rename from geekup/templates/venueregdetails.html rename to geekup/templates/venueregdetails.html.jinja2 diff --git a/geekup/templates/venueregform.html b/geekup/templates/venueregform.html.jinja2 similarity index 100% rename from geekup/templates/venueregform.html rename to geekup/templates/venueregform.html.jinja2 diff --git a/geekup/templates/venueregnew.html b/geekup/templates/venueregnew.html.jinja2 similarity index 100% rename from geekup/templates/venueregnew.html rename to geekup/templates/venueregnew.html.jinja2 diff --git a/geekup/templates/venueregsuccess.html b/geekup/templates/venueregsuccess.html.jinja2 similarity index 100% rename from geekup/templates/venueregsuccess.html rename to geekup/templates/venueregsuccess.html.jinja2 diff --git a/geekup/templates/venuesheet.html b/geekup/templates/venuesheet.html.jinja2 similarity index 100% rename from geekup/templates/venuesheet.html rename to geekup/templates/venuesheet.html.jinja2 diff --git a/geekup/views/errors.py b/geekup/views/errors.py index 2e94ec3..30e91b9 100644 --- a/geekup/views/errors.py +++ b/geekup/views/errors.py @@ -7,4 +7,4 @@ @app.errorhandler(404) def page_not_found(e): - return render_template('404.html'), 404 + return render_template('404.html.jinja2'), 404 diff --git a/geekup/views/user.py b/geekup/views/user.py index 7a6c5eb..0e6a2b1 100755 --- a/geekup/views/user.py +++ b/geekup/views/user.py @@ -55,7 +55,7 @@ def eventpage(year, eventname, regform=None): 'venue_description': Markup(event.venue.description), 'venue_address': Markup(event.venue.address), } - return render_template('event.html', **context) + return render_template('event.html.jinja2', **context) @app.route('//', methods=['POST']) @@ -80,10 +80,10 @@ def register(year, eventname): mail.send(msg) participant.email_sent = True db.session.commit() - return render_template('regsuccess.html') + return render_template('regsuccess.html.jinja2') else: if request.is_xhr: - return render_template('regform.html', + return render_template('regform.html.jinja2', regform=form, ajax_re_register=True) else: flash("Please check your details and try again.", 'error') @@ -106,7 +106,7 @@ def confirm_email(pid, key, rsvpform=None): 'rsvpform': rsvpform, 'tweet': tweet, } - return render_template('confirm.html', **context) + return render_template('confirm.html.jinja2', **context) return redirect(url_for('index')) @@ -118,7 +118,7 @@ def rsvp(pid, key): if form.validate_on_submit(): participant.rsvp = form.data['rsvp'] db.session.commit() - return render_template('rsvpsuccess.html') + return render_template('rsvpsuccess.html.jinja2') else: if request.is_xhr: context = { @@ -126,7 +126,7 @@ def rsvp(pid, key): 'participant': participant, 'ajax_re_register': True, } - return render_template('rsvpform.html', **context) + return render_template('rsvpform.html.jinja2', **context) else: flash("Please check your details and try again.", 'error') return confirm_email(pid, key, rsvpform=form) @@ -146,4 +146,4 @@ def participant_list(year, eventname): 'confirmed_participants': [participant for participant in participants if participant.email_status], 'unconfirmed_participants': [participant for participant in participants if not participant.email_status], } - return render_template('participants.html', **context) + return render_template('participants.html.jinja2', **context) From 76415f0794f17d89e53368fc983a1fa379cb2283 Mon Sep 17 00:00:00 2001 From: Stephanie Br Date: Thu, 12 Oct 2017 15:41:13 +0530 Subject: [PATCH 2/6] renaming .html to .html.jinja2 --- geekup/templates/404.html.jinja2 | 4 ++-- geekup/templates/accesskey.html.jinja2 | 4 ++-- geekup/templates/approve.html.jinja2 | 2 +- geekup/templates/confirm.html.jinja2 | 10 +++++----- geekup/templates/datatable.html.jinja2 | 2 +- geekup/templates/event.html.jinja2 | 8 ++++---- geekup/templates/index.html.jinja2 | 6 +++--- geekup/templates/layout.html.jinja2 | 4 ++-- geekup/templates/participants.html.jinja2 | 4 ++-- geekup/templates/regform.html.jinja2 | 2 +- geekup/templates/rsvp.html.jinja2 | 4 ++-- geekup/templates/rsvpform.html.jinja2 | 2 +- geekup/templates/stats.html.jinja2 | 4 ++-- geekup/templates/venuereg.html.jinja2 | 2 +- geekup/templates/venueregdetails.html.jinja2 | 2 +- geekup/templates/venueregnew.html.jinja2 | 6 +++--- geekup/templates/venuesheet.html.jinja2 | 2 +- 17 files changed, 34 insertions(+), 34 deletions(-) diff --git a/geekup/templates/404.html.jinja2 b/geekup/templates/404.html.jinja2 index d55cbfe..05f2bfd 100644 --- a/geekup/templates/404.html.jinja2 +++ b/geekup/templates/404.html.jinja2 @@ -1,5 +1,5 @@ -{% extends "layout.html" %} -{% from 'macros.html' import ajaxform %} +{% extends "layout.html.jinja2" %} +{% from 'macros.html.jinja2' import ajaxform %} {% block title %}This page does not exist{% endblock %} {% block content %}

This page does not exist

diff --git a/geekup/templates/accesskey.html.jinja2 b/geekup/templates/accesskey.html.jinja2 index bc6a719..0414a6a 100644 --- a/geekup/templates/accesskey.html.jinja2 +++ b/geekup/templates/accesskey.html.jinja2 @@ -1,6 +1,6 @@ {# Render a form asking for the access key #} -{% extends "layout.html" %} -{% from 'macros.html' import renderform %} +{% extends "layout.html.jinja2" %} +{% from 'macros.html.jinja2' import renderform %} {% block title %}Access Key Required{% endblock %} {% block header %} diff --git a/geekup/templates/approve.html.jinja2 b/geekup/templates/approve.html.jinja2 index 697443a..38c561c 100644 --- a/geekup/templates/approve.html.jinja2 +++ b/geekup/templates/approve.html.jinja2 @@ -1,5 +1,5 @@ {# Approve participants #} -{% extends "layout.html" %} +{% extends "layout.html.jinja2" %} {% block title %}Approve Participants{% endblock %} {% block header %} diff --git a/geekup/templates/confirm.html.jinja2 b/geekup/templates/confirm.html.jinja2 index 6016793..efc21f9 100644 --- a/geekup/templates/confirm.html.jinja2 +++ b/geekup/templates/confirm.html.jinja2 @@ -1,4 +1,4 @@ -{% extends "layout.html" %} +{% extends "layout.html.jinja2" %} {% block title %}{{ participant.event.title|e }}{% endblock %} {% block header %} @@ -13,7 +13,7 @@ #container, footer { max-width: 100%; } - + footer { text-align: left; } @@ -26,17 +26,17 @@
-{% include 'rsvpform.html' %} +{% include 'rsvpform.html.jinja2' %}
{% endblock %} {% block footerscripts %} -{% from "macros.html" import ajaxform -%} +{% from "macros.html.jinja2" import ajaxform -%} {{ ajaxform('regform', request, True) }} -{% from "macros.html" import ajaxform %} +{% from "macros.html.jinja2" import ajaxform %} {{ ajaxform('rsvpform', request, True) }} {% endblock %} diff --git a/geekup/templates/datatable.html.jinja2 b/geekup/templates/datatable.html.jinja2 index 8c7aee5..d22b195 100644 --- a/geekup/templates/datatable.html.jinja2 +++ b/geekup/templates/datatable.html.jinja2 @@ -1,5 +1,5 @@ {# Render a data table. Nothing fancy #} -{% extends "layout.html" %} +{% extends "layout.html.jinja2" %} {% block title %}{{ title|e }}{% endblock %} {% block header %} diff --git a/geekup/templates/event.html.jinja2 b/geekup/templates/event.html.jinja2 index 0aab74f..936206c 100644 --- a/geekup/templates/event.html.jinja2 +++ b/geekup/templates/event.html.jinja2 @@ -1,5 +1,5 @@ -{% extends "layout.html" %} -{% from 'macros.html' import ajaxform, render_schedule %} +{% extends "layout.html.jinja2" %} +{% from 'macros.html.jinja2' import ajaxform, render_schedule %} {% block title %}{{ event.title }}{% endblock %} {% block main %}
@@ -51,7 +51,7 @@

- {% include 'regform.html' %} + {% include 'regform.html.jinja2' %}
{% endif %} @@ -87,7 +87,7 @@ {% block footerscripts %} -{% from "macros.html" import ajaxform -%} +{% from "macros.html.jinja2" import ajaxform -%} {{ ajaxform('regform', request, True) }}