Commit 8b4125a2 authored by Pierre-antoine Comby's avatar Pierre-antoine Comby

add templates forms and tags

parent 075f30d9
Pipeline #1427 passed with stage
in 2 minutes and 51 seconds
#!/usr/bin/env python
from django import forms
from .models import TransactionTemplate
class TransactionTemplateForm(forms.ModelForm):
class Meta:
model = TransactionTemplate
fields ='__all__'
{% extends "base.html" %}
{% load static %}
{% load crispy_forms_tags %}
{% block content %}
<p><a class="btn btn-default" href="{% url 'note:template_list' %}">book Listing</a></p>
<form method="post">
{% csrf_token %}
{{form|crispy}}
<button class="btn btn-primary" type="submit">Submit</button>
</form>
{% endblock %}
{% extends "base.html" %}
{% block content %}
<table class="table">
<tr>
<td>ID</td><td>Link</td>
<td>name</td>
<td>destinataire</td>
<td>montant</td>
<td>catégorie</td>
</tr>
{% for object in object_list %}
<tr>
<td>{{object.pk}}</td>
<td><a href="{{object.get_absolute_url}}">{{object}}</a></td>
<td>{{ object.name }}</td>
<td>{{ object.destination }}</td>
<td>{{ object.amount }}</td>
<td>{{ object.template_type }}</td>
</tr>
{% endfor %}
</table>
<a class="btn btn-primary" href="{% url 'note:template_create' %}">New Template</a>
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment