Add delete button to transaction form
This commit is contained in:
parent
df0882bd88
commit
83aefe1f84
3 changed files with 9 additions and 0 deletions
|
@ -66,6 +66,13 @@ def update_transaction(request, uuid):
|
|||
return redirect(transaction, uuid=uuid)
|
||||
|
||||
|
||||
@login_required
|
||||
def del_transaction(request, uuid):
|
||||
_transaction = get_object_or_404(Transaction, id=uuid)
|
||||
_transaction.delete()
|
||||
return redirect(index)
|
||||
|
||||
|
||||
@login_required
|
||||
def invoice(request, uuid):
|
||||
_invoice = get_object_or_404(Invoice, id=uuid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue