A
A
abbrakadabbra2019-06-10 12:43:25
Django
abbrakadabbra, 2019-06-10 12:43:25

Grouping model methods through inheritance?

There is a model (not abstract) in which a huge number of methods have accumulated. I would like to sort this out somehow. I came up with the idea to create a separate class (abstract) for each type of task (validation, sending mail, tasks, etc.) and then inherit from them.
Is this good practice? What disadvantages can she have?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Sviridov, 2019-06-11
@dimuska139

In this case, I use this library . I don't know why everyone here advises code navigation and so on. "Thick" models are really inconvenient, you need to get away from this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question