vendredi 26 juin 2020

Make migrations Command

I just started teh django with python.while ı tried the run code that is "python manage.py make migrations" , ı see error "module 'django.db.models' has no attribute 'models'". how can ı fix it?(I left the code and error down. )

from django.db import models

class Article(models.Model):
author = models.ForeignKey("auth.User",on_delete = models.CASCADE)
title = models.models.CharField(max_length=50)
content = models.models.TextField()
created_date = models.models.DateTimeField(auto_now_add = True)

Error




Aucun commentaire:

Enregistrer un commentaire