improved NoteFormMixin, added Appel model and form in 'suivi'

This commit is contained in:
Arthur Gerbaud
2016-08-17 17:39:24 +02:00
parent d940bc5b1c
commit 9812aa858c
11 changed files with 76 additions and 50 deletions

8
sujets/forms.py Normal file
View File

@@ -0,0 +1,8 @@
from django.forms import ModelForm
from .models import Sujet
class SujetCreateForm(ModelForm):
class Meta:
model = Sujet
fields = ['nom', 'surnom', 'prenom', 'genre', 'premiere_rencontre']

View File

@@ -0,0 +1,6 @@
{% if user.is_superuser %}{% load bootstrap3 %}
<li class="dropdown app-menu"><a class="dropdown-toggle" data-toggle="dropdown" href="#">Sujet<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="{% url 'admin:notes_note_changelist' %}?sujet__personne_ptr__exact={{sujet.pk}}">{% bootstrap_icon "wrench" %} Éditer les notes</a></li>
</ul>
{% endif %}