From 8b4125a25d5fff35921201997df343cf6c16e509 Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby Date: Sun, 11 Aug 2019 19:55:04 +0200 Subject: [PATCH] add templates forms and tags --- apps/note/forms.py | 9 ++++++++ templates/note/transactiontemplate_form.html | 11 +++++++++ templates/note/transactiontemplate_list.html | 24 ++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 apps/note/forms.py create mode 100644 templates/note/transactiontemplate_form.html create mode 100644 templates/note/transactiontemplate_list.html diff --git a/apps/note/forms.py b/apps/note/forms.py new file mode 100644 index 00000000..d74fa5b4 --- /dev/null +++ b/apps/note/forms.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python + +from django import forms +from .models import TransactionTemplate + +class TransactionTemplateForm(forms.ModelForm): + class Meta: + model = TransactionTemplate + fields ='__all__' diff --git a/templates/note/transactiontemplate_form.html b/templates/note/transactiontemplate_form.html new file mode 100644 index 00000000..82bb050e --- /dev/null +++ b/templates/note/transactiontemplate_form.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% load static %} +{% load crispy_forms_tags %} +{% block content %} +

book Listing

+
+{% csrf_token %} +{{form|crispy}} + +
+{% endblock %} diff --git a/templates/note/transactiontemplate_list.html b/templates/note/transactiontemplate_list.html new file mode 100644 index 00000000..25946322 --- /dev/null +++ b/templates/note/transactiontemplate_list.html @@ -0,0 +1,24 @@ +{% extends "base.html" %} +{% block content %} + + + + + + + + + +{% for object in object_list %} + + + + + + + + +{% endfor %} +
IDLinknamedestinatairemontantcatégorie
{{object.pk}}{{object}}{{ object.name }}{{ object.destination }}{{ object.amount }}{{ object.template_type }}
+New Template +{% endblock %}