commit: 7076144ff03e38dcf837bd774c6c19ca49f2c047
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 18 23:15:19 2016 +0000
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Dec 18 23:15:19 2016 +0000
URL: https://gitweb.gentoo.org/proj/grumpy.git/commit/?id=7076144f
frontend: move setup to a separate view class
backend/__init__.py | 1 +
frontend/__init__.py | 6 +++---
frontend/grumpy.py | 3 ++-
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 = []