mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-03 19:57:29 +01:00
Fix menu order
This commit is contained in:
parent
07a9b79396
commit
d17535fc78
@ -4,24 +4,30 @@ from flask.ext import menu
|
|||||||
from app import app
|
from app import app
|
||||||
from app.models import *
|
from app.models import *
|
||||||
|
|
||||||
|
|
||||||
|
# TODO: the following could be made into one route, except I'm not sure how
|
||||||
|
# to do the menu
|
||||||
|
|
||||||
@app.route('/mods/')
|
@app.route('/mods/')
|
||||||
@menu.register_menu(app, '.mods', 'Mods')
|
@menu.register_menu(app, '.mods', 'Mods', order=10)
|
||||||
def mods_page():
|
def mods_page():
|
||||||
packages = Package.query.filter_by(type=PackageType.MOD).all()
|
packages = Package.query.filter_by(type=PackageType.MOD).all()
|
||||||
return render_template('packages.html', title="Mods", packages=packages)
|
return render_template('packages.html', title="Mods", packages=packages)
|
||||||
|
|
||||||
@app.route('/games/')
|
@app.route('/games/')
|
||||||
@menu.register_menu(app, '.games', 'Games')
|
@menu.register_menu(app, '.games', 'Games', order=11)
|
||||||
def games_page():
|
def games_page():
|
||||||
packages = Package.query.filter_by(type=PackageType.GAME).all()
|
packages = Package.query.filter_by(type=PackageType.GAME).all()
|
||||||
return render_template('packages.html', title="Games", packages=packages)
|
return render_template('packages.html', title="Games", packages=packages)
|
||||||
|
|
||||||
@app.route('/texturepacks/')
|
@app.route('/texturepacks/')
|
||||||
@menu.register_menu(app, '.txp', 'Texture Packs')
|
@menu.register_menu(app, '.txp', 'Texture Packs', order=12)
|
||||||
def txp_page():
|
def txp_page():
|
||||||
packages = Package.query.filter_by(type=PackageType.TXP).all()
|
packages = Package.query.filter_by(type=PackageType.TXP).all()
|
||||||
return render_template('packages.html', title="Texture Packs", packages=packages)
|
return render_template('packages.html', title="Texture Packs", packages=packages)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/<type>s/<author>/<name>/")
|
@app.route("/<type>s/<author>/<name>/")
|
||||||
def package_page(type, author, name):
|
def package_page(type, author, name):
|
||||||
user = User.query.filter_by(username=author).first()
|
user = User.query.filter_by(username=author).first()
|
||||||
|
Loading…
Reference in New Issue
Block a user