4 ms·
Please notice that nothing stops you from defining a non managed (ie Django migrations won't mess with it) model pointing to the same table and having declared
by spapas82 4y ago
Please notice that nothing stops you from defining a non managed (ie Django migrations won't mess with it) model pointing to the same table and having declared only three of the fields of the original model.
- traverseda 4y agoThat is more elegant than using a proxy model
- spapas82 4y agoThe Django docs also mention that https://docs.djangoproject.com/en/4.1/topics/db/models/#differences-between-proxy-inheritance-and-unmanaged-models https://docs.djangoproject.com/en/4.1/topics/db/models/#diff... > If you are mirroring an existing model or database table and don’t want all the original database table columns, use Meta.managed=False.