controller.rst 966 B

123456789101112131415161718192021
  1. .. _controller:
  2. WebsiteBlog(controller)
  3. =======================
  4. Methods
  5. +++++++
  6. - ``blog`` : remove routing related to date.
  7. - ``blog_post`` : updated with , suggestion of next post to the user based on
  8. cookie and number of views.
  9. - ``discussion`` : added method , contains a detail of discussion on every paragraph,
  10. if count is true it only return len of ids else return full detail.
  11. def discussion(self, post_id=0, discussion=None, count=False, **post)
  12. - ``post_discussion`` : added methodt, that allow to post discussion on any paragraph.
  13. def post_discussion(self, blog_post_id=0, **post)
  14. - ``change_bg`` : added method allow a user to change background image on blog
  15. post from front-end.
  16. def change_bg(self, post_id=0, image=None, **post)
  17. - ``get_user`` : added method , that will return True if user is public else False.
  18. def get_user(self, **post):
  19. return [False if request.session.uid else True]