add use of NoteManager custom method, template fix

This commit is contained in:
Arthur Gerbaud
2016-08-07 12:02:51 +02:00
parent 9646c9f8ab
commit 473acf8f2b
4 changed files with 11 additions and 13 deletions

View File

@@ -28,5 +28,5 @@ class SuiviSujetView(SuivisView, generic.DetailView):
def get_context_data(self, *args, **kwargs):
context = super().get_context_data(*args, **kwargs)
context['notes'] = self.object.notes.all().order_by('created_date')
context['notes'] = self.object.notes.by_date(reverse=True)
return context