Modernize usage of the AssignRemove CBV

This commit is contained in:
Roberto Rosario
2015-06-30 17:19:56 -04:00
parent 0bb8fa2ba9
commit e9ea2dc35a
10 changed files with 89 additions and 108 deletions
-3
View File
@@ -37,9 +37,6 @@ class Index(models.Model):
def get_absolute_url(self):
return reverse('indexing:index_instance_node_view', args=[self.instance_root.pk])
def get_document_types_not_in_index(self):
return DocumentType.objects.exclude(pk__in=self.document_types.all())
def save(self, *args, **kwargs):
"""Automatically create the root index template node"""
super(Index, self).save(*args, **kwargs)