mirror of https://github.com/jumpserver/jumpserver
				
				
				
			[Update] 整理 copyright 和 版本
							parent
							
								
									f97bfa7bf1
								
							
						
					
					
						commit
						a31775dd23
					
				|  | @ -1,4 +1,3 @@ | |||
| #!/usr/bin/env python | ||||
| # -*- coding: utf-8 -*- | ||||
| # | ||||
| __version__ = "1.4.9" | ||||
|  |  | |||
|  | @ -0,0 +1,3 @@ | |||
| # -*- coding: utf-8 -*- | ||||
| # | ||||
| VERSION = '1.4.9' | ||||
|  | @ -1,6 +1,8 @@ | |||
| # -*- coding: utf-8 -*- | ||||
| # | ||||
| from django.contrib.staticfiles.templatetags.staticfiles import static | ||||
| from django.conf import settings | ||||
| from django.utils.translation import gettext_lazy as _ | ||||
| 
 | ||||
| 
 | ||||
| def jumpserver_processor(request): | ||||
|  | @ -11,7 +13,9 @@ def jumpserver_processor(request): | |||
|         'LOGO_TEXT_URL': static('img/logo_text.png'), | ||||
|         'LOGIN_IMAGE_URL': static('img/login_image.png'), | ||||
|         'FAVICON_URL': static('img/facio.ico'), | ||||
|         'JMS_TITLE': 'Jumpserver' | ||||
|         'JMS_TITLE': 'Jumpserver', | ||||
|         'VERSION': settings.VERSION, | ||||
|         'COPYRIGHT': _('Beijing Duizhan Tech, Inc.') + ' © 2014-2019' | ||||
|     } | ||||
|     return context | ||||
| 
 | ||||
|  |  | |||
|  | @ -12,25 +12,24 @@ https://docs.djangoproject.com/en/1.10/ref/settings/ | |||
| 
 | ||||
| import os | ||||
| import sys | ||||
| import socket | ||||
| 
 | ||||
| import ldap | ||||
| from django.urls import reverse_lazy | ||||
| 
 | ||||
| from .const import VERSION | ||||
| from .conf import load_user_config | ||||
| 
 | ||||
| # Build paths inside the project like this: os.path.join(BASE_DIR, ...) | ||||
| BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | ||||
| PROJECT_DIR = os.path.dirname(BASE_DIR) | ||||
| sys.path.append(PROJECT_DIR) | ||||
| from apps import __version__ | ||||
| 
 | ||||
| VERSION = __version__ | ||||
| CONFIG = load_user_config() | ||||
| LOG_DIR = os.path.join(PROJECT_DIR, 'logs') | ||||
| JUMPSERVER_LOG_FILE = os.path.join(LOG_DIR, 'jumpserver.log') | ||||
| ANSIBLE_LOG_FILE = os.path.join(LOG_DIR, 'ansible.log') | ||||
| GUNICORN_LOG_FILE = os.path.join(LOG_DIR, 'gunicorn.log') | ||||
| VERSION = VERSION | ||||
| 
 | ||||
