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
c6e04295
Commit
c6e04295
authored
Jan 10, 2015
by
guanghongwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
model
parent
30cfa8a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
models.py
jasset/models.py
+3
-3
models.py
juser/models.py
+2
-2
No files found.
jasset/models.py
View file @
c6e04295
import
datetime
from
django.db
import
models
from
juser.models
import
Group
as
UserGroup
from
juser.models
import
UserGroup
class
IDC
(
models
.
Model
):
...
...
@@ -11,7 +11,7 @@ class IDC(models.Model):
return
self
.
name
class
Group
(
models
.
Model
):
class
Bis
Group
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
80
,
unique
=
True
)
comment
=
models
.
CharField
(
max_length
=
160
,
blank
=
True
,
null
=
True
)
...
...
@@ -30,7 +30,7 @@ class Asset(models.Model):
port
=
models
.
SmallIntegerField
(
max_length
=
5
)
idc
=
models
.
ForeignKey
(
IDC
)
user_group
=
models
.
ManyToManyField
(
UserGroup
)
bis_group
=
models
.
ManyToManyField
(
Group
)
bis_group
=
models
.
ManyToManyField
(
Bis
Group
)
login_type
=
models
.
CharField
(
max_length
=
1
,
choices
=
LOGIN_TYPE_CHOICES
,
default
=
'L'
)
username_common
=
models
.
CharField
(
max_length
=
20
,
blank
=
True
,
null
=
True
)
password_common
=
models
.
CharField
(
max_length
=
80
,
blank
=
True
,
null
=
True
)
...
...
juser/models.py
View file @
c6e04295
from
django.db
import
models
class
Group
(
models
.
Model
):
class
User
Group
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
80
,
unique
=
True
)
comment
=
models
.
CharField
(
max_length
=
160
,
blank
=
True
,
null
=
True
)
...
...
@@ -20,7 +20,7 @@ class User(models.Model):
name
=
models
.
CharField
(
max_length
=
80
)
email
=
models
.
EmailField
(
max_length
=
75
,
null
=
True
,
blank
=
True
)
role
=
models
.
CharField
(
max_length
=
2
,
choices
=
USER_ROLE_CHOICES
,
default
=
'CU'
)
group
=
models
.
ManyToManyField
(
Group
)
user_group
=
models
.
ManyToManyField
(
User
Group
)
ldap_pwd
=
models
.
CharField
(
max_length
=
100
)
ssh_key_pwd1
=
models
.
CharField
(
max_length
=
100
)
ssh_key_pwd2
=
models
.
CharField
(
max_length
=
100
)
...
...
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