customized admin styling, added get_absolute_url for Note model,

added inline in Sujet admin to show FicheStatistique
This commit is contained in:
artus40
2017-08-31 19:57:55 +02:00
parent 3cb6140417
commit f91d94685d
9 changed files with 384 additions and 21 deletions

View File

@@ -2,7 +2,7 @@ import logging
from django.utils import timezone
from django.core.exceptions import ValidationError
from django.urls import reverse
from django.shortcuts import reverse
from django.db import models
from . import managers
@@ -176,3 +176,6 @@ class Note(models.Model):
return getter
bg_colors = property(cached_attr('bg_colors'), doc="background color of header")
labels = property(cached_attr('labels'), doc="list of string to display as labels")
def get_absolute_url(self):
return reverse("notes:details-sujet", kwargs={"pk": self.sujet.pk})