forked from Ugric/Komodo-Hub
updated config.ini, removed unnecessary lines from species.jinja
This commit is contained in:
1 parent
e28a269abf
commit
73d73e9b69
3 files changed
+3
-5
No files matched your search
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
[homepage]
|
[featured_species]
|
||||||
species1 = Sumatran Tiger
|
species1 = Sumatran Tiger
|
||||||
species2 = Javan Rhinoceros
|
species2 = Javan Rhinoceros
|
||||||
species3 = Bali Myna
|
species3 = Bali Myna
|
||||||
|
|||||||
@@ -14,9 +14,7 @@ Species Database
|
|||||||
{# If you want to change the featured species please do so in config.ini - CS #}
|
{# If you want to change the featured species please do so in config.ini - CS #}
|
||||||
{{featured_species_section(featured_species, False)}}
|
{{featured_species_section(featured_species, False)}}
|
||||||
{# All Species #}
|
{# All Species #}
|
||||||
<div>
|
{{search_bar("/species/search")}}
|
||||||
{{search_bar("/species/search")}}
|
|
||||||
</div>
|
|
||||||
<h2 style="text-align: center; margin-top: 30px;">All Species</h2>
|
<h2 style="text-align: center; margin-top: 30px;">All Species</h2>
|
||||||
{{display_all_items(species)}}
|
{{display_all_items(species)}}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -5,7 +5,7 @@ from database.db_commands import get_species_by_name
|
|||||||
def featured_species_function(config_file):
|
def featured_species_function(config_file):
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read(config_file)
|
config.read(config_file)
|
||||||
featured_species_list = list(dict(config["homepage"]).values())
|
featured_species_list = list(dict(config["featured_species"]).values())
|
||||||
featured_species = []
|
featured_species = []
|
||||||
for species in featured_species_list:
|
for species in featured_species_list:
|
||||||
featured_species.append(get_species_by_name(species))
|
featured_species.append(get_species_by_name(species))
|
||||||
|
|||||||
Reference in new issue
Block a user