Closed
Bug 640410
Opened 15 years ago
Closed 15 years ago
[webby] Add a syndication feed for pending opt-ins
Categories
(Webtools Graveyard :: Elmo, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
1.2
People
(Reporter: Milos, Assigned: zbraniecki)
Details
(Whiteboard: [good first bug])
Attachments
(2 files, 1 obsolete file)
|
1.99 KB,
patch
|
stas
:
review+
|
Details | Diff | Splinter Review |
|
940 bytes,
patch
|
zbraniecki
:
review+
|
Details | Diff | Splinter Review |
Although it's all said in Summary field, I'll say it once more:
We should have a view for all pending opt-ins, and a RSS so we can act fast.
Comment 1•15 years ago
|
||
I think this should be two bugs.
1. a view for pending opt-ins -- I'm not sure what a pending opt-in is as opposed to a 'satisfied' opt-in. Maybe it's (not in_verbatim or not in_vcs)?
2. an RSS feed. That's actually simpler, because you just need to show newly created Weblocale objects.
Comment 2•15 years ago
|
||
(In reply to comment #1)
> I think this should be two bugs.
>
> 1. a view for pending opt-ins -- I'm not sure what a pending opt-in is as
> opposed to a 'satisfied' opt-in. Maybe it's (not in_verbatim or not in_vcs)?
Gandalf filed bug 641474 for this.
> 2. an RSS feed. That's actually simpler, because you just need to show newly
> created Weblocale objects.
Let's focus on the syndication feed part in this bug.
Summary: [dashboard][webby] Add a view for pending opt-ins and RSS for that page → [dashboard][webby] Add a syndication feed for pending opt-ins
Updated•15 years ago
|
Component: Infrastructure → Elmo
Product: Mozilla Localizations → Webtools
QA Contact: infrastructure → elmo
Summary: [dashboard][webby] Add a syndication feed for pending opt-ins → [webby] Add a syndication feed for pending opt-ins
Version: unspecified → 1.0
Updated•15 years ago
|
Priority: -- → P3
Whiteboard: [good first bug]
| Assignee | ||
Updated•15 years ago
|
Assignee: nobody → gandalf
| Assignee | ||
Comment 3•15 years ago
|
||
patch adds two feeds - one for all new weblocales, one for just the pending ones
Attachment #530283 -
Flags: review?(stas)
Comment 4•15 years ago
|
||
Comment on attachment 530283 [details] [diff] [review]
patch, v1
Review of attachment 530283 [details] [diff] [review]:
::: apps/webby/feeds.py
@@ +1,2 @@
+from django.contrib.syndication.views import Feed
+from webby.models import Weblocale
Nit: put this import after a blank line below all from django.*
@@ +22,5 @@
+ item.project.name, item.requestee)
+
+ def item_description(self, item):
+ elems = []
+ for k,v in targets.items():
Nit: PEP8 recommends a space between k and v.
@@ +31,5 @@
+ else:
+ return 'Fully deployed'
+
+ def item_link(self, item):
+ return reverse('webby-project', kwargs={'slug':item.project.slug})
Nit: a space after the colon.
@@ +33,5 @@
+
+ def item_link(self, item):
+ return reverse('webby-project', kwargs={'slug':item.project.slug})
+
+class PendingOptinsFeed(Feed):
It looks like PendingOptinsFeed is a good candidate to be a subclass of AllOptinsFeed. I'll r- the patch for this reason.
Attachment #530283 -
Flags: review?(stas) → review-
| Assignee | ||
Comment 5•15 years ago
|
||
thanks stas!
patch, v2: follow the feedback
Attachment #530283 -
Attachment is obsolete: true
Attachment #530286 -
Flags: review?(stas)
Comment 6•15 years ago
|
||
Comment on attachment 530286 [details] [diff] [review]
patch, v2
Review of attachment 530286 [details] [diff] [review]:
r=me with a question below.
::: apps/webby/feeds.py
@@ +36,5 @@
+ def item_link(self, item):
+ return reverse('webby-project', kwargs={'slug': item.project.slug})
+
+
+class PendingOptinsFeed(AllOptinsFeed, Feed):
Python's MRO can be confusing, do you think it would be better to inherit from AllOptinsFeed only here?
Attachment #530286 -
Flags: review?(stas) → review+
| Assignee | ||
Comment 7•15 years ago
|
||
remove Feed inheritance per comment 6
pushed https://github.com/mozilla/elmo/commit/741a365548413da1e979c477122a4126c6db6dfc
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 8•15 years ago
|
||
aaand backported to master: https://github.com/mozilla/elmo/commit/638ca2b87887c34d26b02152b79c4ebd87d6a2cf
Comment 9•15 years ago
|
||
We need a bustage patch on master to make the feeds work on Django 1.1.*.
Attachment #530310 -
Flags: review?(gandalf)
Updated•15 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 10•15 years ago
|
||
On Django 1.1.x, items' titles and descriptions are rendered with html templates, which I didn't add. As a result, on 1.1.x the feed is a simple list of repr(object), which is, I reckon, good enough for the backporting.
| Assignee | ||
Comment 11•15 years ago
|
||
Comment on attachment 530310 [details] [diff] [review]
Bustage fix on master
yeah ://
Attachment #530310 -
Flags: review?(gandalf) → review+
| Assignee | ||
Comment 12•15 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Target Milestone: --- → 1.2
Updated•5 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•