def post(self, *args, **kwargs): AccountDeletion.mark(self.request.user) auth.logout(self.request) messages.add_message( self.request, self.messages["account_deleted"]["level"], self.messages["account_deleted"]["text"] % {"expunge_hours": settings.ACCOUNT_DELETION_EXPUNGE_HOURS}, ) return redirect(self.get_redirect_url())
def post(self, *args, **kwargs): AccountDeletion.mark(self.request.user) auth.logout(self.request) messages.add_message( self.request, self.messages["account_deleted"]["level"], self.messages["account_deleted"]["text"] % { "expunge_hours": settings.ACCOUNT_DELETION_EXPUNGE_HOURS, }) return redirect(self.get_redirect_url())
def form_valid(self, formset): for form in formset: deactivate = form.cleaned_data["deactivate"] if deactivate is True: user = User.objects.get(email=form.cleaned_data["email"]) AccountDeletion.mark(user) #Allocate an Enlingo Package Member quota to Customer InvitationStat.add_invites_to_user(self.request.user, +1) return super(MemberAccountDeactivate, self).form_valid(formset)
def form_valid(self, formset): for form in formset: deactivate = form.cleaned_data["deactivate"] if deactivate is True: user = User.objects.get(email=form.cleaned_data["email"]) AccountDeletion.mark(user) #Allocate an Enlingo Package Member quota to Customer InvitationStat.add_invites_to_user(self.request.user, +1) return super(MemberAccountDeactivate,self).form_valid(formset)
def handle(self, *args, **options): count = AccountDeletion.expunge() print("{0} expunged.".format(count))
def expunge_deleted(): return AccountDeletion.expunge()
def handle(self, *args, **options): count = AccountDeletion.expunge() print "%d expunged." % count