From c074f4d9259c6e853b7b3d636ebc4ab042f3e2a2 Mon Sep 17 00:00:00 2001 From: Ross Lawley Date: Fri, 29 Nov 2013 13:19:52 +0000 Subject: [PATCH] Django 1.6 login fix (#522) --- docs/changelog.rst | 1 + mongoengine/django/mongo_auth/models.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 43404d1a..6b950318 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,7 @@ Changelog Changes in 0.8.5 ================ +- Django 1.6 login fix (#522) - Django 1.6 session fix (#509) - EmbeddedDocument._instance is now set when settng the attribute (#506) - Fixed EmbeddedDocument with ReferenceField equality issue (#502) diff --git a/mongoengine/django/mongo_auth/models.py b/mongoengine/django/mongo_auth/models.py index c391fc9d..60965e6d 100644 --- a/mongoengine/django/mongo_auth/models.py +++ b/mongoengine/django/mongo_auth/models.py @@ -1,4 +1,5 @@ from django.conf import settings +from django.contrib.auth.hashers import make_password from django.contrib.auth.models import UserManager from django.core.exceptions import ImproperlyConfigured from django.db import models @@ -108,3 +109,7 @@ class MongoUser(models.Model): class Meta: app_label = 'mongo_auth' + + def set_password(self, password): + """Doesn't do anything, but works around the issue with Django 1.6.""" + make_password(password)