Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
a43ac90b
Commit
a43ac90b
authored
Aug 23, 2016
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify CRLF to LF
parent
bbecbc85
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
36 deletions
+36
-36
__init__.py
apps/__init__.py
+7
-7
api_urls.py
apps/users/api_urls.py
+16
-17
serializers.py
apps/users/serializers.py
+13
-12
No files found.
apps/__init__.py
View file @
a43ac90b
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
if
__name__
==
'__main__'
:
pass
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
if
__name__
==
'__main__'
:
pass
apps/users/api_urls.py
View file @
a43ac90b
# -*- coding: utf-8 -*-
#
from
django.conf.urls
import
url
,
include
from
rest_framework
import
routers
from
.api
import
UserViewSet
router
=
routers
.
DefaultRouter
()
router
.
register
(
r'users'
,
UserViewSet
)
urlpatterns
=
[
url
(
r'v1/'
,
include
(
router
.
urls
)),
url
(
r'^api-auth/'
,
include
(
'rest_framework.urls'
,
namespace
=
'rest_framework'
))
]
# -*- coding: utf-8 -*-
#
from
django.conf.urls
import
url
,
include
from
rest_framework
import
routers
from
.api
import
UserViewSet
router
=
routers
.
DefaultRouter
()
router
.
register
(
r'users'
,
UserViewSet
)
urlpatterns
=
[
url
(
r'v1/'
,
include
(
router
.
urls
)),
url
(
r'^api-auth/'
,
include
(
'rest_framework.urls'
,
namespace
=
'rest_fr
\ No newline at end of file
apps/users/serializers.py
View file @
a43ac90b
# -*- coding: utf-8 -*-
#
from
rest_framework
import
serializers
from
.models
import
Role
,
User
,
UserGroup
class
UserSerializer
(
serializers
.
HyperlinkedModelSerializer
):
class
Meta
:
model
=
User
fields
=
'__all__'
# -*- coding: utf-8 -*-
#
from
rest_framework
import
serializers
from
.models
import
Role
,
User
,
UserGroup
class
UserSerializer
(
serializers
.
HyperlinkedModelSerializer
):
class
Meta
:
model
=
User
fields
=
\ No newline at end of file
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