mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Shell -> ListShell
This commit is contained in:
parent
746eef0f74
commit
12cf400e2a
3 changed files with 8 additions and 8 deletions
|
@ -65,7 +65,7 @@ HISTORY_BIND = {
|
||||||
'school' : users.models.School,
|
'school' : users.models.School,
|
||||||
'listright' : users.models.ListRight,
|
'listright' : users.models.ListRight,
|
||||||
'serviceuser' : users.models.ServiceUser,
|
'serviceuser' : users.models.ServiceUser,
|
||||||
'shell' : users.models.ListShell,
|
'listshell' : users.models.ListShell,
|
||||||
},
|
},
|
||||||
'preferences' : {
|
'preferences' : {
|
||||||
'service' : preferences.models.Service,
|
'service' : preferences.models.Service,
|
||||||
|
@ -81,8 +81,8 @@ HISTORY_BIND = {
|
||||||
'port' : topologie.models.Port,
|
'port' : topologie.models.Port,
|
||||||
'room' : topologie.models.Room,
|
'room' : topologie.models.Room,
|
||||||
'stack' : topologie.models.Stack,
|
'stack' : topologie.models.Stack,
|
||||||
'model_switch' : topologie.models.ModelSwitch,
|
'modelswitch' : topologie.models.ModelSwitch,
|
||||||
'constructor_switch' : topologie.models.ConstructorSwitch,
|
'constructorswitch' : topologie.models.ConstructorSwitch,
|
||||||
'accesspoint' : topologie.models.AccessPoint,
|
'accesspoint' : topologie.models.AccessPoint,
|
||||||
},
|
},
|
||||||
'machines' : {
|
'machines' : {
|
||||||
|
|
|
@ -82,12 +82,12 @@ urlpatterns = [
|
||||||
url(r'^del_listright/$', views.del_listright, name='del-listright'),
|
url(r'^del_listright/$', views.del_listright, name='del-listright'),
|
||||||
url(r'^add_shell/$', views.add_shell, name='add-shell'),
|
url(r'^add_shell/$', views.add_shell, name='add-shell'),
|
||||||
url(
|
url(
|
||||||
r'^edit_shell/(?P<shellid>[0-9]+)$',
|
r'^edit_shell/(?P<listshellid>[0-9]+)$',
|
||||||
views.edit_shell,
|
views.edit_shell,
|
||||||
name='edit-shell'
|
name='edit-shell'
|
||||||
),
|
),
|
||||||
url(
|
url(
|
||||||
r'^del_shell/(?P<shellid>[0-9]+)$',
|
r'^del_shell/(?P<listshellid>[0-9]+)$',
|
||||||
views.del_shell,
|
views.del_shell,
|
||||||
name='del-shell'
|
name='del-shell'
|
||||||
),
|
),
|
||||||
|
|
|
@ -515,8 +515,8 @@ def add_shell(request):
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
@can_edit(ListShell)
|
@can_edit(ListShell)
|
||||||
def edit_shell(request, shell_instance, shellid):
|
def edit_shell(request, shell_instance, listshellid):
|
||||||
""" Editer un shell à partir du shellid"""
|
""" Editer un shell à partir du listshellid"""
|
||||||
shell = ShellForm(request.POST or None, instance=shell_instance)
|
shell = ShellForm(request.POST or None, instance=shell_instance)
|
||||||
if shell.is_valid():
|
if shell.is_valid():
|
||||||
with transaction.atomic(), reversion.create_revision():
|
with transaction.atomic(), reversion.create_revision():
|
||||||
|
@ -532,7 +532,7 @@ def edit_shell(request, shell_instance, shellid):
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
@can_delete(ListShell)
|
@can_delete(ListShell)
|
||||||
def del_shell(request, shell, shellid):
|
def del_shell(request, shell, listshellid):
|
||||||
"""Destruction d'un shell"""
|
"""Destruction d'un shell"""
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
with transaction.atomic(), reversion.create_revision():
|
with transaction.atomic(), reversion.create_revision():
|
||||||
|
|
Loading…
Reference in a new issue