Mercurial > kallithea
annotate rhodecode/controllers/admin/notifications.py @ 2031:82a88013a3fd
merge 1.3 into stable
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 26 Feb 2012 17:25:09 +0200 |
parents | 89efedac4e6c |
children | 64f7cf8f6a33 |
rev | line source |
---|---|
1824
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
1 # -*- coding: utf-8 -*- |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
2 """ |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
3 rhodecode.controllers.admin.notifications |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
5 |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
6 notifications controller for RhodeCode |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
7 |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
8 :created_on: Nov 23, 2010 |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
9 :author: marcink |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
10 :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com> |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
11 :license: GPLv3, see COPYING for more details. |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
12 """ |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
13 # This program is free software: you can redistribute it and/or modify |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
14 # it under the terms of the GNU General Public License as published by |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
15 # the Free Software Foundation, either version 3 of the License, or |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
16 # (at your option) any later version. |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
17 # |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
18 # This program is distributed in the hope that it will be useful, |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
21 # GNU General Public License for more details. |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
22 # |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
23 # You should have received a copy of the GNU General Public License |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
24 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
89efedac4e6c
2012 copyrights
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
25 |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
26 import logging |
1713
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
27 import traceback |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
28 |
1791
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
29 from pylons import request |
1713
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
30 from pylons import tmpl_context as c, url |
1723
64e91067b996
- refactoring to overcome poor usage of global pylons config
Marcin Kuzminski <marcin@python-works.com>
parents:
1713
diff
changeset
|
31 from pylons.controllers.util import redirect |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
32 |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
33 from rhodecode.lib.base import BaseController, render |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
34 from rhodecode.model.db import Notification |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
35 |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
36 from rhodecode.model.notification import NotificationModel |
1739
4a5b93b3bcdd
forbid notifications view for anonymous users
Marcin Kuzminski <marcin@python-works.com>
parents:
1723
diff
changeset
|
37 from rhodecode.lib.auth import LoginRequired, NotAnonymous |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
38 from rhodecode.lib import helpers as h |
1713
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
39 from rhodecode.model.meta import Session |
1723
64e91067b996
- refactoring to overcome poor usage of global pylons config
Marcin Kuzminski <marcin@python-works.com>
parents:
1713
diff
changeset
|
40 |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
41 |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
42 log = logging.getLogger(__name__) |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
43 |
1791
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
44 |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
45 class NotificationsController(BaseController): |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
46 """REST Controller styled on the Atom Publishing Protocol""" |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
47 # To properly map this controller, ensure your config/routing.py |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
48 # file has a resource setup: |
1818
cf51bbfb120e
auto white-space removal
Marcin Kuzminski <marcin@python-works.com>
parents:
1791
diff
changeset
|
49 # map.resource('notification', 'notifications', controller='_admin/notifications', |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
50 # path_prefix='/_admin', name_prefix='_admin_') |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
51 |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
52 @LoginRequired() |
1739
4a5b93b3bcdd
forbid notifications view for anonymous users
Marcin Kuzminski <marcin@python-works.com>
parents:
1723
diff
changeset
|
53 @NotAnonymous() |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
54 def __before__(self): |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
55 super(NotificationsController, self).__before__() |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
56 |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
57 def index(self, format='html'): |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
58 """GET /_admin/notifications: All items in the collection""" |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
59 # url('notifications') |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
60 c.user = self.rhodecode_user |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
61 c.notifications = NotificationModel()\ |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
62 .get_for_user(self.rhodecode_user.user_id) |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
63 return render('admin/notifications/notifications.html') |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
64 |
1791
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
65 def mark_all_read(self): |
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
66 if request.environ.get('HTTP_X_PARTIAL_XHR'): |
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
67 nm = NotificationModel() |
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
68 # mark all read |
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
69 nm.mark_all_read_for_user(self.rhodecode_user.user_id) |
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
70 Session.commit() |
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
71 c.user = self.rhodecode_user |
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
72 c.notifications = nm.get_for_user(self.rhodecode_user.user_id) |
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
73 return render('admin/notifications/notifications_data.html') |
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1739
diff
changeset
|
74 |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
75 def create(self): |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
76 """POST /_admin/notifications: Create a new item""" |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
77 # url('notifications') |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
78 |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
79 def new(self, format='html'): |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
80 """GET /_admin/notifications/new: Form to create a new item""" |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
81 # url('new_notification') |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
82 |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
83 def update(self, notification_id): |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
84 """PUT /_admin/notifications/id: Update an existing item""" |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
85 # Forms posted to this method should contain a hidden field: |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
86 # <input type="hidden" name="_method" value="PUT" /> |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
87 # Or using helpers: |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
88 # h.form(url('notification', notification_id=ID), |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
89 # method='put') |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
90 # url('notification', notification_id=ID) |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
91 |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
92 def delete(self, notification_id): |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
93 """DELETE /_admin/notifications/id: Delete an existing item""" |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
94 # Forms posted to this method should contain a hidden field: |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
95 # <input type="hidden" name="_method" value="DELETE" /> |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
96 # Or using helpers: |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
97 # h.form(url('notification', notification_id=ID), |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
98 # method='delete') |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
99 # url('notification', notification_id=ID) |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
100 |
1713
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
101 try: |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
102 no = Notification.get(notification_id) |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
103 owner = lambda: (no.notifications_to_users.user.user_id |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
104 == c.rhodecode_user.user_id) |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
105 if h.HasPermissionAny('hg.admin', 'repository.admin')() or owner: |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
106 NotificationModel().delete(c.rhodecode_user.user_id, no) |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
107 Session.commit() |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
108 return 'ok' |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
109 except Exception: |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
110 Session.rollback() |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
111 log.error(traceback.format_exc()) |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
112 return 'fail' |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
113 |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
114 def show(self, notification_id, format='html'): |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
115 """GET /_admin/notifications/id: Show a specific item""" |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
116 # url('notification', notification_id=ID) |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
117 c.user = self.rhodecode_user |
1713
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
118 no = Notification.get(notification_id) |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
119 |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
120 owner = lambda: (no.notifications_to_users.user.user_id |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
121 == c.user.user_id) |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
122 if no and (h.HasPermissionAny('hg.admin', 'repository.admin')() or owner): |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
123 unotification = NotificationModel()\ |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
124 .get_user_notification(c.user.user_id, no) |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
125 |
1713
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
126 # if this association to user is not valid, we don't want to show |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
127 # this message |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
128 if unotification: |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
129 if unotification.read is False: |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
130 unotification.mark_as_read() |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
131 Session.commit() |
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
132 c.notification = no |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
133 |
1713
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
134 return render('admin/notifications/show_notification.html') |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
135 |
1713
54687aa00724
Tests updates, Session refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
136 return redirect(url('notifications')) |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
137 |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
138 def edit(self, notification_id, format='html'): |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
139 """GET /_admin/notifications/id/edit: Form to edit an existing item""" |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
140 # url('edit_notification', notification_id=ID) |