Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

enhance FeedItem for feed builder stuff #2151

Merged
merged 4 commits into from Jun 6, 2014
Merged

Conversation

ngokevin
Copy link
Contributor

@ngokevin ngokevin commented Jun 6, 2014

Need some stuff for the Feed Builder. @chuckharmston

  • add order field to FeedItem
  • add feed_type field to FeedItem
  • add a function-based DRF view to set feeds by region

Data from feed builder will look like:

self.data = {
        'us': [
            ['app', self.feed_apps[1].id],
            ['collection', 12L],
            ['brand', self.brand.id],
            ['app', self.feed_apps[0].id],
        ],
        'cn': [
            ['brand', self.brand.id],
            ['app', self.feed_apps[2].id],
            ['collection', 12L],
            ['collection', 14L],
        ]
    }

We delete all FeedItems for regions passed in, then all FeedItems passed in will be in one bulk_create.

@ngokevin ngokevin changed the title add order to feeditems (feed) enhance FeedItem for feed builder stuff Jun 6, 2014
**Response**

:status 201: success.
:status 403: not authorized.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No 400s?

@chuckharmston
Copy link
Contributor

r+wc, add some error handling and :shipit:

ngokevin added a commit that referenced this pull request Jun 6, 2014
enhance FeedItem for feed builder stuff
@ngokevin ngokevin merged commit ea9d0af into mozilla:master Jun 6, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants