Add filenames accesor for DocumentType model

This commit is contained in:
Roberto Rosario
2014-10-27 23:22:35 -04:00
parent 21d51accec
commit 6ad26f3c9a
2 changed files with 2 additions and 2 deletions

View File

@@ -540,7 +540,7 @@ class DocumentTypeFilename(models.Model):
List of filenames available to a specific document type for the
quick rename functionality
"""
document_type = models.ForeignKey(DocumentType, verbose_name=_(u'Document type'))
document_type = models.ForeignKey(DocumentType, related_name='filenames', verbose_name=_(u'Document type'))
filename = models.CharField(max_length=128, verbose_name=_(u'Filename'), db_index=True)
enabled = models.BooleanField(default=True, verbose_name=_(u'Enabled'))