[django] Tag (manytomany)
models.py class Tag(models.Model): pidx = models.ForeignKey('Program', related_name='tagpost', on_delete=models.CASCADE, db_column='pidx', verbose_name='프로그램', null=True) name = models.CharField(max_length=50) def __str__(self): return self.name class Program(models.Model): yn_choices = ( ('Y', 'Y'), ('N', 'N'), ) pcate = models.ForeignKey('BoardCategory', related_name='pcpost', on_delete=models..
2023. 5. 12.