Django form inside a modal (bootstrap)

2020-11-17 Thread Apolo Machine
hello, i'm trying to add a button that open a modal(bootstrap) where i can add a new object car, but when a press the buttom open the service form in the modal i have a working form where i can add new car (name=create-car), how can i open the CarForm inside of the modal? class Car(models.Mod

self.request.POST in get_context_data

2020-11-17 Thread bnmng
Hi. I can find dozens of examples of people using "if self.request.POST:" inside of get_context_data, but as far as I can tell there is no POST in get_context_data. I came across this in an answer in Stack Overflow: >> get_context_data() is only run for GET requests (assuming you are using