]> git.aero2k.de Git - sirius.git/commitdiff
Move claim web handler to landing.py
authorTom Hunger <tehunger@gmail.com>
Wed, 14 Jan 2015 15:47:48 +0000 (15:47 +0000)
committerTom Hunger <tehunger@gmail.com>
Wed, 14 Jan 2015 18:32:02 +0000 (18:32 +0000)
This makes more sense structurally.

sirius/web/landing.py
sirius/web/printer_overview.py
sirius/web/templates/overview.html

index 55d8b63e7807b385f8fca574a9529fe167294c30..b5c8bd0220d788fec2037490c1871009246225eb 100644 (file)
@@ -21,3 +21,14 @@ def overview():
         'overview.html',
         my_printers=my_printers,
     )
+
+
+@blueprint.route('/<int:user_id>/<username>/claim')
+@login.login_required
+def claim(user_id, username):
+    assert user_id == login.current_user.id
+    assert username == login.current_user.username
+
+    return flask.render_template(
+        'claim.html',
+    )
index 5eb15f391dcca605746705496fd850ca6b86f73a..ad74eb54ae92fe608f1282d38ac1e1cd2f563a17 100644 (file)
@@ -19,14 +19,3 @@ def printer_overview(user_id, username, printer_id):
         'printer_overview.html',
         printer=printer,
     )
-
-
-@blueprint.route('/<int:user_id>/<username>/claim')
-@login.login_required
-def claim(user_id, username):
-    assert user_id == login.current_user.id
-    assert username == login.current_user.username
-
-    return flask.render_template(
-        'claim.html',
-    )
index 5f6bf36da20e99901500a4e41f09aa6f85afdece..9afe17a2e1be520b1737b7121cdd3cd604758c2f 100644 (file)
@@ -7,7 +7,7 @@
 {% if not my_printers %}
 <div>
        No printers yet -
-       <a href="{{ url_for('printer_overview.claim',
+       <a href="{{ url_for('landing.claim',
                          user_id=current_user.id,
                          username=current_user.username) }}">
                claim one here