Render ⋮ Redirect ⋮ HTTPResponse ⋮ TemplateView

RENDER

Render is a function that combines a given template with a given context dictionary and returns an HttpResponse object with that rendered text. It is used to render a template with some data and return the resulting HTML to the client. You use render when you want to render a template with some data and return the resulting HTML to the client. This is useful when you want to display some dynamic content to the user, such as a list of items or a form.




REDIRECT

Redirect is a function that returns an HttpResponseRedirect object, which is a subclass of HttpResponse. You use redirect when you want to redirect the client to a different URL. This is useful when you want to send the user to a different page after they have completed an action, such as submitting a form or logging in.




HTTPResponse

HttpResponse can be used to return a simple HTTP response with a string of text or HTML.

HTTPResponse can also be used to export files:




TemplateView

TemplateView can be used to serve a static file directly fron urls.py without the need to create a view: