Ejemplo n.º 1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='LogEntry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('action_time', models.DateTimeField(default=django.utils.timezone.now, editable=False, verbose_name='action time')),
                ('object_id', models.TextField(blank=True, null=True, verbose_name='object id')),
                ('object_repr', models.CharField(max_length=200, verbose_name='object repr')),
                ('action_flag', models.PositiveSmallIntegerField(choices=[(1, 'Addition'), (2, 'Change'), (3, 'Deletion')], verbose_name='action flag')),
                ('change_message', models.TextField(blank=True, verbose_name='change message')),
                ('content_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='contenttypes.contenttype', verbose_name='content type')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='user')),
            ],
            options={
                'verbose_name': 'log entry',
                'verbose_name_plural': 'log entries',
                'db_table': 'django_admin_log',
                'ordering': ['-action_time'],
            },
            managers=[
                ('objects', django.contrib.admin.models.LogEntryManager()),
            ],
        ),
    ]
Ejemplo n.º 2
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('contenttypes', '__first__'),
    ]

    operations = [
        migrations.CreateModel(
            name='LogEntry',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('action_time',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='action time')),
                ('object_id',
                 models.TextField(null=True,
                                  verbose_name='object id',
                                  blank=True)),
                ('object_repr',
                 models.CharField(max_length=200, verbose_name='object repr')),
                ('action_flag',
                 models.PositiveSmallIntegerField(verbose_name='action flag')),
                ('change_message',
                 models.TextField(verbose_name='change message', blank=True)),
                ('content_type',
                 models.ForeignKey(
                     to_field='id',
                     on_delete=models.SET_NULL,
                     blank=True,
                     null=True,
                     to='contenttypes.ContentType',
                     verbose_name='content type',
                 )),
                ('users',
                 models.ForeignKey(
                     to=settings.AUTH_USER_MODEL,
                     on_delete=models.CASCADE,
                     verbose_name='users',
                 )),
            ],
            options={
                'ordering': ('-action_time', ),
                'db_table': 'django_admin_log',
                'verbose_name': 'log entry',
                'verbose_name_plural': 'log entries',
            },
            bases=(models.Model, ),
            managers=[
                ('objects', django.contrib.admin.models.LogEntryManager()),
            ],
        ),
    ]
Ejemplo n.º 3
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("contenttypes", "__first__"),
    ]

    operations = [
        migrations.CreateModel(
            name="LogEntry",
            fields=[
                (
                    "id",
                    models.AutoField(
                        verbose_name="ID",
                        serialize=False,
                        auto_created=True,
                        primary_key=True,
                    ),
                ),
                (
                    "action_time",
                    models.DateTimeField(auto_now=True,
                                         verbose_name="action time"),
                ),
                (
                    "object_id",
                    models.TextField(null=True,
                                     verbose_name="object id",
                                     blank=True),
                ),
                (
                    "object_repr",
                    models.CharField(max_length=200,
                                     verbose_name="object repr"),
                ),
                (
                    "action_flag",
                    models.PositiveSmallIntegerField(
                        verbose_name="action flag"),
                ),
                (
                    "change_message",
                    models.TextField(verbose_name="change message",
                                     blank=True),
                ),
                (
                    "content_type",
                    models.ForeignKey(
                        to_field="id",
                        on_delete=models.SET_NULL,
                        blank=True,
                        null=True,
                        to="contenttypes.ContentType",
                        verbose_name="content type",
                    ),
                ),
                (
                    "user",
                    models.ForeignKey(
                        to=settings.AUTH_USER_MODEL,
                        on_delete=models.CASCADE,
                        verbose_name="user",
                    ),
                ),
            ],
            options={
                "ordering": ("-action_time", ),
                "db_table": "django_admin_log",
                "verbose_name": "log entry",
                "verbose_name_plural": "log entries",
            },
            bases=(models.Model, ),
            managers=[("objects",
                       django.contrib.admin.models.LogEntryManager())],
        )
    ]
