F
F
First Name Last Name2020-11-27 19:19:00
Django
First Name Last Name, 2020-11-27 19:19:00

Why is Django throwing an ImportError?

Hello! I started learning Django by

book
"Django 3.0 Практика создания веб-сайтов на Python" - Дронов В.А
After creating the first application, I wrote the code there, in the file "viwes.py" in the application, according to the book
from django.shortcuts import render
from django.http import HttpRespone

# Create your views here.
def index (request):
  return HttpRespone("Hello World!")

And it looks like this to me
mistake
ImportError: cannot import name 'HttpRespone' from 'django.http' (/home/alikk/.local/lib/python3.8/site-packages/django/http/__init__.py)
I looked at the solution of the error on different sites, but did not find it. By the way, I can google.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-11-27
@alikk_python

HttpRespone vs HttpResponse
And yes, you don't know how to google

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question