diff --git a/jasset/models.py b/jasset/models.py index 746f3d109..2851b7d56 100644 --- a/jasset/models.py +++ b/jasset/models.py @@ -45,7 +45,7 @@ class IDC(models.Model): phone = models.CharField(max_length=32, blank=True, null=True, default='', verbose_name=u'联系电话') address = models.CharField(max_length=128, blank=True, null=True, default='', verbose_name=u"机房地址") network = models.TextField(blank=True, null=True, default='', verbose_name=u"IP地址段") - date_added = models.DateField(auto_now=True, default='', null=True) + date_added = models.DateField(auto_now=True, null=True) operator = models.CharField(max_length=32, blank=True, default='', null=True, verbose_name=u"运营商") comment = models.CharField(max_length=128, blank=True, default='', null=True, verbose_name=u"备注") diff --git a/jperm/ansible_api.py b/jperm/ansible_api.py index 71d6e9979..0ceea61d5 100644 --- a/jperm/ansible_api.py +++ b/jperm/ansible_api.py @@ -16,7 +16,7 @@ from passlib.hash import sha512_crypt from django.template.loader import get_template from django.template import Context -from utils import get_rand_pass + from jumpserver.api import logger diff --git a/templates/jperm/perm_sudo_list.html b/templates/jperm/perm_sudo_list.html index cabc875b8..f69a01948 100644 --- a/templates/jperm/perm_sudo_list.html +++ b/templates/jperm/perm_sudo_list.html @@ -89,7 +89,7 @@ function remove_sudo(sudo_id){ if (confirm("确认删除")) { $.ajax({ type: "POST", - url: "/jperm/sudo/perm_sudo_delete/", + url: "/jperm/sudo/del/", data: "id=" + sudo_id, success: function(msg){ alert( "成功: " + msg );