I want to specify a model field dynamically in models.py. For example:
class ModelA(models.Model):
pass # whatever
# immediately after class declaration in models.py
if django_is_not_non_rel:
MyModel.all_modelb = models.ManyToManyField(ModelB, through="ModelAB")
But this code example does not work. When the condition is true, ModelA does not have the all_modelb field after everything is initialized. Why???? How do I effect my intention?