diff --git a/jlog/views.py b/jlog/views.py index d8a4268d1..5efd2bf9f 100644 --- a/jlog/views.py +++ b/jlog/views.py @@ -274,7 +274,7 @@ class TermLogRecorder(object): self.filename = filename filepath = os.path.join(path, 'tty', date, filename + '.zip') if not os.path.isdir(os.path.join(path, 'tty', date)): - os.makedirs(os.path.join(path, 'tty', date), mode=0777) + mkdir(os.path.join(path, 'tty', date), mode=777) while os.path.isfile(filepath): filename = str(uuid.uuid4()) filepath = os.path.join(path, 'tty', date, filename + '.zip') diff --git a/jperm/ansible_api.py b/jperm/ansible_api.py index 20725908c..02d65907e 100644 --- a/jperm/ansible_api.py +++ b/jperm/ansible_api.py @@ -493,8 +493,8 @@ if __name__ == "__main__": # # "ansible_become_user": "root", # "ansible_become_pass": "yusky0902", }] - cmd = Command(resource) - print cmd.run('ls') + cmd.run('ls',pattern='*') + print cmd.results_raw # resource = [{"hostname": "192.168.10.148", "port": "22", "username": "root", "password": "xxx"}] # task = Tasks(resource) diff --git a/juser/views.py b/juser/views.py index 81e854d85..7335f30c8 100644 --- a/juser/views.py +++ b/juser/views.py @@ -419,7 +419,9 @@ def change_info(request): error = '不能为空' if not error: - User.objects.filter(id=user_id).update(name=name, email=email) + user.name = name + user.email = email + user.save() if len(password) > 0: user.set_password(password) user.save() diff --git a/templates/juser/group_add.html b/templates/juser/group_add.html index 7257f5e58..df8d401c9 100644 --- a/templates/juser/group_add.html +++ b/templates/juser/group_add.html @@ -55,6 +55,9 @@
@@ -118,4 +121,4 @@ $(document).ready(function(){ -{% endblock %} \ No newline at end of file +{% endblock %}