__init__ method called every time on same APIView object

2019-10-30 Thread Diana María Bedoya Ramírez
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

Re: __init__ method called every time on same APIView object

2019-10-31 Thread Diana María Bedoya Ramírez
00) With the code above, every time I make a POST to incoming-calls/, the field *select_fields *gets 10 new custom fields, and that's not the idea On Wednesday, October 30, 2019 at 6:10:08 PM UTC-5, Diana María Bedoya Ramírez wrote: > > Hello, > > I have an APIView ob

Re: __init__ method called every time on same APIView object

2019-11-01 Thread Diana María Bedoya Ramírez
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