Пример #1
0
    def get(self, request, pk):
        linekedin_user = LinkedInUser.objects.get(id=pk)
        if linekedin_user.bot_ip:
            FreeBotIP(bot_ip=linekedin_user.bot_ip).save()
        if linekedin_user.is_dev:
            linekedin_user.delete()
            print('-----> ')
        else:
            linekedin_user.is_deleted = True
            linekedin_user.save()
            print(linekedin_user)

        return redirect('/accounts')
Пример #2
0
 def get(self, request, pk):
     linekedin_user = LinkedInUser.objects.get(id=pk)
     if linekedin_user.bot_ip:
         FreeBotIP(bot_ip=linekedin_user.bot_ip).save()
     linekedin_user.delete()
     return redirect('accounts')