Add natural key handling to Index model

This commit is contained in:
Roberto Rosario
2012-09-27 01:51:44 -04:00
parent 9b70f6c11c
commit b4b7d610f9
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)