Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create Django like button for anonymous users?

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.

like image 385
Nazim Zeeshan Avatar asked Feb 28 '26 22:02

Nazim Zeeshan


1 Answers

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)

like image 128
Mihai Oprea Avatar answered Mar 02 '26 11:03

Mihai Oprea



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!