Browse Source

初始化模板和api模块

pull/530/head
Administrator 8 years ago
parent
commit
c588436d55
  1. 0
      apps/ops/api/__init__.py
  2. 0
      apps/ops/api/serializers.py
  3. 0
      apps/ops/api/views.py
  4. 10
      apps/ops/templates/sudo/create.html
  5. 10
      apps/ops/templates/sudo/detail.html
  6. 10
      apps/ops/templates/sudo/list.html
  7. 10
      apps/ops/templates/sudo/update.html
  8. 17
      apps/ops/views.py

0
apps/ops/api/__init__.py

0
apps/ops/api/serializers.py

0
apps/ops/api/views.py

10
apps/ops/templates/sudo/create.html

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

10
apps/ops/templates/sudo/detail.html

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

10
apps/ops/templates/sudo/list.html

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

10
apps/ops/templates/sudo/update.html

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

17
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'

Loading…
Cancel
Save