Hi,
I use VS Code with Django and Pylance extensions installed. For unknown reason, my intellisense stopped to work and when I need to access to models class like the following:
from django.db import models
# Create your models here.
class Account_Type(models.Model):
account_type = models.CharField(max_length=50)
class Users_Account(models.Model):
username = models.CharField(max_length=255) #Can be an email address
password = models.CharField(max_length=80)
email = models.EmailField(max_length=254)
account_type = models.ForeignKey(Account_Type, on_delete=models.PROTECT)
is_active = models.BooleanField(default=True)
as you can see colors stopped to be used for the class I created and mon_delete does not provide me with PROTECT, CASCADE or anything else, when I just type “models.”
so why colors are not anymore displayed for this model class and why values like CASCADE or PROTECT are not suggested when I type “models.” ?