diff --git a/apps/assets/models/asset.py b/apps/assets/models/asset.py index f0d41cf98..6d1ba3f20 100644 --- a/apps/assets/models/asset.py +++ b/apps/assets/models/asset.py @@ -33,9 +33,9 @@ class Asset(models.Model): ('Storage', _("Storage")), ) ENV_CHOICES = ( - ('Prod', 'Production'), - ('Dev', 'Development'), - ('Test', 'Testing'), + ('Prod', _('Production')), + ('Dev', _('Development')), + ('Test', _('Testing')), ) # Important diff --git a/apps/assets/signals_handler.py b/apps/assets/signals_handler.py index faecdfb55..dfd264677 100644 --- a/apps/assets/signals_handler.py +++ b/apps/assets/signals_handler.py @@ -76,7 +76,6 @@ def on_system_user_created_or_updated(sender, instance=None, **kwargs): @receiver(post_init, sender=Cluster, dispatch_uid="my_unique_identifier") def on_cluster_init(sender, instance, **kwargs): - logger.debug("On cluster init") instance.__original_assets = tuple(instance.assets.values_list('pk', flat=True)) # instance.__origin_system_users = tuple(instance.systemuser_set.all()) diff --git a/apps/assets/views/asset.py b/apps/assets/views/asset.py index 67adb6849..cd088024a 100644 --- a/apps/assets/views/asset.py +++ b/apps/assets/views/asset.py @@ -44,8 +44,8 @@ class AssetListView(AdminUserRequiredMixin, TemplateView): def get_context_data(self, **kwargs): context = { - 'app': 'Assets', - 'action': 'Asset list', + 'app': _('Assets'), + 'action': _('Asset list'), # 'groups': AssetGroup.objects.all(), 'system_users': SystemUser.objects.all(), } @@ -58,8 +58,8 @@ class UserAssetListView(LoginRequiredMixin, TemplateView): def get_context_data(self, **kwargs): context = { - 'app': 'Assets', - 'action': 'Asset list', + 'app': _('Assets'), + 'action': _('Asset list'), 'system_users': SystemUser.objects.all(), } kwargs.update(context) diff --git a/run_server.py b/run_server.py index e300c5e13..afbbf5675 100644 --- a/run_server.py +++ b/run_server.py @@ -51,7 +51,12 @@ def start_gunicorn(): make_migrations() collect_static() os.chdir(APPS_DIR) - cmd = "gunicorn jumpserver.wsgi -b {}:{} -w {}".format(HTTP_HOST, HTTP_PORT, WORKERS) + cmd = "gunicorn jumpserver.wsgi -b {}:{} -w {} ".format( + HTTP_HOST, HTTP_PORT, WORKERS + ) + log_format = '%(h)s %(t)s "%(r)s" %(s)s %(b)s ' + log = " --access-logfile - --access-logformat '{}' ".format(log_format) + cmd += log if DEBUG: cmd += " --reload" p = subprocess.Popen(cmd, shell=True, stdout=sys.stdout, stderr=sys.stderr)