1
我一直在使用CreateView的幾種模式:Django 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'
我的問題是我怎麼能在Django CreateView的發送信號像car_create.send()
?