aboutsummaryrefslogtreecommitdiff
path: root/app/views/packages.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/packages.py')
-rw-r--r--app/views/packages.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/views/packages.py b/app/views/packages.py
index 10b3689..73c9edd 100644
--- a/app/views/packages.py
+++ b/app/views/packages.py
@@ -7,9 +7,21 @@ from app.models import *
@app.route('/mods/')
@menu.register_menu(app, '.mods', 'Mods')
def mods_page():
- packages = Package.query.all()
+ packages = Package.query.filter_by(type=PackageType.MOD).all()
return render_template('packages.html', title="Mods", packages=packages)
+@app.route('/games/')
+@menu.register_menu(app, '.games', 'Games')
+def games_page():
+ packages = Package.query.filter_by(type=PackageType.GAME).all()
+ return render_template('packages.html', title="Games", packages=packages)
+
+@app.route('/texturepacks/')
+@menu.register_menu(app, '.txp', 'Texture Packs')
+def txp_page():
+ packages = Package.query.filter_by(type=PackageType.TXP).all()
+ return render_template('packages.html', title="Texture Packs", packages=packages)
+
@app.route("/<type>s/<author>/<name>/")
def package_page(type, author, name):
package = Package.query.filter_by(name=name).first()