News for hackers. Stuff that matters.
Re:Django 4.0 by squeaky-clean on Tuesday December 07, 2021 @01:45PM (#29476536)
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.

There are no comments on this comment yet.