Thank you very much Andréas. The program is working fine now. I didn't know 
the difference between those two variable types, but now I understand.

On Wednesday, October 30, 2019 at 6:10:08 PM UTC-5, Diana María Bedoya 
Ramírez wrote:
>
> Hello,
>
> I have an APIView object with an __init__method. In that __init__ I have a 
> loop that extends a class list variable. Every time I make a POST to the 
> url that calls the APIView, the items in the loop items are added to the 
> old ones in the list, duplicating the item number every time. 
>
> Why is the __init__ method called on the same object with every request? 
> How can assure a new object with every requesdt I make?
>
>
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/67f9e4b4-db33-4003-bc38-7c8430661cca%40googlegroups.com.

Reply via email to