4 ms·
I usually have a FBV handler (foo_handler) that just passes along all the required parameters to foo_get, foo_post, etc, and then takes the return value of thos
by squeaky-clean 5y ago
I usually have a FBV handler (foo_handler) that just passes along all the required parameters to foo_get, foo_post, etc, and then takes the return value of those and wraps it in a HttpResponse/JsonResponse.
That way my actual view logic doesn't have to deal with anything http, and it makes testing them way simpler.