The view didn’t return an HttpResponse object. It returned None instead
Stack How?
Stackorigin – The Community of Question and Answers Latest Articles
Read More About Python List Comprehension with examples
Python List Comprehension: Python List comprehension provides a much more short syntax for creating a new list based on the values of an existing list. Advantages of List Comprehension in Python: Time Efficient than loop Space Efficient than loop Needs ...
Do not accept an offer letter from companies.
Do not accept an offer letter from companies without verifying the following points. Designation Salary Details & CTC Distribution Leave Policies Working Hours & Days Medical Coverage/Insurance Probation Period Notice Period Benefits and Perks Bonus F&F Policy
How to call API using Ajax
AJAX stands for Asynchronous JavaScript and XML and its used for to make calls to the server to fetch some data. In this article, we will learn how to implement a simple API call using AJAX technology. How to use GET ...
render()
render
(request, template_name, context=None, content_type=None, status=None, using=None)¶HttpResponse
object with that rendered text.Django does not provide a shortcut function which returns aTemplateResponse
because the constructor ofTemplateResponse
offers the same level of convenience asrender()
.So, just change and revise the source a little bit. Modify the last line of the ‘main’ function. In the end, it will be as in the following content in order for the application to run properly :
view didn’t return an HttpResponse object. It returned None instead:
Because the view must return
render
, not just call it.