Skip to content

Commit

Permalink
Make .html to .html.jinja2 rename seamless (#104, #166) (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
jace authored Oct 11, 2017
1 parent d86048d commit 5740ed9
Show file tree
Hide file tree
Showing 22 changed files with 45 additions and 15 deletions.
2 changes: 1 addition & 1 deletion baseframe/templates/403.html.jinja2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "layout.html" %}
{% extends "layout.html.jinja2" %}
{% block title %}{% trans %}Access denied{% endtrans %}{% endblock %}

{% block content %}
Expand Down
2 changes: 1 addition & 1 deletion baseframe/templates/404.html.jinja2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "layout.html" %}
{% extends "layout.html.jinja2" %}
{% block title %}{% trans %}Not Found{% endtrans %}{% endblock %}

{% block content %}
Expand Down
2 changes: 1 addition & 1 deletion baseframe/templates/500.html.jinja2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "layout.html" %}
{% extends "layout.html.jinja2" %}
{% block title %}{% trans %}Internal Server Error{% endtrans %}{% endblock %}

{% block content %}
Expand Down
2 changes: 1 addition & 1 deletion baseframe/templates/baseframe.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{# DEPRECATED: This template is due to be be removed. Use the referenced template directly. #}
{% extends "baseframe/bootstrap3/baseframe.html.jinja2" %}
{% extends "baseframe.html.jinja2" %}
5 changes: 5 additions & 0 deletions baseframe/templates/baseframe.html.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{%- if config['theme'] == 'mui' %}
{%- extends 'baseframe/mui/baseframe.html.jinja2' %}
{%- else %}
{% extends 'baseframe/bootstrap3/baseframe.html.jinja2' %}
{%- endif %}
2 changes: 1 addition & 1 deletion baseframe/templates/baseframe/components.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{# DEPRECATED: This template is due to be be removed. Use the referenced template directly. #}
{% extends "baseframe/bootstrap3/components.html.jinja2" %}
{% extends "baseframe/components.html.jinja2" %}
5 changes: 5 additions & 0 deletions baseframe/templates/baseframe/components.html.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{%- if config['theme'] == 'mui' %}
{%- extends 'baseframe/mui/components.html.jinja2' %}
{%- else %}
{% extends 'baseframe/bootstrap3/components.html.jinja2' %}
{%- endif %}
2 changes: 1 addition & 1 deletion baseframe/templates/baseframe/forms.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{# DEPRECATED: This template is due to be be removed. Use the referenced template directly. #}
{% extends "baseframe/bootstrap3/forms.html.jinja2" %}
{% extends "baseframe/forms.html.jinja2" %}
5 changes: 5 additions & 0 deletions baseframe/templates/baseframe/forms.html.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{%- if config['theme'] == 'mui' %}
{%- extends 'baseframe/mui/forms.html.jinja2' %}
{%- else %}
{% extends 'baseframe/bootstrap3/forms.html.jinja2' %}
{%- endif %}
2 changes: 1 addition & 1 deletion baseframe/templates/baseframe/mui/autoform.html.jinja2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "baseframe/mui/formlayout.html.jinja2" %}
{% extends "formlayout.html.jinja2" %}
{% from "baseframe/mui/forms.html.jinja2" import renderform, ajaxform, widget_ext_scripts, widgetscripts %}

{% block content %}
Expand Down
2 changes: 1 addition & 1 deletion baseframe/templates/baseframe/mui/delete.html.jinja2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "layout.html" %}
{% extends "layout.html.jinja2" %}

{% block content %}
<div class="grid">
Expand Down
2 changes: 1 addition & 1 deletion baseframe/templates/baseframe/mui/formlayout.html.jinja2
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{% extends "layout.html" -%}
{% extends "layout.html.jinja2" -%}
2 changes: 1 addition & 1 deletion baseframe/templates/baseframe/mui/message.html.jinja2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "baseframe/mui/formlayout.html.jinja2" %}
{% extends "formlayout.html.jinja2" %}

{% block content %}
<p>{{ message }}</p>
Expand Down
2 changes: 1 addition & 1 deletion baseframe/templates/baseframe/networkbar.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{# DEPRECATED: This template is due to be be removed. Use the referenced template directly. #}
{% extends "baseframe/bootstrap3/networkbar.html.jinja2" %}
{% extends "baseframe/networkbar.html.jinja2" %}
5 changes: 5 additions & 0 deletions baseframe/templates/baseframe/networkbar.html.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{%- if config['theme'] == 'mui' %}
{%- extends 'baseframe/mui/networkbar.html.jinja2' %}
{%- else %}
{% extends 'baseframe/bootstrap3/networkbar.html.jinja2' %}
{%- endif %}
File renamed without changes.
2 changes: 1 addition & 1 deletion baseframe/templates/formlayout.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{# DEPRECATED: This template is due to be be removed. Use the referenced template directly. #}
{% extends "baseframe/bootstrap3/formlayout.html.jinja2" %}
{% extends "formlayout.html.jinja2" %}
5 changes: 5 additions & 0 deletions baseframe/templates/formlayout.html.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{%- if config['theme'] == 'mui' %}
{%- extends 'baseframe/mui/formlayout.html.jinja2' %}
{%- else %}
{% extends 'baseframe/bootstrap3/formlayout.html.jinja2' %}
{%- endif %}
2 changes: 1 addition & 1 deletion baseframe/templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{# DEPRECATED: This template is due to be be removed. Use the referenced template directly. #}
{% extends "baseframe/bootstrap3/layout.html.jinja2" %}
{% extends "layout.html.jinja2" %}
5 changes: 5 additions & 0 deletions baseframe/templates/layout.html.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{%- if config['theme'] == 'mui' %}
{%- extends 'baseframe/mui/layout.html.jinja2' %}
{%- else %}
{% extends 'baseframe/bootstrap3/layout.html.jinja2' %}
{%- endif %}
File renamed without changes.
4 changes: 2 additions & 2 deletions baseframe/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ def robots(subdomain=None):
@baseframe.route('/api/baseframe/1/toastr_messages.js', subdomain='<subdomain>')
@baseframe.route('/api/baseframe/1/toastr_messages.js', defaults={'subdomain': None})
def toastr_messages_js(subdomain=None):
return current_app.response_class(render_template('toastr_messages.js'), mimetype='application/javascript')
return current_app.response_class(render_template('toastr_messages.js.jinja2'), mimetype='application/javascript')


@baseframe.route('/api/baseframe/1/editor.css', subdomain='<subdomain>')
@baseframe.route('/api/baseframe/1/editor.css', defaults={'subdomain': None})
def editorcss(subdomain=None):
response = current_app.response_class(render_template('editor.css'),
response = current_app.response_class(render_template('editor.css.jinja2'),
mimetype='text/css',
headers={'Expires': (datetime.utcnow() + timedelta(minutes=60)).strftime('%a, %d %b %Y %H:%M:%S GMT')})
return response
Expand Down

0 comments on commit 5740ed9

Please sign in to comment.