Chapter or Appendix: Chapter 6: Model Best Practices
Section: 6.7 Understanding Fat Models
Subsection: na
Description
In bullet points after first paragraph, first occurence of Review is capitalised, second and third are not.
Review.create_review(cls, user, rating, title, description) A class-
method for creating reviews. Called on the model class itself from HTML and REST views,
as well as an import tool that accepts spreadsheets.
review.product_average A review instance property that returns the reviewed project’s
average rating. Used on review detail views so the reader can get a feel for the overall opinion
without leaving the page.
review.found_useful(self, user, yes) A method that sets whether or not readers
found the review useful or not. Used in detail and list views, for both HTML and REST
implementations.
Location within the Book
Description
In bullet points after first paragraph, first occurence of Review is capitalised, second and third are not.