1👍
I think what you are looking for is a django model manager here
for example:
class PackageManager(models.Manager)
def get_package_price(self, package_instance):
# Get your price
class Package(models.Model):
objects = PackageManager()
# Rest of your model
and then you can call it by: Package.objects.get_package_price(package_instance)
👤liam
Source:stackexchange.com