Пример #1
0
 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())
Пример #2
0
 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())
Пример #3
0
 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)
Пример #4
0
 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)
Пример #5
0
 def handle(self, *args, **options):
     count = AccountDeletion.expunge()
     print("{0} expunged.".format(count))
Пример #6
0
def expunge_deleted():
    return AccountDeletion.expunge()
 def handle(self, *args, **options):
     count = AccountDeletion.expunge()
     print "%d expunged." % count
 def handle(self, *args, **options):
     count = AccountDeletion.expunge()
     print "%d expunged." % count
Пример #9
0
def expunge_deleted():
    return AccountDeletion.expunge()