Renamed the routes of the transactions.
This commit is contained in:
		@@ -152,13 +152,16 @@ class Transaction(models.Model):
 | 
				
			|||||||
        """Returns the URL to view this transaction."""
 | 
					        """Returns the URL to view this transaction."""
 | 
				
			||||||
        if self.is_cash_expense:
 | 
					        if self.is_cash_expense:
 | 
				
			||||||
            return reverse(
 | 
					            return reverse(
 | 
				
			||||||
                "accounting:transaction", args=("expense", self.sn))
 | 
					                "accounting:transactions.view",
 | 
				
			||||||
 | 
					                args=("expense", self.sn))
 | 
				
			||||||
        elif self.is_cash_income:
 | 
					        elif self.is_cash_income:
 | 
				
			||||||
            return reverse(
 | 
					            return reverse(
 | 
				
			||||||
                "accounting:transaction", args=("income", self.sn))
 | 
					                "accounting:transactions.view",
 | 
				
			||||||
 | 
					                args=("income", self.sn))
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            return reverse(
 | 
					            return reverse(
 | 
				
			||||||
                "accounting:transaction", args=("transfer", self.sn))
 | 
					                "accounting:transactions.view",
 | 
				
			||||||
 | 
					                args=("transfer", self.sn))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __str__(self):
 | 
					    def __str__(self):
 | 
				
			||||||
        """Returns the string representation of this accounting
 | 
					        """Returns the string representation of this accounting
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,7 +44,7 @@ urlpatterns = [
 | 
				
			|||||||
    path("cash/<str:subject_code>/<str:period_spec>",
 | 
					    path("cash/<str:subject_code>/<str:period_spec>",
 | 
				
			||||||
         views.CashReportView.as_view(), name="cash"),
 | 
					         views.CashReportView.as_view(), name="cash"),
 | 
				
			||||||
    path("transactions/<txn-type:type>/<int:pk>",
 | 
					    path("transactions/<txn-type:type>/<int:pk>",
 | 
				
			||||||
         views.CashReportView.as_view(), name="transaction"),
 | 
					         views.CashReportView.as_view(), name="transactions.view"),
 | 
				
			||||||
    path("transactions/<txn-type:type>/<int:pk>/edit",
 | 
					    path("transactions/<txn-type:type>/<int:pk>/edit",
 | 
				
			||||||
         views.CashReportView.as_view(), name="transaction.edit"),
 | 
					         views.CashReportView.as_view(), name="transactions.edit"),
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user