Browse Source

front page gets 6 random tools

joel
Simon Bowie 2 years ago
parent
commit
cef5f7332d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      web/app/main.py

+ 1
- 1
web/app/main.py View File

# route for index page # route for index page
@main.route('/') @main.route('/')
def index(): def index():
tools = Resource.query.filter_by(type='tool').order_by(func.random()).limit(5).all()
tools = Resource.query.filter_by(type='tool').order_by(func.random()).limit(6).all()
with open('content/home.md', 'r') as f: with open('content/home.md', 'r') as f:
text = f.read() text = f.read()
text = markdown.markdown(text) text = markdown.markdown(text)

Loading…
Cancel
Save