Monday, February 28, 2022

Re: How to add object to users unique list?


Are you using class-based views? Does your view have a post() method?

I searched the web for `django "method not allowed (POST)"` and this is the first result that came up:



Antonis Christofides  +30-6979924665 (mobile)

On 28/02/2022 19.49, raf sandwich wrote:
Hi there. I have a system whereby users are recommended anime, and I want it so when they see anime on the website they can press a button on any anime shown, which will then add it to their 'UserList' which is a saved list that they can go back to and see whenever they want. 

I figure the button just needs to associate the with the POST request, and then add it to the user that is logged ins user.userlist.anime_in_list but I can't get it to work.

Currently my terminal is displaying the error

Method Not Allowed (POST): /anime/

Method not allowed: /anime/

when the button is pressed

A code break down for my, etc. is available on this reddit post:

Thanks for any help I'm so stuck and I think it's probably simple!

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

No comments:

Post a Comment