Open Dcolonel6 opened 2 years ago
change published to something like pulished_post or objects_published because published attribute is conflicting with one the status choices.
class Post(models.Model): objects = models.Manager() published = PublishedManager() drafted = DraftedManager() STATUS_CHOICES = ( ('draft', 'Draft'), ('published', 'Published'), ) title = models.CharField(max_length=250) slug = models.CharField(max_length=250, unique_for_date='publish') body = models.TextField()
change published to something like pulished_post or objects_published because published attribute is conflicting with one the status choices.
class Post(models.Model): objects = models.Manager() published = PublishedManager() drafted = DraftedManager() STATUS_CHOICES = ( ('draft', 'Draft'), ('published', 'Published'), ) title = models.CharField(max_length=250) slug = models.CharField(max_length=250, unique_for_date='publish') body = models.TextField()