I create a custom CreateView
with form_valid
sending that signal.
Django CreateView with signals?
-
11-12-2021 - |
Question
I have several models using CreateView:
class JsonResponseMixin(object):
def is_valid(self, form):
...
return HttpResponse(json.dumps(data))
...
class CarCreate(JsonResponseMixin, CreateView):
model = Car
form = CarForm
success_url = '/success'
My problem is how can I send signal like car_create.send()
in Django CreateView?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow