I create a custom CreateView
with form_valid
sending that signal.
Django CreateView with signals?
-
11-12-2021 - |
Domanda
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?
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow