Add natural key to the Index model

This commit is contained in:
Roberto Rosario
2012-10-05 03:05:25 -04:00
parent 065bfd9136
commit e7839dc4ca
2 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
from __future__ import absolute_import
from django.db import models
class IndexManager(models.Manager):
def get_by_natural_key(self, name):
return self.get(name=name)