[Fixed]-How to override a field in the parent class

16πŸ‘

βœ…

In normal Python class inheritance, it is permissible for a child class to override any attribute from the parent class. In Django, this is not permitted for attributes that are Field instances (at least, not at the moment). If a base class has a field called author, you cannot create another model field called author in any class that inherits from that base class.

You can’t. Reference

πŸ‘€Mike Ramirez

Leave a comment