Ejemplo n.º 4
0
class Migration(migrations.Migration):

    replaces = [('admin', '0001_initial'),
                ('admin', '0002_logentry_remove_auto_add'),
                ('admin', '0003_auto_20171018_1022'),
                ('admin', '0004_auto_20171018_1023'),
                ('admin', '0005_auto_20171021_0910'),
                ('admin', '0006_auto_20171021_0957'),
                ('admin', '0007_auto_20171021_0959')]

    initial = True

    dependencies = [
        ('contenttypes', '__first__'),
        ('aklub', '0045_auto_20171020_1506'),
        ('auth', '__first__'),
        ('aklub', '0046_auto_20171020_1510'),
    ]

    operations = [
        migrations.CreateModel(
            name='LogEntry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('action_time',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      editable=False,
                                      verbose_name='action time')),
                ('object_id',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='object id')),
                ('object_repr',
                 models.CharField(max_length=200, verbose_name='object repr')),
                ('action_flag',
                 models.PositiveSmallIntegerField(verbose_name='action flag')),
                ('change_message',
                 models.TextField(blank=True, verbose_name='change message')),
                ('content_type',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='contenttypes.ContentType',
                     verbose_name='content type')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='user')),
            ],
            options={
                'verbose_name_plural': 'log entries',
                'db_table': 'django_admin_log',
                'ordering': ('-action_time', ),
                'verbose_name': 'log entry',
            },
            managers=[
                ('objects', django.contrib.admin.models.LogEntryManager()),
            ],
        ),
    ]
Ejemplo n.º 5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('admin', '0003_logentry_add_action_flag_choices'),
    ]

    operations = [
        migrations.CreateModel(
            name='ActionLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('modified_at', models.DateTimeField(auto_now=True)),
                ('app_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('model_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('object_id', models.PositiveIntegerField(blank=True,
                                                          null=True)),
                ('object_instance', models.JSONField()),
                ('action_type',
                 models.PositiveSmallIntegerField(choices=[(1, 'Update'),
                                                           (2, 'Create'),
                                                           (3, 'Delete')],
                                                  default=1)),
                ('action_tag',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('comment', models.TextField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'Action Log',
                'verbose_name_plural': 'Action Log',
                'ordering': ('-created_at', ),
            },
        ),
        migrations.CreateModel(
            name='EmailLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('modified_at', models.DateTimeField(auto_now=True)),
                ('from_email', models.EmailField(blank=True, max_length=75)),
                ('recipients', models.TextField(blank=True, null=True)),
                ('subject',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('body', models.TextField(blank=True, null=True)),
                ('sent', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'email Log',
                'verbose_name_plural': 'email Log',
                'ordering': ('-created_at', ),
            },
        ),
        migrations.CreateModel(
            name='AdminLog',
            fields=[],
            options={
                'verbose_name': 'Admin Log',
                'verbose_name_plural': 'Admin Log',
                'proxy': True,
                'indexes': [],
                'constraints': [],
            },
            bases=('admin.logentry', ),
            managers=[
                ('objects', django.contrib.admin.models.LogEntryManager()),
            ],
        ),
        migrations.CreateModel(
            name='VisitLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('modified_at', models.DateTimeField(auto_now=True)),
                ('uuid',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  unique=True)),
                ('session_key', models.CharField(max_length=40)),
                ('timestamp',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('path',
                 models.CharField(blank=True, max_length=2048, null=True)),
                ('remote_addr',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('ua_string', models.TextField(blank=True, null=True)),
                ('hash', models.CharField(max_length=32, unique=True)),
                ('user',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='visit_log',
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='User')),
            ],
            options={
                'verbose_name': 'Visit Log',
                'verbose_name_plural': 'Visit Log',
                'ordering': ('-created_at', ),
            },
        ),
    ]