def save(self, *args, **kwargs): user = kwargs.pop("user") to_return = super(FileForm, self).save(*args, **kwargs) FileTag.objects.retag(tags=self.cleaned_data['tags'], user=user, taggable_object=self.instance) make_searchable(self.instance) return to_return
def save(self, *args, **kwargs): in_create_mode = self.in_create_mode() if in_create_mode: self.instance.set_password(self.cleaned_data.pop("password")) user = super(UserForm, self).save(*args, **kwargs) make_searchable(self.instance) return user
def save(self, *args, **kwargs): try: self.slug = self.get_slug() except IntegrityError as e: self.slug = self.get_slug() to_return = super(Group, self).save(*args, **kwargs) make_searchable(self) return to_return
def save(self, *args, **kwargs): # generate a slug for the file if self.pk is None: try: self.slug = self.get_slug() except IntegrityError as e: # Running this twice should fix any issues with collisions since there are well over # 3x10^30 possibilities for ASCII strings of length 16 alone. self.slug = self.get_slug() to_return = super(File, self).save(*args, **kwargs) # make the file searchable make_searchable(self) return to_return
def save(self, *args, **kwargs): self.slug = self.get_slug() to_return = super(User, self).save(*args, **kwargs) make_searchable(self) return to_return
def save(self, *args, **kwargs): to_return = super(GroupForm, self).save(*args, **kwargs) make_searchable(self.instance) return to_return