Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1e7cd0f7
authored
Jul 24, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: use vid instead of id for VlanDetail urls
parent
ac0e2797
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
network/tables.py
+1
-1
network/urls.py
+1
-1
network/views.py
+2
-0
No files found.
network/tables.py
View file @
1e7cd0f7
...
...
@@ -37,7 +37,7 @@ class SmallHostTable(Table):
class
VlanTable
(
Table
):
name
=
LinkColumn
(
'network.vlan'
,
args
=
[
A
(
'
pk
'
)])
name
=
LinkColumn
(
'network.vlan'
,
args
=
[
A
(
'
vid
'
)])
class
Meta
:
model
=
Vlan
...
...
network/urls.py
View file @
1e7cd0f7
...
...
@@ -13,5 +13,5 @@ urlpatterns = patterns(
url
(
'^hosts/$'
,
HostList
.
as_view
(),
name
=
'network.host_list'
),
url
(
'^hosts/(?P<pk>
\
d+)/$'
,
HostDetail
.
as_view
(),
name
=
'network.host'
),
url
(
'^vlans/$'
,
VlanList
.
as_view
(),
name
=
'network.vlan_list'
),
url
(
'^vlans/(?P<
pk
>
\
d+)/$'
,
VlanDetail
.
as_view
(),
name
=
'network.vlan'
),
url
(
'^vlans/(?P<
vid
>
\
d+)/$'
,
VlanDetail
.
as_view
(),
name
=
'network.vlan'
),
)
network/views.py
View file @
1e7cd0f7
...
...
@@ -71,6 +71,8 @@ class VlanDetail(UpdateView):
model
=
Vlan
template_name
=
"network/vlan-edit.html"
form_class
=
VlanForm
slug_field
=
'vid'
slug_url_kwarg
=
'vid'
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
VlanDetail
,
self
)
.
get_context_data
(
**
kwargs
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment