diff options
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 9c139086b..0ee33d5ed 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -74,6 +74,7 @@ from django.template import Context, Template from django.template.defaultfilters import slugify from django.urls import reverse from django.utils.functional import lazy +from ishtar_common.data_importer import post_importer_action from ishtar_common.utils import ( ugettext_lazy as _, ugettext, @@ -3383,6 +3384,16 @@ class IshtarUser(FullSearch): def full_label(self): return self.person.full_label() + @post_importer_action + def import_set_password(self, context, value): + self.user_ptr.set_password(value) + self.user_ptr.save() + + @post_importer_action + def import_create_profile(self, context, value): + UserProfile.objects.get_or_create(person=self.person, profile_type=value, + defaults={"name":value.label}) + post_save.connect(cached_label_changed, sender=IshtarUser) |