From c588436d55be8ebcaf220a75fc45750ce734671b Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 16 Nov 2016 15:00:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=92=8Capi=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/ops/api/__init__.py | 0 apps/ops/api/serializers.py | 0 apps/ops/api/views.py | 0 apps/ops/templates/sudo/create.html | 10 ++++++++++ apps/ops/templates/sudo/detail.html | 10 ++++++++++ apps/ops/templates/sudo/list.html | 10 ++++++++++ apps/ops/templates/sudo/update.html | 10 ++++++++++ apps/ops/views.py | 17 ++--------------- 8 files changed, 42 insertions(+), 15 deletions(-) create mode 100644 apps/ops/api/__init__.py create mode 100644 apps/ops/api/serializers.py create mode 100644 apps/ops/api/views.py create mode 100644 apps/ops/templates/sudo/create.html create mode 100644 apps/ops/templates/sudo/detail.html create mode 100644 apps/ops/templates/sudo/list.html create mode 100644 apps/ops/templates/sudo/update.html diff --git a/apps/ops/api/__init__.py b/apps/ops/api/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/apps/ops/api/serializers.py b/apps/ops/api/serializers.py new file mode 100644 index 000000000..e69de29bb diff --git a/apps/ops/api/views.py b/apps/ops/api/views.py new file mode 100644 index 000000000..e69de29bb diff --git a/apps/ops/templates/sudo/create.html b/apps/ops/templates/sudo/create.html new file mode 100644 index 000000000..566549bdf --- /dev/null +++ b/apps/ops/templates/sudo/create.html @@ -0,0 +1,10 @@ + + + + + Title + + + + + \ No newline at end of file diff --git a/apps/ops/templates/sudo/detail.html b/apps/ops/templates/sudo/detail.html new file mode 100644 index 000000000..566549bdf --- /dev/null +++ b/apps/ops/templates/sudo/detail.html @@ -0,0 +1,10 @@ + + + + + Title + + + + + \ No newline at end of file diff --git a/apps/ops/templates/sudo/list.html b/apps/ops/templates/sudo/list.html new file mode 100644 index 000000000..566549bdf --- /dev/null +++ b/apps/ops/templates/sudo/list.html @@ -0,0 +1,10 @@ + + + + + Title + + + + + \ No newline at end of file diff --git a/apps/ops/templates/sudo/update.html b/apps/ops/templates/sudo/update.html new file mode 100644 index 000000000..566549bdf --- /dev/null +++ b/apps/ops/templates/sudo/update.html @@ -0,0 +1,10 @@ + + + + + Title + + + + + \ No newline at end of file diff --git a/apps/ops/views.py b/apps/ops/views.py index b161cd0e5..89344583f 100644 --- a/apps/ops/views.py +++ b/apps/ops/views.py @@ -7,7 +7,6 @@ from django.views.generic.edit import CreateView, DeleteView, UpdateView from django.views.generic.detail import DetailView, SingleObjectMixin from .hands import AdminUserRequiredMixin -from .utils import * class SudoListView(AdminUserRequiredMixin, ListView): @@ -38,13 +37,7 @@ class SudoListView(AdminUserRequiredMixin, ListView): return super(AssetListView, self).get_context_data(**kwargs) -class SudoCreateView(AdminUserRequiredMixin, - CreateHostAliasMinxin, - CreateUserAliasMinxin, - CreateCmdAliasMinxin, - CreateRunasAliasMinxin, - CreateExtralineAliasMinxin, - CreateView): +class SudoCreateView(AdminUserRequiredMixin, CreateView): model = Asset tag_type = 'asset' form_class = AssetCreateForm @@ -72,13 +65,7 @@ class SudoCreateView(AdminUserRequiredMixin, return super(AssetCreateView, self).get_context_data(**kwargs) -class SudoUpdateView(AdminUserRequiredMixin, - UpdateHostAliasMinxin, - UpdateUserAliasMinxin, - UpdateCmdAliasMinxin, - UpdateRunasAliasMinxin, - UpdateExtralineAliasMinxin, - UpdateView): +class SudoUpdateView(AdminUserRequiredMixin, UpdateView): model = Asset form_class = AssetCreateForm template_name = 'assets/asset_update.html'