Added the get_absolute_url() method to the account data model in the accounting application.

This commit is contained in:
依瑪貓 2020-08-13 22:15:54 +08:00
parent f2455bb946
commit 5a91e85c8e

View File

@ -82,6 +82,10 @@ class Account(DirtyFieldsMixin, models.Model):
super().save(force_insert=force_insert, force_update=force_update,
using=using, update_fields=update_fields)
def get_absolute_url(self):
"""REturns the """
return reverse("accounting:accounts.detail", args=(self,))
class Meta:
db_table = "accounting_accounts"