Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
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
5795d50c
authored
Sep 02, 2013
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: access only for superusers
parent
70471140
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
cloud/urls.py
+6
-2
network/urls.py
+0
-1
No files found.
cloud/urls.py
View file @
5795d50c
from
django.conf.urls
import
patterns
,
include
,
url
from
django.contrib.auth.decorators
import
user_passes_test
from
django.contrib
import
admin
from
decorator_include
import
decorator_include
admin
.
autodiscover
()
...
...
@@ -8,12 +9,15 @@ js_info_dict = {
'packages'
:
(
'one'
,
),
}
superuser_required
=
user_passes_test
(
lambda
u
:
u
.
is_superuser
)
urlpatterns
=
patterns
(
''
,
url
(
r'^admin/doc/'
,
include
(
'django.contrib.admindocs.urls'
),
),
url
(
r'^admin/'
,
include
(
admin
.
site
.
urls
),
),
url
(
r'^network/'
,
include
(
'network.urls'
),
),
url
(
r'^network/'
,
decorator_include
(
superuser_required
,
'network.urls'
)),
url
(
r'^login/$'
,
'school.views.login'
,
name
=
'login'
,
),
...
...
network/urls.py
View file @
5795d50c
from
django.conf.urls
import
patterns
,
url
from
.views
import
(
IndexView
,
HostList
,
HostDetail
,
HostCreate
,
HostDelete
,
VlanList
,
VlanDetail
,
VlanDelete
,
VlanCreate
,
...
...
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