-
test rendering...
-
- {% for title in notification_titles %}
-
{{ title }}
- {% endfor %}
-
+
+
+
+
+
@@ -58,7 +57,7 @@
{{ notify['title'] }} |
{{ notify['content'] }} |
- {% for group_name in notify['groups'] %}{{ group_name }} {% endfor %}
+ {% for group_name in notify['groups'] %}{{ group_name }} {% endfor %}
|
{{ notify['create_date'] }} |
{{ notify['status'] }} |
diff --git a/web/web.py b/web/web.py
index 5516cf9..ea498b5 100755
--- a/web/web.py
+++ b/web/web.py
@@ -358,7 +358,7 @@ def notification_list():
return NotificationView.as_view()
-@app.route("/notification/create/", methods=['POST'])
+@app.route("/notification/create/", methods=['GET', 'POST'])
@administration_required
def create_notification():
return CreateNotificationView.as_view()
diff --git a/web/webViews/notification/notification.py b/web/webViews/notification/notification.py
index c978628..fe83f42 100644
--- a/web/webViews/notification/notification.py
+++ b/web/webViews/notification/notification.py
@@ -15,6 +15,13 @@ class NotificationView(normalView):
class CreateNotificationView(normalView):
+ template_path = 'create_notification.html'
+
+ @classmethod
+ def get(cls):
+ groups = dockletRequest.post('/user/groupNameList/')['groups']
+ return cls.render(cls.template_path, groups=groups)
+
@classmethod
def post(cls):
dockletRequest.post('/notification/create/', request.form)