I have model
Order(models.Model):
name = models.Charfield()
@classmethod
do_something(cls):
print('do soemthing')
What I want to do is to move do_something
method from my model to another file.I want to do it because I have several other big methods in this model and want to structure the code, don't like lengh of this file. It's getting big > 700 lines of code.
So I want to move my method to another file and import it, so it still can be used like modelmethod
like this:
Order.do_something()
Any ideas?