fix: 修改sftp账号备份文件名及任务日志提示

This commit is contained in:
wangruidong
2023-11-13 14:34:58 +08:00
committed by Bryan
parent 0f9223331c
commit 9babe977d8
10 changed files with 386 additions and 304 deletions

View File

@@ -5,7 +5,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('authentication', '0023_auto_20231010_1101'),
]
@@ -14,6 +13,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='accesskey',
name='ip_group',
field=models.JSONField(default=authentication.models.access_key.defatult_ip_group, verbose_name='IP group'),
field=models.JSONField(default=authentication.models.access_key.default_ip_group, verbose_name='IP group'),
),
]

View File

@@ -12,14 +12,14 @@ def default_secret():
return random_string(36)
def defatult_ip_group():
def default_ip_group():
return ["*"]
class AccessKey(models.Model):
id = models.UUIDField(verbose_name='AccessKeyID', primary_key=True, default=uuid.uuid4, editable=False)
secret = models.CharField(verbose_name='AccessKeySecret', default=default_secret, max_length=36)
ip_group = models.JSONField(default=defatult_ip_group, verbose_name=_('IP group'))
ip_group = models.JSONField(default=default_ip_group, verbose_name=_('IP group'))
user = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name='User',
on_delete=common.db.models.CASCADE_SIGNAL_SKIP, related_name='access_keys')
is_active = models.BooleanField(default=True, verbose_name=_('Active'))