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?

Was it helpful?

Solution

I create a custom CreateView with form_valid sending that signal.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top