mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-22 18:38:23 +02:00
Polymorphic transaction
This commit is contained in:
committed by
Pierre-antoine Comby
parent
9207c5cdec
commit
c2fbb1bcdf
@ -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')
|
||||
|
||||
|
Reference in New Issue
Block a user