So, My models.py
has this model
class student(models.Model):
ID = models.CharField(default='DUMMY_ID',primary_key=True,max_length=10)
Score = models.CharField(default='DUMMY_Score',max_length=150)
class = models.CharField(default='DUMMY_class',max_length=20)
and the requirement now is that a user (consider him to be admin/the director of the institute) should be able to add a new column to the database like section
or rank
or something.
so is there any way to add a new column to the table dynamically and if yes can you please explain it with an example as I am a beginner at Django.
DOUBT: if there's some way to do this, then will the above models.py have another entry (eg: rank= models.CharField(default='rank',max_length=20)
after the change is made?
and what data is filled for the previous entries in the new column?