forked from Ugric/Komodo-Hub
Merge branch 'main' of https://git.wbell.dev/Ugric/Komodo-Hub
This commit is contained in:
commit
944d4ee8a3
6 files changed
+26
-6
No files matched your search
@@ -5,4 +5,4 @@ page = Blueprint('error', __name__, url_prefix='/error')
|
||||
|
||||
@page.route('/')
|
||||
def error():
|
||||
return render_template('error.jinja')
|
||||
return render_template("error.jinja")
|
||||
@@ -13,8 +13,7 @@ def animal_from_database(species_id):
|
||||
SELECT species_id,
|
||||
species_english,
|
||||
species_latin,
|
||||
body_text,
|
||||
created_at
|
||||
body_text
|
||||
FROM species
|
||||
WHERE species_english = ?
|
||||
""",
|
||||
@@ -27,7 +26,7 @@ def animal_from_database(species_id):
|
||||
|
||||
|
||||
# animal_from_database expects five variables:
|
||||
# id, english_name, latin_name, body_text and created_at
|
||||
# id, english_name, latin_name, body_text and
|
||||
# if this needs changing feel free to adjust but...
|
||||
# species_information.jinja does expect english_name, latin_name and main_text
|
||||
# this page works by taking the "species_id" from the url and using that to
|
||||
@@ -44,7 +43,7 @@ def animal_from_database(species_id):
|
||||
def data(species_id):
|
||||
try:
|
||||
database_entry = animal_from_database(species_id)
|
||||
var1, var2, latin_name, body_text, var5 = database_entry
|
||||
var1, var2, latin_name, body_text = database_entry
|
||||
return render_template(
|
||||
"species_information/species_information.jinja",
|
||||
english_name=var2,
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
from flask import render_template, Blueprint
|
||||
|
||||
species_portal = Blueprint('species_portal', __name__, url_prefix='/species_portal')
|
||||
|
||||
@species_portal.route('/')
|
||||
def portal():
|
||||
return render_template('species_portal/species_portal.jinja')
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends "base.jinja" %}
|
||||
{% block title %}Donations{% endblock %}
|
||||
{% block title %}Error{% endblock %}
|
||||
{% block head %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{% extends "base.jinja" %}
|
||||
{% block title %} Species Upload Portal {% endblock %}
|
||||
{% block head %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% from 'button.jinja' import button %}
|
||||
<!-- Banner section -->
|
||||
<section id="hero" style="padding: 100px 20px; text-align: center;">
|
||||
<form action="/action_page.php">
|
||||
<input type="file" name="pic" accept="image/*">
|
||||
<input type="submit">
|
||||
</form>
|
||||
</section>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user