Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(604)

Issue 93570043: Added fqname suport to notifications module (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 11 months ago by sksaurabhkathpalia
Modified:
9 years, 11 months ago
Reviewers:
thomas.j.waldmann, dimazest
Visibility:
Public.

Description

Added fqname suport to notifications module

Patch Set 1 #

Patch Set 2 : Changed the item urls(used fqname directly in urls) #

Patch Set 3 : Changed one test and done some other minor changes also (Now one unit test jfu_server is failing) #

Total comments: 1

Patch Set 4 : Removed pep-8 errors #

Patch Set 5 : Now all unit tests are passing #

Total comments: 11

Patch Set 6 : Done a minor change in notifications.py #

Total comments: 7

Patch Set 7 : Removed code duplication #

Total comments: 2

Patch Set 8 : Removed small errors #

Total comments: 4

Patch Set 9 : Changed label to labels and field to label #

Patch Set 10 : Added item_url in message #

Total comments: 15

Patch Set 11 : Used fqname.value instead of fqname[2] and also changed the parameters to signal item_displayed #

Total comments: 2

Patch Set 12 : Done a minor change #

Patch Set 13 : Used fqname.value and fqname.field directly #

Total comments: 7

Patch Set 14 : Used L_ in labels also #

Patch Set 15 : Used unicode(fqname) instead of label #

Total comments: 4

Patch Set 16 : Used fqname instead of label and removed item_name from subject and message #

Patch Set 17 : Removed "with item" #

Patch Set 18 : Full tested the code (now mail is being sent) did a small change in subscriptions.py #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -52 lines) Patch
M MoinMoin/apps/frontend/views.py View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -4 lines 0 comments Download
M MoinMoin/forms.py View 1 2 1 chunk +1 line, -1 line 0 comments Download
M MoinMoin/items/__init__.py View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -6 lines 0 comments Download
M MoinMoin/signalling/log.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -4 lines 0 comments Download
M MoinMoin/util/_tests/test_notifications.py View 1 2 3 4 5 6 7 8 9 10 3 chunks +15 lines, -13 lines 0 comments Download
M MoinMoin/util/notifications.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 9 chunks +24 lines, -23 lines 0 comments Download
M MoinMoin/util/subscriptions.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 37
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/40001/MoinMoin/forms.py File MoinMoin/forms.py (right): https://codereview.appspot.com/93570043/diff/40001/MoinMoin/forms.py#newcode361 MoinMoin/forms.py:361: This was just a pep8 error
9 years, 11 months ago (2014-05-29 09:35:13 UTC) #1
dimazest
https://codereview.appspot.com/93570043/diff/80001/MoinMoin/apps/frontend/views.py File MoinMoin/apps/frontend/views.py (right): https://codereview.appspot.com/93570043/diff/80001/MoinMoin/apps/frontend/views.py#newcode829 MoinMoin/apps/frontend/views.py:829: except AccessDenied: this is not really related to you ...
9 years, 11 months ago (2014-05-29 10:20:46 UTC) #2
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/80001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/80001/MoinMoin/util/notifications.py#newcode108 MoinMoin/util/notifications.py:108: content = Content.create(contenttype) On 2014/05/29 10:20:46, dimazest wrote: > ...
9 years, 11 months ago (2014-05-29 11:23:13 UTC) #3
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/80001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/80001/MoinMoin/util/notifications.py#newcode84 MoinMoin/util/notifications.py:84: kw = dict(item_name=self.fqname[2], wiki_name=self.wiki_name, user_name=flaskg.user.name0) On 2014/05/29 10:20:46, dimazest ...
9 years, 11 months ago (2014-05-30 15:23:39 UTC) #4
dimazest
https://codereview.appspot.com/93570043/diff/80001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/80001/MoinMoin/util/notifications.py#newcode84 MoinMoin/util/notifications.py:84: kw = dict(item_name=self.fqname[2], wiki_name=self.wiki_name, user_name=flaskg.user.name0) more like self.fqname.name (have ...
9 years, 11 months ago (2014-05-30 15:38:18 UTC) #5
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/80001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/80001/MoinMoin/util/notifications.py#newcode84 MoinMoin/util/notifications.py:84: kw = dict(item_name=self.fqname[2], wiki_name=self.wiki_name, user_name=flaskg.user.name0) On 2014/05/30 15:38:18, dimazest ...
9 years, 11 months ago (2014-05-30 16:26:37 UTC) #6
dimazest
https://codereview.appspot.com/93570043/diff/80001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/80001/MoinMoin/util/notifications.py#newcode84 MoinMoin/util/notifications.py:84: kw = dict(item_name=self.fqname[2], wiki_name=self.wiki_name, user_name=flaskg.user.name0) yes. On 2014/05/30 16:26:36, ...
9 years, 11 months ago (2014-05-30 17:55:34 UTC) #7
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/80001/MoinMoin/signalling/log.py File MoinMoin/signalling/log.py (right): https://codereview.appspot.com/93570043/diff/80001/MoinMoin/signalling/log.py#newcode25 MoinMoin/signalling/log.py:25: logging.info(u"item {0}:{1} modified".format(wiki_name, fqname[2])) On 2014/05/29 10:20:46, dimazest wrote: ...
9 years, 11 months ago (2014-05-31 00:27:32 UTC) #8
dimazest
https://codereview.appspot.com/93570043/diff/80001/MoinMoin/signalling/log.py File MoinMoin/signalling/log.py (right): https://codereview.appspot.com/93570043/diff/80001/MoinMoin/signalling/log.py#newcode25 MoinMoin/signalling/log.py:25: logging.info(u"item {0}:{1} modified".format(wiki_name, fqname[2])) also, this is doesn't really ...
9 years, 11 months ago (2014-05-31 10:43:50 UTC) #9
dimazest
https://codereview.appspot.com/93570043/diff/100001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/100001/MoinMoin/util/notifications.py#newcode188 MoinMoin/util/notifications.py:188: value = fqname[2] is it possible to use more ...
9 years, 11 months ago (2014-05-31 11:28:20 UTC) #10
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/100001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/100001/MoinMoin/util/notifications.py#newcode188 MoinMoin/util/notifications.py:188: value = fqname[2] On 2014/05/31 11:28:19, dimazest wrote: > ...
9 years, 11 months ago (2014-05-31 11:32:38 UTC) #11
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/100001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/100001/MoinMoin/util/notifications.py#newcode225 MoinMoin/util/notifications.py:225: moin_name=app.cfg.interwikiname, item_name=fqname[2], user_name=u.name0) On 2014/05/31 11:28:19, dimazest wrote: > ...
9 years, 11 months ago (2014-05-31 11:38:43 UTC) #12
dimazest
https://codereview.appspot.com/93570043/diff/100001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/100001/MoinMoin/util/notifications.py#newcode225 MoinMoin/util/notifications.py:225: moin_name=app.cfg.interwikiname, item_name=fqname[2], user_name=u.name0) this makes sense. however, if fqname[1] ...
9 years, 11 months ago (2014-05-31 11:40:45 UTC) #13
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/100001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/100001/MoinMoin/util/notifications.py#newcode225 MoinMoin/util/notifications.py:225: moin_name=app.cfg.interwikiname, item_name=fqname[2], user_name=u.name0) On 2014/05/31 11:40:45, dimazest wrote: > ...
9 years, 11 months ago (2014-05-31 11:46:29 UTC) #14
dimazest
https://codereview.appspot.com/93570043/diff/100001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/100001/MoinMoin/util/notifications.py#newcode225 MoinMoin/util/notifications.py:225: moin_name=app.cfg.interwikiname, item_name=fqname[2], user_name=u.name0) then this code has to be ...
9 years, 11 months ago (2014-05-31 11:50:25 UTC) #15
dimazest
https://codereview.appspot.com/93570043/diff/120001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/120001/MoinMoin/util/notifications.py#newcode226 MoinMoin/util/notifications.py:226: moin_name=app.cfg.interwikiname, field = label.get(fqname[1], default = fqname[1]), item_name=fqname[2], user_name=u.name0) ...
9 years, 11 months ago (2014-05-31 13:02:30 UTC) #16
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/120001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/120001/MoinMoin/util/notifications.py#newcode226 MoinMoin/util/notifications.py:226: moin_name=app.cfg.interwikiname, field = label.get(fqname[1], default = fqname[1]), item_name=fqname[2], user_name=u.name0) ...
9 years, 11 months ago (2014-05-31 13:41:51 UTC) #17
dimazest
https://codereview.appspot.com/93570043/diff/140001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/140001/MoinMoin/util/notifications.py#newcode220 MoinMoin/util/notifications.py:220: label = { rename to labels https://codereview.appspot.com/93570043/diff/140001/MoinMoin/util/notifications.py#newcode226 MoinMoin/util/notifications.py:226: moin_name=app.cfg.interwikiname, ...
9 years, 11 months ago (2014-05-31 13:49:02 UTC) #18
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/140001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/140001/MoinMoin/util/notifications.py#newcode220 MoinMoin/util/notifications.py:220: label = { On 2014/05/31 13:49:01, dimazest wrote: > ...
9 years, 11 months ago (2014-05-31 14:09:45 UTC) #19
Thomas.J.Waldmann
https://codereview.appspot.com/93570043/diff/180001/MoinMoin/apps/frontend/views.py File MoinMoin/apps/frontend/views.py (right): https://codereview.appspot.com/93570043/diff/180001/MoinMoin/apps/frontend/views.py#newcode821 MoinMoin/apps/frontend/views.py:821: fqname = CompositeName(u'', NAME_EXACT, item_name) what's this u'' ? ...
9 years, 11 months ago (2014-05-31 16:31:54 UTC) #20
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/180001/MoinMoin/util/_tests/test_notifications.py File MoinMoin/util/_tests/test_notifications.py (right): https://codereview.appspot.com/93570043/diff/180001/MoinMoin/util/_tests/test_notifications.py#newcode28 MoinMoin/util/_tests/test_notifications.py:28: self.fqname = CompositeName(u'', NAME_EXACT, self.item_name) On 2014/05/31 16:31:54, Thomas.J.Waldmann ...
9 years, 11 months ago (2014-05-31 16:41:28 UTC) #21
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/180001/MoinMoin/apps/frontend/views.py File MoinMoin/apps/frontend/views.py (right): https://codereview.appspot.com/93570043/diff/180001/MoinMoin/apps/frontend/views.py#newcode821 MoinMoin/apps/frontend/views.py:821: fqname = CompositeName(u'', NAME_EXACT, item_name) On 2014/05/31 16:31:53, Thomas.J.Waldmann ...
9 years, 11 months ago (2014-05-31 16:42:40 UTC) #22
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/180001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/180001/MoinMoin/util/notifications.py#newcode226 MoinMoin/util/notifications.py:226: subject = L_('[%(moin_name)s] Update of item with "%(label)s" "%(item_name)s" ...
9 years, 11 months ago (2014-05-31 16:46:30 UTC) #23
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/180001/MoinMoin/apps/frontend/views.py File MoinMoin/apps/frontend/views.py (right): https://codereview.appspot.com/93570043/diff/180001/MoinMoin/apps/frontend/views.py#newcode821 MoinMoin/apps/frontend/views.py:821: fqname = CompositeName(u'', NAME_EXACT, item_name) On 2014/05/31 16:42:40, sksaurabhkathpalia ...
9 years, 11 months ago (2014-06-01 05:53:49 UTC) #24
dimazest
https://codereview.appspot.com/93570043/diff/200001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/200001/MoinMoin/util/notifications.py#newcode189 MoinMoin/util/notifications.py:189: terms = [Term(WIKINAME, app.cfg.interwikiname), Term(field, value), ] you can ...
9 years, 11 months ago (2014-06-01 08:39:39 UTC) #25
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/200001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/200001/MoinMoin/util/notifications.py#newcode189 MoinMoin/util/notifications.py:189: terms = [Term(WIKINAME, app.cfg.interwikiname), Term(field, value), ] On 2014/06/01 ...
9 years, 11 months ago (2014-06-01 08:51:02 UTC) #26
Thomas.J.Waldmann
https://codereview.appspot.com/93570043/diff/170007/MoinMoin/signalling/log.py File MoinMoin/signalling/log.py (right): https://codereview.appspot.com/93570043/diff/170007/MoinMoin/signalling/log.py#newcode25 MoinMoin/signalling/log.py:25: logging.info(u"item {0}:{1} modified".format(wiki_name, fqname.value)) if you only use the ...
9 years, 11 months ago (2014-06-01 11:57:27 UTC) #27
Thomas.J.Waldmann
On 2014/05/31 16:41:28, sksaurabhkathpalia wrote: > https://codereview.appspot.com/93570043/diff/180001/MoinMoin/util/_tests/test_notifications.py > File MoinMoin/util/_tests/test_notifications.py (right): > > https://codereview.appspot.com/93570043/diff/180001/MoinMoin/util/_tests/test_notifications.py#newcode28 > ...
9 years, 11 months ago (2014-06-01 12:02:14 UTC) #28
Thomas.J.Waldmann
On 2014/05/31 16:46:30, sksaurabhkathpalia wrote: > https://codereview.appspot.com/93570043/diff/180001/MoinMoin/util/notifications.py > File MoinMoin/util/notifications.py (right): > > https://codereview.appspot.com/93570043/diff/180001/MoinMoin/util/notifications.py#newcode226 > ...
9 years, 11 months ago (2014-06-01 12:04:05 UTC) #29
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/180001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/180001/MoinMoin/util/notifications.py#newcode226 MoinMoin/util/notifications.py:226: subject = L_('[%(moin_name)s] Update of item with "%(label)s" "%(item_name)s" ...
9 years, 11 months ago (2014-06-01 14:04:28 UTC) #30
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/170007/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/170007/MoinMoin/util/notifications.py#newcode85 MoinMoin/util/notifications.py:85: kw = dict(item_name=self.fqname.value, wiki_name=self.wiki_name, user_name=flaskg.user.name0, item_url=url_for_item(self.fqname)) On 2014/06/01 11:57:26, ...
9 years, 11 months ago (2014-06-01 14:25:45 UTC) #31
dimazest
https://codereview.appspot.com/93570043/diff/170007/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/170007/MoinMoin/util/notifications.py#newcode85 MoinMoin/util/notifications.py:85: kw = dict(item_name=self.fqname.value, wiki_name=self.wiki_name, user_name=flaskg.user.name0, item_url=url_for_item(self.fqname)) But then messages ...
9 years, 11 months ago (2014-06-01 14:27:18 UTC) #32
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/170007/MoinMoin/signalling/log.py File MoinMoin/signalling/log.py (right): https://codereview.appspot.com/93570043/diff/170007/MoinMoin/signalling/log.py#newcode25 MoinMoin/signalling/log.py:25: logging.info(u"item {0}:{1} modified".format(wiki_name, fqname.value)) On 2014/06/01 11:57:26, Thomas.J.Waldmann wrote: ...
9 years, 11 months ago (2014-06-01 14:29:53 UTC) #33
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/170007/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/170007/MoinMoin/util/notifications.py#newcode85 MoinMoin/util/notifications.py:85: kw = dict(item_name=self.fqname.value, wiki_name=self.wiki_name, user_name=flaskg.user.name0, item_url=url_for_item(self.fqname)) On 2014/06/01 14:27:18, ...
9 years, 11 months ago (2014-06-01 14:32:38 UTC) #34
Thomas.J.Waldmann
https://codereview.appspot.com/93570043/diff/260001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/260001/MoinMoin/util/notifications.py#newcode219 MoinMoin/util/notifications.py:219: subject = L_('[%(moin_name)s] Update of item with "%(label)s" "%(item_name)s" ...
9 years, 11 months ago (2014-06-02 15:31:25 UTC) #35
sksaurabhkathpalia
https://codereview.appspot.com/93570043/diff/260001/MoinMoin/util/notifications.py File MoinMoin/util/notifications.py (right): https://codereview.appspot.com/93570043/diff/260001/MoinMoin/util/notifications.py#newcode219 MoinMoin/util/notifications.py:219: subject = L_('[%(moin_name)s] Update of item with "%(label)s" "%(item_name)s" ...
9 years, 11 months ago (2014-06-02 15:37:31 UTC) #36
sksaurabhkathpalia
9 years, 11 months ago (2014-06-02 15:41:52 UTC) #37
https://codereview.appspot.com/93570043/diff/260001/MoinMoin/util/notificatio...
File MoinMoin/util/notifications.py (right):

https://codereview.appspot.com/93570043/diff/260001/MoinMoin/util/notificatio...
MoinMoin/util/notifications.py:219: subject = L_('[%(moin_name)s] Update of item
with "%(label)s" "%(item_name)s" by %(user_name)s',
On 2014/06/02 15:31:24, Thomas.J.Waldmann wrote:
> use fqname instead of label as placeholder?
> 
> why is item_name in here still?

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b