| if not os.path.isdir(LOG_DIR): | ||||
|     os.makedirs(LOG_DIR) | ||||
|  | @ -163,7 +162,7 @@ MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage' | |||
| DB_OPTIONS = {} | ||||
| DATABASES = { | ||||
|     'default': { | ||||
|         'ENGINE': 'django.db.backends.{}'.format(CONFIG.DB_ENGINE), | ||||
|         'ENGINE': 'django.db.backends.{}'.format(CONFIG.DB_ENGINE.lower()), | ||||
|         'NAME': CONFIG.DB_NAME, | ||||
|         'HOST': CONFIG.DB_HOST, | ||||
|         'PORT': CONFIG.DB_PORT, | ||||
|  | @ -174,8 +173,10 @@ DATABASES = { | |||
|     } | ||||
| } | ||||
| DB_CA_PATH = os.path.join(PROJECT_DIR, 'data', 'ca.pem') | ||||
| if CONFIG.DB_ENGINE == 'mysql' and os.path.isfile(DB_CA_PATH): | ||||
|     DB_OPTIONS['ssl'] = {'ca': DB_CA_PATH} | ||||
| if CONFIG.DB_ENGINE.lower() == 'mysql': | ||||
|     DB_OPTIONS['init_command'] = "SET sql_mode='STRICT_TRANS_TABLES'" | ||||
|     if os.path.isfile(DB_CA_PATH): | ||||
|         DB_OPTIONS['ssl'] = {'ca': DB_CA_PATH} | ||||
| 
 | ||||
| 
 | ||||
| # Password validation | ||||
|  |  | |||
										
											Binary file not shown.
										
									
								
							|  | @ -8,7 +8,7 @@ msgid "" | |||
| msgstr "" | ||||
| "Project-Id-Version: Jumpserver 0.3.3\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2019-03-27 12:48+0800\n" | ||||
| "POT-Creation-Date: 2019-03-27 17:33+0800\n" | ||||
| "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||||
| "Last-Translator: ibuler <ibuler@qq.com>\n" | ||||
| "Language-Team: Jumpserver team<ibuler@qq.com>\n" | ||||
|  | @ -2322,6 +2322,10 @@ msgstr "" | |||
| msgid "Special char not allowed" | ||||
| msgstr "不能包含特殊字符" | ||||
| 
 | ||||
| #: jumpserver/context_processor.py:18 | ||||
| msgid "Beijing Duizhan Tech, Inc." | ||||
| msgstr "北京堆栈科技有限公司" | ||||
| 
 | ||||
| #: jumpserver/views.py:185 | ||||
| msgid "" | ||||
| "<div>Luna is a separately deployed program, you need to deploy Luna, coco, " | ||||
|  | @ -3347,10 +3351,6 @@ msgstr "创建录像存储" | |||
| msgid "Create command storage" | ||||
| msgstr "创建命令存储" | ||||
| 
 | ||||
| #: templates/_copyright.html:2 templates/_footer.html:8 | ||||
| msgid " Beijing Duizhan Tech, Inc. " | ||||
| msgstr " 北京堆栈科技有限公司 " | ||||
| 
 | ||||
| #: templates/_header_bar.html:31 | ||||
| msgid "Help" | ||||
| msgstr "帮助" | ||||
|  |  | |||
|  | @ -1,2 +1,2 @@ | |||
| {% load i18n %} | ||||
| <strong>Copyright</strong> {% trans ' Beijing Duizhan Tech, Inc. ' %} © 2014-2019 | ||||
| <strong>Copyright</strong> {{ COPYRIGHT }} | ||||
|  | @ -1,10 +1,10 @@ | |||
| {% load i18n %} | ||||
| <div class="footer fixed"> | ||||
|     <div class="pull-right"> | ||||
|         Version <strong>1.4.9-{% include '_build.html' %}</strong> GPLv2. | ||||
|         Version <strong>{{ VERSION }}-{% include '_build.html' %}</strong> GPLv2. | ||||
|         <!--<img style="display: none" src="http://www.jumpserver.org/img/evaluate_avatar1.jpg">--> | ||||
|     </div> | ||||
|     <div> | ||||
|         <strong>Copyright</strong> {% trans ' Beijing Duizhan Tech, Inc. ' %}© 2014-2019 | ||||
|         {% include '_copyright.html' %} | ||||
|     </div> | ||||
| </div> | ||||
|  |  | |||
							
								
								
									
										3
									
								
								jms
								
								
								
								
							
							
						
						
									
										3
									
								
								jms
								
								
								
								
							|  | @ -13,7 +13,8 @@ BASE_DIR = os.path.dirname(os.path.abspath(__file__)) | |||
| sys.path.insert(0, BASE_DIR) | ||||
| 
 | ||||
| try: | ||||
|     from apps import __version__ | ||||
|     from apps.jumpserver import const | ||||
|     __version__ = const.VERSION | ||||
| except ImportError as e: | ||||
|     print("Not found __version__: {}".format(e)) | ||||
|     print("Sys path: {}".format(sys.path)) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 ibuler
						ibuler