From 2cbb1bc9e129dbaa21f9f346efc5c94c25100da2 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 7 Sep 2017 00:11:49 -0400 Subject: [PATCH] Add get_absolute_url method to document types. Signed-off-by: Roberto Rosario --- mayan/apps/documents/models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mayan/apps/documents/models.py b/mayan/apps/documents/models.py index b1e966cb77..7146cb56a0 100644 --- a/mayan/apps/documents/models.py +++ b/mayan/apps/documents/models.py @@ -100,6 +100,11 @@ class DocumentType(models.Model): return super(DocumentType, self).delete(*args, **kwargs) + def get_absolute_url(self): + return reverse( + 'documents:document_type_document_list', args=(self.pk,) + ) + def natural_key(self): return (self.label,)