Added sections for logic and views.
diff --git a/NewsfeedModule.wiki b/NewsfeedModule.wiki index 615131d..e2e29ed 100644 --- a/NewsfeedModule.wiki +++ b/NewsfeedModule.wiki
@@ -13,16 +13,29 @@ The FeedItem model contains the following properties: - sender (db.Key) + - receiver (db.Key) + - update_type (created, deleted, modified) + - created (datetime) The sender is the entity that was updated, and the receiver is the owner of the news feed that is being updated. -= Requirements = += Logic = +Newsfeed logic consists of two methods: + + * *addToFeed* takes a sender entity, a list of receiver entities, an update type, and an optional payload (like a text preview of a document). It then creates a FeedItem for each receiever. + + * *retrieveFeed* takes a receiever entity, and retrieves it's latest news feed updates, with an optional count kwarg. This method is cached, with a cache handler in the /cache folder. + + += Views = + +The newsfeed view is very simple at the moment, although the placement of the newsfeed template component in multiple templates seems to violate DRY. The newsfeed template itself is simply a table modeled after the blog template that lists each news feed update, which is added to the context dict through the retrieveFeed method. = Requirements =