The 'delete' admin view for this model.
334224
def delete_view(self, request, object_id, extra_context=None):
        ""
        queryset = self.model._default_manager.filter(pk=object_id)
        response = self.delete_selected(request, queryset)
        if response:
            return response
        url = reverse('admin:%s_%s_changelist' % (self.model._meta.app_label, self.model._meta.model_name))
        return HttpResponseRedirect(url)
951599
def delete(self):
        
        table_client = self._instance._client.table_admin_client
        table_client.delete_table(name=self.name)
1131437
def delete(self):
        """"""
        # set 'loaded' first ... so if we have to bail, we know we tried.
        self.loaded = True
        if not hasattr(self.manager, "delete"):
            return
        self.manager.delete(self)
995090
public function delete()
    {
        if (!$this->_canKept) {
            $this->forceDelete();
        } else {
            Query::table(static::$table)
            ->set('deleted_at', Time::current())
            ->where($this->_keyName, '=', $this->_keyValue)
            ->update();
        }
    }
811849
public function delete()
    {
        $this->brokenOnDelete = true;
        $this->onBeforeDelete();
        if ($this->brokenOnDelete) {
            user_error("$this->class has a broken onBeforeDelete() function."
            . " Make sure that you call parent::onBeforeDelete().", E_USER_ERROR);
        }

        $path = $this->getFullPath();
        if (file_exists($path)) {
            unlink($path);
        }
        if ($this->storeRecord) {
            $this->storeRecord->delete();
        }

        $this->flushCache();
        $this->onAfterDelete();
    }
1025206
public function actionDeleteAll()
    {
        if (isset($_POST['items'])) {
            foreach ($_POST['items'] as $id) {
                $this->findModel($id)->delete();
            }
        }
    }
302787
public function delete() {
    $this->requireTransaction();
    // delegate to DeleteController
    $subResponse = $this->executeSubAction('delete');

    // prevent commit
    if ($subResponse->hasErrors()) {
      $this->endTransaction(false);
    }
    $this->handleSubResponse($subResponse);
  }
84959
public function down()
    {
        if (is_null($this->userClassName)) {
            throw new Exception('Admin user model not defined');
        }
        DB::transaction(function () {
            foreach ($this->users as $user) {
                $userItem = DB::table($this->userTable)->where('email', $user['email'])->first();
                if (!is_null($userItem)) {
                    AdminUser::find($userItem->id)->media()->delete();
                    DB::table($this->userTable)->where('id', $userItem->id)->delete();
                    DB::table('model_has_permissions')->where([
                        'model_id' => $userItem->id,
                        'model_type' => $this->userClassName
                    ])->delete();
                    DB::table('model_has_roles')->where([
                        'model_id' => $userItem->id,
                        'model_type' => $this->userClassName
                    ])->delete();
                }
            }

            foreach ($this->roles as $role) {
                $roleItem = DB::table('roles')->where([
                    'name' => $role['name'],
                    'guard_name' => $role['guard_name']
                ])->first();
                if (!is_null($roleItem)) {
                    DB::table('roles')->where('id', $roleItem->id)->delete();
                    DB::table('model_has_roles')->where('role_id', $roleItem->id)->delete();
                }
            }

            foreach ($this->permissions as $permission) {
                $permissionItem = DB::table('permissions')->where([
                    'name' => $permission['name'],
                    'guard_name' => $permission['guard_name']
                ])->first();
                if (!is_null($permissionItem)) {
                    DB::table('permissions')->where('id', $permissionItem->id)->delete();
                    DB::table('model_has_permissions')->where('permission_id', $permissionItem->id)->delete();
                }
            }
        });
        app()['cache']->forget(config('permission.cache.key'));
    }
694061
public function deleteAction()
    {
        if ($this->isConfirmedItem($this->_('Delete %s'))) {
            $model   = $this->getModel();
            $deleted = $model->delete();

            $this->addMessage(sprintf($this->_('%2$u %1$s deleted'), $this->getTopic($deleted), $deleted), 'success');
            $this->_reroute(array('action' => 'index'), true);
        }
    }
406875
public function actionRemove()
    {
        $username = $this->prompt('Username:', ['required' => true]);
        $user = $this->findModel($username);
        $this->log($this->repository->remove($user));
    }
76552
def remove_model(self, model, **kwargs):
        
        kwargs['model'] = model
        kwargs['context'] = 'model'
        self.remove_parameters_all(**kwargs)
867141
def delete(self, uid):
        '''
        
        '''
        if self.check_post_role()['DELETE']:
            pass
        else:
            return False

        histinfo = MWikiHist.get_by_uid(uid)
        if histinfo:
            pass
        else:
            return False

        postinfo = MWiki.get_by_uid(histinfo.wiki_id)
        MWikiHist.delete(uid)
        self.redirect('/wiki_man/view/{0}'.format(postinfo.uid))
570481
def delete(self):
        
        self.__dmlquery__(self.__class__, self,
                          batch=self._batch,
                          timestamp=self._timestamp,
                          consistency=self.__consistency__,
                          timeout=self._timeout).delete()
253758
public function delete()
    {
        if (!userHasPermission('admin:blog:blog:delete')) {

            unauthorised();
        }

        // --------------------------------------------------------------------------

        $blog = $this->blog_model->getById($this->uri->segment(5));

        if (empty($blog)) {

            $this->session->set_flashdata('error', 'You specified an invalid Blog ID.');
            redirect('admin/blog/blog/index');
        }

        // --------------------------------------------------------------------------

        if ($this->blog_model->delete($blog->id)) {

            $this->session->set_flashdata('success', 'Blog was deleted successfully.');

        } else {

            $this->session->set_flashdata('error', 'Failed to delete blog. ' . $this->blog_model->lastError());
        }

        redirect('admin/blog/blog/index');
    }
1255950
def generate_delete_view(self):
        """"""

        name = model_class_form(self.model + 'DeleteView')
        delete_args = dict(
            model=self.get_model_class,
            template_name=self.get_template('delete'),
            permissions=self.view_permission('delete'),
            permission_required=self.check_permission_required,
            login_required=self.check_login_required,
            success_url=reverse_lazy('{}-{}-list'.format(self.app, self.custom_postfix_url)),
            custom_postfix_url=self.custom_postfix_url
        )

        delete_class = type(name, (CrudBuilderMixin, DeleteView), delete_args)
        self.classes[name] = delete_class
        return delete_class
723448
protected function clearViews()
    {
        $this->info('Clearing compiled views');

        try {
            Artisan::call('view:clear');
        } catch (InvalidArgumentException $e) {
            $views = $this->laravel['files']->glob(
                $this->laravel['config']['view.compiled'].'/*'
            );

            foreach ($views as $view) {
                $this->laravel['files']->delete($view);
            }
        }
    }
901713
def delete(cls):
        

        class PopupDeleteViewView(PopupDeleteView, cls.parent_class):
            model = cls.model
            form_class = cls.form_class
            permission_required = cls.get_permission_required('delete')

        return PopupDeleteViewView