Import Error: cannot import name 'User' from partially initialized module 'auctions.models [closed]

class Comment(models.Model):
    author = models.ForeignKey(User, on_delete=models.CASCADE,blank=True, null=True,related_name='userComment')
    listing = models.ForeignKey(Listing, on_delete=models.CASCADE,blank=True, null=True,related_name="listingComment")
    message = models.IntegerField(max_length=200)
   

def __str__(self):
     return f"{self.author} comment on {self.listing}"
   
Back to Top