Explorar el Código

front page gets 6 random tools

joel
Simon Bowie hace 3 años
padre
commit
cef5f7332d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      web/app/main.py

+ 1
- 1
web/app/main.py Ver fichero

# 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)

Cargando…
Cancelar
Guardar