Add natural key to the DocumentType model to allow dumping and loading via the bootstrap app

This commit is contained in:
Roberto Rosario
2012-09-22 03:01:33 -04:00
parent d48338a989
commit 47ac12b4d1
2 changed files with 13 additions and 1 deletions
+5
View File
@@ -45,3 +45,8 @@ class RecentDocumentManager(models.Manager):
return document_model.objects.filter(recentdocument__user=user)
else:
return []
class DocumentTypeManager(models.Manager):
def get_by_natural_key(self, name):
return self.get(name=name)