Via https://infosec.exchange/@ubernostrum/111598531662066511
django·DjangobyJason Novinger Don't use class methods on Django modelsVia https://infosec.exchange/@ubernostrum/111598531662066511https://www.b-list.org/weblog/2023/dec/17/django-model-classmethod/Open linkView original on programming.dev9Comments2Reply
mmrgreen programming.devThe reasoning does not seem that convincing. I also don't create new instances from the Manager but instead use the normal constructor like this: instance = models.MyModel(...) # instead of something like models.objects.create(...) So I would want alternative constructors in the same place...2Reply
jjjjalljs ttrpg.networkFeel like the post's explanation for why was a little lacking. But I don't think I was going to use class methods on my models anyway, so that works out.2Reply
2 replies
The reasoning does not seem that convincing. I also don't create new instances from the Manager but instead use the normal constructor like this:
So I would want alternative constructors in the same place...
Feel like the post's explanation for why was a little lacking. But I don't think I was going to use class methods on my models anyway, so that works out.