aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2016-12-19 01:15:19 +0200
committerMart Raudsepp <leio@gentoo.org>2016-12-19 01:15:19 +0200
commit7076144ff03e38dcf837bd774c6c19ca49f2c047 (patch)
treeec0ef5b63f51cbdfe4bbbaee9f01611063089c0c
parentfrontend: Hide @gentoo.org for developers listing in /setup (diff)
downloadgrumpy-7076144ff03e38dcf837bd774c6c19ca49f2c047.tar.gz
grumpy-7076144ff03e38dcf837bd774c6c19ca49f2c047.tar.bz2
grumpy-7076144ff03e38dcf837bd774c6c19ca49f2c047.zip
frontend: move setup to a separate view class
-rw-r--r--backend/__init__.py1
-rw-r--r--frontend/__init__.py6
-rw-r--r--frontend/grumpy.py3
3 files changed, 6 insertions, 4 deletions
diff --git a/backend/__init__.py b/backend/__init__.py
index 53cefe1..f8bfd6a 100644
--- a/backend/__init__.py
+++ b/backend/__init__.py
@@ -10,5 +10,6 @@ db = SQLAlchemy(app)
from frontend import *
GrumpyView.register(app)
+SetupView.register(app)
__all__ = ["app", "db"]
diff --git a/frontend/__init__.py b/frontend/__init__.py
index 79078b8..04ee7ae 100644
--- a/frontend/__init__.py
+++ b/frontend/__init__.py
@@ -1,5 +1,5 @@
-from .grumpy import GrumpyView
+from .grumpy import GrumpyView, SetupView
__all__ = [
- "GrumpyView",
-] \ No newline at end of file
+ "GrumpyView", "SetupView",
+]
diff --git a/frontend/grumpy.py b/frontend/grumpy.py
index 0644fca..7e7a086 100644
--- a/frontend/grumpy.py
+++ b/frontend/grumpy.py
@@ -22,7 +22,8 @@ class GrumpyView(FlaskView):
categories = models.Category.query.all()
return render_template("index.html", categories=categories)
- def setup(self):
+class SetupView(FlaskView):
+ def index(self):
maintainers = models.Maintainer.query.order_by(collate(models.Maintainer.email, 'NOCASE')).all()
form = FollowSetupForm()
choices = []