views:

158

answers:

1

Hi,

excuse me in advance if this is not the right title for the problem but here it is: You have application that works with pre defined model. What happens if you want to use this application one more time in your project but pointing to different model (same structure but differen name).

For example - you have a "News" application that is fully working but you want to have also and articles the do the same job but you want it in different table.
I'm pretty sure that copying the whole application and renaming the Model isn`t the "pythonic" way so if someone knows how this is done please share your knowledge.

thanks in advance, Ilian Iliev

+2  A: 

This is what abstract models are for. Define once, and all children will acquire the fields in the abstract model, plus be able to define additional fields.

Ignacio Vazquez-Abrams