Browse Source

Move description to config file

mistress
Daniel Muckerman 4 years ago
parent
commit
a29d4602b8
3 changed files with 6 additions and 2 deletions
  1. +3
    -1
      app.py
  2. +2
    -0
      config/config.yaml
  3. +1
    -1
      templates/index.j2

+ 3
- 1
app.py View File

@ -13,6 +13,8 @@ with open('config/config.yaml') as f:
search = yaml_data['search']
account_url = yaml_data['accounts']['account_url']
description = yaml_data['description']
apps = []
for itm in yaml_data['apps'].items():
apps.append(itm[1])
@ -20,7 +22,7 @@ for itm in yaml_data['apps'].items():
@app.route('/')
def index():
return render_template('index.j2', apps = apps, search = search, account_url = account_url)
return render_template('index.j2', apps = apps, search = search, account_url = account_url, description = description)
if __name__ == '__main__':

+ 2
- 0
config/config.yaml View File

@ -5,6 +5,8 @@ search:
accounts:
account_url: 'https://account.technicalincompetence.club'
description: "It turns out Technical Incompetence's amazingness is just too great for this lame internet - we need a new one to maximize our full potential. Welcome to the Technical Incompetence internet. Population - US."
apps:
chat:
name: "Rocket Chat"

+ 1
- 1
templates/index.j2 View File

@ -25,7 +25,7 @@
</div>
<br><br>
{% endif %}
<p>It turns out dCloud's amazingness is just too great for this lame internet - we need a new one to maximize our full potential. Welcome to the Technical Incompetence internet. Population - US.</p>
<p>{{ description }}</p>
<div class="row">
{% for app in apps %}
{% include "card.j2" %}

Loading…
Cancel
Save