Reputation: 3488
What's the purpose to define a Django
model with abstract = True
?
Upvotes: 0
Views: 687
Reputation: 1598
abstract=True
means this model is an abstract model class. It does not have a database table and is merely a shared parent model class so that the child models don't need to rewrite all the fields. Each child models will have their own table.
abstract=False
means a normal model, django will create a table for it.
Upvotes: 4