This is a minor cleanup but touches on something I'll use in #1860.
For the method get_slug(self) in models where it appears, replace it with a @property decorator.
There are a lot more instances of def get_something_easily_computable(self) that could be switched to a property, and even more cases like:
@property
def get_something(self)
which is surprising—I would not expect a property to be prepended by get_, and some of these methods do more computation than is recommended for properties. See https://realpython.com/python-getter-setter/ for best practices if you're curious!
Also removes one seemingly unused property: LegalDocument.get_title()
This is a minor cleanup but touches on something I'll use in #1860.
For the method
get_slug(self)
in models where it appears, replace it with a@property
decorator.There are a lot more instances of
def get_something_easily_computable(self)
that could be switched to a property, and even more cases like:which is surprising—I would not expect a property to be prepended by
get_
, and some of these methods do more computation than is recommended for properties. See https://realpython.com/python-getter-setter/ for best practices if you're curious!Also removes one seemingly unused property:
LegalDocument.get_title()