初始化模板和api模块

pull/530/head
Administrator 8 years ago
parent 82412831d5
commit c588436d55

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

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

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

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

@ -7,7 +7,6 @@ from django.views.generic.edit import CreateView, DeleteView, UpdateView
from django.views.generic.detail import DetailView, SingleObjectMixin from django.views.generic.detail import DetailView, SingleObjectMixin
from .hands import AdminUserRequiredMixin from .hands import AdminUserRequiredMixin
from .utils import *
class SudoListView(AdminUserRequiredMixin, ListView): class SudoListView(AdminUserRequiredMixin, ListView):
@ -38,13 +37,7 @@ class SudoListView(AdminUserRequiredMixin, ListView):
return super(AssetListView, self).get_context_data(**kwargs) return super(AssetListView, self).get_context_data(**kwargs)
class SudoCreateView(AdminUserRequiredMixin, class SudoCreateView(AdminUserRequiredMixin, CreateView):
CreateHostAliasMinxin,
CreateUserAliasMinxin,
CreateCmdAliasMinxin,
CreateRunasAliasMinxin,
CreateExtralineAliasMinxin,
CreateView):
model = Asset model = Asset
tag_type = 'asset' tag_type = 'asset'
form_class = AssetCreateForm form_class = AssetCreateForm
@ -72,13 +65,7 @@ class SudoCreateView(AdminUserRequiredMixin,
return super(AssetCreateView, self).get_context_data(**kwargs) return super(AssetCreateView, self).get_context_data(**kwargs)
class SudoUpdateView(AdminUserRequiredMixin, class SudoUpdateView(AdminUserRequiredMixin, UpdateView):
UpdateHostAliasMinxin,
UpdateUserAliasMinxin,
UpdateCmdAliasMinxin,
UpdateRunasAliasMinxin,
UpdateExtralineAliasMinxin,
UpdateView):
model = Asset model = Asset
form_class = AssetCreateForm form_class = AssetCreateForm
template_name = 'assets/asset_update.html' template_name = 'assets/asset_update.html'

Loading…
Cancel
Save