Django: Finish processing one request from a user before proceeding to the next
I don't know why I didn't think of this sooner, I added in a unique_together clause which will prevent another like_object from being created.
I'm currently looking for a solution that will prevent a user from making multiple requests at the same time. I would like the first request to finish before the I process the second request from the user. For example, lets say user adam liked and un-liked suzy's photo. Both unliking and liking of the photo happens in the same view. 
Currently the problem that I've been having is that I'm processing both requests at the same time. In the case of the like view, when a user likes something, I create a like_object. When the user decides to unlike something, I check for the existence of the like_object in the database and then delete it. HOWEVER! If the first request hasn't finished yet, the check for the like_object in the second request will come back saying there is no like object and it will create a second like_object.
Once all of this is finished processing, I will end up having 2 like_objects for the same photo from the same user. This is bad.
To give you more information, I use Gunicorn as my HTTP server. I run 3 regular workers, which is why each request is processed at the same time. 
So what do you think I could do? I mean, I was thinking for using Celery and RabbitMQ for this. Each request will be submitted into a queue and be processed asynchronously. That's one option. But I feel like that might be overkill in a situation like this. I'm looking for something that can be done directly within Django. Hmm, let me know of the possible solutions. 
Thanks