diff --git a/apps/audits/migrations/0023_auto_20230906_1322.py b/apps/audits/migrations/0023_auto_20230906_1322.py new file mode 100644 index 000000000..98447b7b3 --- /dev/null +++ b/apps/audits/migrations/0023_auto_20230906_1322.py @@ -0,0 +1,29 @@ +# Generated by Django 4.1.10 on 2023-09-06 05:31 + +from django.db import migrations, models +import django.utils.timezone + + +class Migration(migrations.Migration): + + dependencies = [ + ('audits', '0022_auto_20230605_1555'), + ] + + operations = [ + migrations.AlterField( + model_name='ftplog', + name='date_start', + field=models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Date start'), + ), + migrations.AlterField( + model_name='operatelog', + name='action', + field=models.CharField(choices=[('view', 'View'), ('update', 'Update'), ('delete', 'Delete'), ('create', 'Create'), ('download', 'Download'), ('connect', 'Connect'), ('login', 'Login'), ('change_password', 'Change password')], max_length=16, verbose_name='Action'), + ), + migrations.AlterField( + model_name='userloginlog', + name='datetime', + field=models.DateTimeField(db_index=True, default=django.utils.timezone.now, verbose_name='Date login'), + ), + ] diff --git a/apps/audits/models.py b/apps/audits/models.py index 42e712dbd..7d7ebaa7e 100644 --- a/apps/audits/models.py +++ b/apps/audits/models.py @@ -57,7 +57,7 @@ class FTPLog(OrgModelMixin): ) filename = models.CharField(max_length=1024, verbose_name=_("Filename")) is_success = models.BooleanField(default=True, verbose_name=_("Success")) - date_start = models.DateTimeField(auto_now_add=True, verbose_name=_("Date start")) + date_start = models.DateTimeField(auto_now_add=True, verbose_name=_("Date start"), db_index=True) has_file = models.BooleanField(default=False, verbose_name=_("File")) session = models.CharField(max_length=36, verbose_name=_("Session"), default=uuid.uuid4) @@ -198,7 +198,7 @@ class UserLoginLog(models.Model): choices=LoginStatusChoices.choices, verbose_name=_("Status"), ) - datetime = models.DateTimeField(default=timezone.now, verbose_name=_("Date login")) + datetime = models.DateTimeField(default=timezone.now, verbose_name=_("Date login"), db_index=True) backend = models.CharField( max_length=32, default="", verbose_name=_("Authentication backend") ) diff --git a/apps/terminal/models/applet/applet.py b/apps/terminal/models/applet/applet.py index 4f9663398..d8e1fde58 100644 --- a/apps/terminal/models/applet/applet.py +++ b/apps/terminal/models/applet/applet.py @@ -27,7 +27,7 @@ class Applet(JMSBaseModel): web = 'web', _('Web') class Edition(models.TextChoices): - community = 'community', _('Community Edition') + community = 'community', _('Community') enterprise = 'enterprise', _('Enterprise') name = models.SlugField(max_length=128, verbose_name=_('Name'), unique=True)