How to create Django like button for anonymous users?

前端 未结 3 1725
你的背包
你的背包 2021-01-21 06:37

I am using Django and my website has no user profiles so all are anonymous. I want to implement a \'like\' system. How do I restrict a user to like only once. Thanks.

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-21 06:52

    If you don't have any way of identifying your users then your best bet is to store this info in a browser cookie or HTML5 local storage. (I don't advise using flash cookies since there is a long debate about them and they are harder to implement)

提交回复
热议问题