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
a0ef3cfc
Commit
a0ef3cfc
authored
Sep 05, 2016
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update locale dir name to zh
parent
1b9c9c48
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
7 additions
and
12 deletions
+7
-12
settings.py
apps/jumpserver/settings.py
+3
-2
django.mo
apps/locale/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/locale/zh/LC_MESSAGES/django.po
+0
-0
django.mo
apps/locale/zh_CN/LC_MESSAGES/django.mo
+0
-0
django.po
apps/locale/zh_CN/LC_MESSAGES/django.po
+0
-0
django.mo
apps/users/locale/zh_CN/LC_MESSAGES/django.mo
+0
-0
login.html
apps/users/templates/users/login.html
+0
-8
views.py
apps/users/views.py
+4
-2
No files found.
apps/jumpserver/settings.py
View file @
a0ef3cfc
...
...
@@ -75,12 +75,12 @@ INSTALLED_APPS = [
MIDDLEWARE
=
[
'django.middleware.security.SecurityMiddleware'
,
'django.contrib.sessions.middleware.SessionMiddleware'
,
'django.middleware.locale.LocaleMiddleware'
,
'django.middleware.common.CommonMiddleware'
,
'django.middleware.csrf.CsrfViewMiddleware'
,
'django.contrib.auth.middleware.AuthenticationMiddleware'
,
'django.contrib.messages.middleware.MessageMiddleware'
,
'django.middleware.clickjacking.XFrameOptionsMiddleware'
,
'django.middleware.locale.LocaleMiddleware'
,
]
ROOT_URLCONF
=
'jumpserver.urls'
...
...
@@ -92,6 +92,7 @@ TEMPLATES = [
'APP_DIRS'
:
True
,
'OPTIONS'
:
{
'context_processors'
:
[
'django.template.context_processors.i18n'
,
'django.template.context_processors.debug'
,
'django.template.context_processors.request'
,
'django.contrib.auth.context_processors.auth'
,
...
...
@@ -215,7 +216,7 @@ LOGGING = {
# Internationalization
# https://docs.djangoproject.com/en/1.10/topics/i18n/
LANGUAGE_CODE
=
'en
_US
'
LANGUAGE_CODE
=
'en
-us
'
TIME_ZONE
=
'Asia/Shanghai'
...
...
apps/locale/zh/LC_MESSAGES/django.mo
0 → 100644
View file @
a0ef3cfc
File added
apps/
users/locale/zh_CN
/LC_MESSAGES/django.po
→
apps/
locale/zh
/LC_MESSAGES/django.po
View file @
a0ef3cfc
This diff is collapsed.
Click to expand it.
apps/locale/zh_CN/LC_MESSAGES/django.mo
deleted
100644 → 0
View file @
1b9c9c48
File deleted
apps/locale/zh_CN/LC_MESSAGES/django.po
deleted
100644 → 0
View file @
1b9c9c48
This diff is collapsed.
Click to expand it.
apps/users/locale/zh_CN/LC_MESSAGES/django.mo
deleted
100644 → 0
View file @
1b9c9c48
File deleted
apps/users/templates/users/login.html
View file @
a0ef3cfc
...
...
@@ -11,14 +11,6 @@
{% include '_head_css_js.html' %}
<link
href=
"{% static "
css
/
jumpserver
.
css
"
%}"
rel=
"stylesheet"
>
<script
src=
"{% static "
js
/
jumpserver
.
js
"
%}"
></script>
<style>
.captcha
{
float
:
right
;
}
#id_captcha_1
{
}
</style>
</head>
<body
class=
"gray-bg"
>
...
...
apps/users/views.py
View file @
a0ef3cfc
...
...
@@ -117,11 +117,13 @@ class UserAddView(AdminUserRequiredMixin, SuccessMessageMixin, CreateView):
user
=
form
.
save
(
commit
=
False
)
user
.
created_by
=
self
.
request
.
user
.
username
or
'System'
user
.
save
()
user_add_success_next
(
user
)
return
super
(
UserAddView
,
self
)
.
form_valid
(
form
)
def
form_invalid
(
self
,
form
):
print
(
form
.
errors
)
return
super
(
UserAddView
,
self
)
.
form_invalid
(
form
)
def
get_success_message
(
self
,
cleaned_data
):
return
self
.
success_message
%
(
reverse_lazy
(
'users:user-detail'
,
kwargs
=
{
'pk'
:
self
.
object
.
pk
}),
...
...
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