Closed
Bug 640410
Opened 13 years ago
Closed 13 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•13 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•13 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•13 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•13 years ago
|
Priority: -- → P3
Whiteboard: [good first bug]
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → gandalf
Assignee | ||
Comment 3•13 years ago
|
||
patch adds two feeds - one for all new weblocales, one for just the pending ones
Attachment #530283 -
Flags: review?(stas)
Comment 4•13 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•13 years ago
|
||
thanks stas! patch, v2: follow the feedback
Attachment #530283 -
Attachment is obsolete: true
Attachment #530286 -
Flags: review?(stas)
Comment 6•13 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•13 years ago
|
||
remove Feed inheritance per comment 6 pushed https://github.com/mozilla/elmo/commit/741a365548413da1e979c477122a4126c6db6dfc
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 8•13 years ago
|
||
aaand backported to master: https://github.com/mozilla/elmo/commit/638ca2b87887c34d26b02152b79c4ebd87d6a2cf
Comment 9•13 years ago
|
||
We need a bustage patch on master to make the feeds work on Django 1.1.*.
Attachment #530310 -
Flags: review?(gandalf)
Updated•13 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 10•13 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•13 years ago
|
||
Comment on attachment 530310 [details] [diff] [review] Bustage fix on master yeah ://
Attachment #530310 -
Flags: review?(gandalf) → review+
Assignee | ||
Comment 12•13 years ago
|
||
fixed https://github.com/mozilla/elmo/commit/9123ff11e32c3766db724ea6273d39c5c24348bd
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Target Milestone: --- → 1.2
Updated•4 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•