34👍
There must be an import from typing-extensions module in blog\views.py file on line 1
in your code.
Use this command to install it
pip install typing-extensions
after that this issue will be resolved.
4👍
I had the same error.
Mine came from models.py
models.py
from typing_extensions import Required
from django.db import models
class nameOfModel(models.Model):
nameOfField = models.CharField(max_length=255, Required=True)
Because I used Required=True
, VSCode added automatically from typing_extensions import Required
.
So I did this instead.
models.py
from django.db import models
class nameOfModel(models.Model):
nameOfField = models.CharField(max_length=255, blank=False)
- [Django]-Reverse for success_url on Django Class Based View complain about circular import
- [Django]-What is the use of PYTHONUNBUFFERED in docker file?
- [Django]-Django 1.7 migrate gets error "table already exists"
1👍
This is a problem with the forms.Textarea wich cannot accept required, so it calls for import from typing-extensions and this make the problem
- [Django]-Django form fails validation on a unique field
- [Django]-Type object 'X' has no attribute 'objects'
- [Django]-Django select_related – when to use it
Source:stackexchange.com