Add natural key support to the user mailer model.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-08-03 18:52:53 -04:00
parent 0626529228
commit cbcb8a84c5
2 changed files with 14 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
from __future__ import unicode_literals
from django.db import models
class UserMailerManager(models.Manager):
def get_by_natural_key(self, label):
return self.get(label=label)