diff --git a/nummi/main/models.py b/nummi/main/models.py index 50190cf..d967eda 100644 --- a/nummi/main/models.py +++ b/nummi/main/models.py @@ -53,9 +53,6 @@ class Account(NummiModel): def __str__(self): return str(self.name) - def get_create_url(self): - return reverse("new_account") - def get_absolute_url(self): return reverse("account", kwargs={"pk": self.pk}) @@ -102,9 +99,6 @@ class Category(NummiModel): def __str__(self): return str(self.name) - def get_create_url(self): - return reverse("new_category") - def get_absolute_url(self): return reverse("category", kwargs={"pk": self.pk}) @@ -189,9 +183,6 @@ class Snapshot(AccountModel): self.file.delete() super().delete(*args, **kwargs) - def get_create_url(self): - return reverse("new_snapshot") - def get_absolute_url(self): return reverse("snapshot", kwargs={"pk": self.pk}) @@ -254,9 +245,6 @@ class Transaction(NummiModel): def __str__(self): return f"{self.name}" - def get_create_url(self): - return reverse("new_transaction") - def get_absolute_url(self): return reverse("transaction", kwargs={"pk": self.pk}) @@ -306,9 +294,6 @@ class Invoice(NummiModel): self.file.delete() super().delete(*args, **kwargs) - def get_create_url(self): - return reverse("new_invoice", kwargs={"transaction_pk": self.transaction.pk}) - def get_absolute_url(self): return reverse( "invoice", kwargs={"transaction_pk": self.transaction.pk, "pk": self.pk} diff --git a/nummi/main/templates/main/form/base.html b/nummi/main/templates/main/form/base.html index 462f429..2904904 100644 --- a/nummi/main/templates/main/form/base.html +++ b/nummi/main/templates/main/form/base.html @@ -35,6 +35,7 @@ {% endif %}
{% block tables %}{% endblock %} diff --git a/nummi/main/templates/main/table/invoice.html b/nummi/main/templates/main/table/invoice.html index bc3024b..a1c9727 100644 --- a/nummi/main/templates/main/table/invoice.html +++ b/nummi/main/templates/main/table/invoice.html @@ -34,7 +34,7 @@