Figured out Templatesflask --debug run People can now change code and upload it without needing a code editor.
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
{% include 'logo.html' %}
|
||||
{% block content %}
|
||||
<h2>You're currently accessing {{ session.school }}.</h2>
|
||||
<h2>Instructions</h2>
|
||||
<h2> </h2>
|
||||
<div class="instructions-list">
|
||||
<div class="instructions-left">
|
||||
<ul>
|
||||
|
||||
@ -1,9 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<header class="header">
|
||||
|
||||
<form class="navbutton" >
|
||||
<form class="navbutton"
|
||||
id="render_home"
|
||||
action="{{ url_for('render_home')}}"
|
||||
method="post">
|
||||
<a class="navoption"
|
||||
href="{{ url_for('render_home')}}"
|
||||
onclick="document.forms['render_home'].submit()"
|
||||
style="cursor:pointer;">
|
||||
<i class="ri-home-line card__icon"></i>
|
||||
<p class="navselection">Home</p>
|
||||
@ -23,23 +26,11 @@
|
||||
</form>
|
||||
|
||||
<form class="navbutton"
|
||||
id="bulk_courses_to_groups"
|
||||
action="{{ url_for('bulk_courses_to_groups')}}"
|
||||
id="load_templates"
|
||||
action="{{ url_for('load_templates')}}"
|
||||
method="post">
|
||||
<a class="navoption"
|
||||
onclick="document.forms['bulk_add_course_groups'].submit()"
|
||||
style="cursor:pointer;">
|
||||
<i class="ri-car-line card__icon"></i>
|
||||
<p class="navselection">Add Courses</p>
|
||||
</a>
|
||||
</form>
|
||||
|
||||
<form class="navbutton"
|
||||
id="templates"
|
||||
action="{{ url_for('templates')}}"
|
||||
method="post">
|
||||
<a class="navoption"
|
||||
onclick="document.forms['templates'].submit()"
|
||||
onclick="document.forms['load_templates'].submit()"
|
||||
style="cursor:pointer;">
|
||||
<i class="ri-car-line card__icon"></i>
|
||||
<p class="navselection">Templates</p>
|
||||
|
||||
8
app/templates/home.html
Normal file
8
app/templates/home.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
{% include 'head.html' %}
|
||||
{% include 'header.html' %}
|
||||
{% include 'logo.html' %}
|
||||
{% block content %}
|
||||
<h2>Academy: {{ session.school }}.</h2>
|
||||
|
||||
{% endblock %}
|
||||
47
app/templates/templates.html
Normal file
47
app/templates/templates.html
Normal file
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
{% include 'head.html' %}
|
||||
{% include 'header.html' %}
|
||||
{% include 'logo.html' %}
|
||||
<p> </p>
|
||||
{% if error %}
|
||||
<h3>{{ error }}</h4>
|
||||
{% endif %}
|
||||
{% if templates %}
|
||||
<h2> Here are the liquid templates </h2>
|
||||
{% endif %}
|
||||
<div class="templates_display" >
|
||||
{% for templates in templates %}
|
||||
<p> </p>
|
||||
<div class="html_code">
|
||||
<form
|
||||
id="templates"
|
||||
action="{{ url_for('templates')}}"
|
||||
method="post">
|
||||
<h2>
|
||||
{{ templates[0] }}
|
||||
</h2>
|
||||
<textarea
|
||||
placeholder={{ templates[0] }}
|
||||
id="body"
|
||||
name="body"
|
||||
rows="35"
|
||||
cols="100">
|
||||
{{ templates[1] }}
|
||||
</textarea>
|
||||
<p> </p>
|
||||
<label for="template_name">
|
||||
Create New Template (optional):
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="template_name"
|
||||
value="{{ templates[0] }}">
|
||||
</input>
|
||||
<p> </p>
|
||||
<input type="submit" name="submit_template" value="Submit Template"</input>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<p> </p>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user