Answers for "cannot import name 'httpresponse' from 'django.http'"

0

cannot import name 'httpresponse' from 'django.http'

from django.http import HttpResponse
import datetime

def current_datetime(request):
    now = datetime.datetime.now()
    html = "<html><body>It is now %s.</body></html>" % now
    return HttpResponse(html)
Posted by: Guest on May-17-2020

Code answers related to "cannot import name 'httpresponse' from 'django.http'"

Python Answers by Framework

Browse Popular Code Answers by Language