Polymorphic transaction
This commit is contained in:
parent
9207c5cdec
commit
c2fbb1bcdf
5 changed files with 20 additions and 48 deletions
|
|
@ -8,7 +8,7 @@ from django.urls import reverse
|
|||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views.generic import CreateView, ListView, UpdateView
|
||||
|
||||
from .models import Transaction, TransactionTemplate, Alias
|
||||
from .models import Transaction, TransactionTemplate, Alias, TemplateTransaction
|
||||
from .forms import TransactionForm, TransactionTemplateForm, ConsoForm
|
||||
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ class ConsoView(LoginRequiredMixin, CreateView):
|
|||
"""
|
||||
Consume
|
||||
"""
|
||||
model = Transaction
|
||||
model = TemplateTransaction
|
||||
template_name = "note/conso_form.html"
|
||||
form_class = ConsoForm
|
||||
|
||||
|
|
@ -152,3 +152,4 @@ class ConsoView(LoginRequiredMixin, CreateView):
|
|||
When clicking a button, reload the same page
|
||||
"""
|
||||
return reverse('note:consos')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue