Model class xxxx doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS

Изучаю джанго , при использовании makemigrations выдает "Model class xxx.models.news doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS."

Мой код models.py

    class news(models.Model):
    image = models.ImageField(name="Img", upload_to="myproekt/static/img")
    title = models.TextField(name = "title")
    date = models.DateTimeField(name = "Date", auto_now = True)
def __str__(self):
 return self.title
class Meta:
        app_label = 'myproekt'

class events(models.Model):
    text = models.TextField(name = "title")
    date = models.DateTimeField(name="Date", auto_now=True)
def __str__(self):
    return self.text
class Meta:
        app_label = 'myproekt'
class congrat(models.Model):
    text = models.TextField(name="title")
    date = models.DateTimeField(name="Date", auto_now=True)
def __str__(self):
    return self.text
    class Meta:
        app_label = 'my proekt'

Мои settings.py

INSTALLED_APPS = [

    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',


]

введите сюда описание изображения

Вернуться на верх