"from django.shortcuts import render" gets me an error

Viewed 23

I have a decent amount of experience with Django, but recently I opened one of my old Django projects and realized there was something wrong with it. I looked through the files and I found that there were red wavy lines under: from django.shortcuts import render, from django.views import View, indicating that there is an error. I did not change anything I do not know what caused it. When I run the server I also get an error saying "name 'request' is not defined". Please help, here is the code:

from django.shortcuts import render from django.views import View class Index(View): def get(self, requst, *args, **kwargs): return render(request, 'landing/index.html')

0 Answers
Related