The initialization/constructor method for classes and database models is: init.
init
class MyClass: def init(self, param1, param2): self.param1 = param1 self.param2 = param2 my_class = MyClass('abc', 123)
Last updated 4 years ago