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
98d6043f
Commit
98d6043f
authored
Aug 16, 2016
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merged
parent
3bf0d4aa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
29 deletions
+50
-29
common_tags.py
apps/common/templatetags/common_tags.py
+20
-20
0005_auto_20160816_2252.py
apps/users/migrations/0005_auto_20160816_2252.py
+20
-0
user_edit.html
apps/users/templates/users/user_edit.html
+10
-9
No files found.
apps/common/templatetags/common_tags.py
View file @
98d6043f
# ~*~ coding: utf-8 ~*~
# ~*~ coding: utf-8 ~*~
from
django
import
template
from
django
import
template
from
django.utils
import
timezone
from
django.utils
import
timezone
register
=
template
.
Library
()
register
=
template
.
Library
()
@register.filter
@register.filter
def
join_queryset_attr
(
queryset
,
attr
,
delimiter
=
', '
):
def
join_queryset_attr
(
queryset
,
attr
,
delimiter
=
', '
):
return
delimiter
.
join
([
getattr
(
obj
,
attr
,
''
)
for
obj
in
queryset
])
return
delimiter
.
join
([
getattr
(
obj
,
attr
,
''
)
for
obj
in
queryset
])
@register.filter
@register.filter
def
is_expired
(
datetime
):
def
is_expired
(
datetime
):
if
datetime
>
timezone
.
now
():
if
datetime
>
timezone
.
now
():
return
False
return
False
else
:
else
:
return
True
return
True
apps/users/migrations/0005_auto_20160816_2252.py
0 → 100644
View file @
98d6043f
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-16 14:52
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'users'
,
'0004_auto_20160815_2257'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'user'
,
name
=
'comment'
,
field
=
models
.
TextField
(
blank
=
True
,
max_length
=
200
,
verbose_name
=
'
\u63cf\u8ff0
'
),
),
]
apps/users/templates/users/user_edit.html
View file @
98d6043f
{% extends 'users/_user.html' %}
{% extends 'users/_user.html' %}
{% block password %}
{% block password %}
<h3>
密码
</h3>
<h3>
密码
</h3>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"password"
class=
"col-sm-2 control-label"
>
密码
</label>
<label
for=
"password"
class=
"col-sm-2 control-label"
>
密码
</label>
<div
class=
"col-sm-9 controls"
>
<div
class=
"col-sm-9 controls"
>
<input
id=
"password"
name=
"password"
type=
"password"
class=
"form-control"
>
<input
id=
"password"
name=
"password"
type=
"password"
class=
"form-control"
>
</div>
</div>
</div>
</div>
{% endblock %}
{% endblock %}
\ 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