Commit 12cf400e authored by Gabriel Detraz's avatar Gabriel Detraz Committed by chirac

Shell -> ListShell

parent 746eef0f
...@@ -65,7 +65,7 @@ HISTORY_BIND = { ...@@ -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 = { ...@@ -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 = [ ...@@ -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): ...@@ -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): ...@@ -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():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment