2014-12-13 06:19:58 +08:00
|
|
|
import django.contrib.admin.models
|
2015-01-28 20:35:27 +08:00
|
|
|
from django.conf import settings
|
|
|
|
from django.db import migrations, models
|
2014-06-16 02:25:39 +08:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
2014-06-17 00:54:23 +08:00
|
|
|
('contenttypes', '__first__'),
|
2014-06-16 02:25:39 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
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)),
|
2015-07-22 22:43:21 +08:00
|
|
|
('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',
|
|
|
|
)),
|
2014-06-16 02:25:39 +08:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
'ordering': ('-action_time',),
|
|
|
|
'db_table': 'django_admin_log',
|
|
|
|
'verbose_name': 'log entry',
|
|
|
|
'verbose_name_plural': 'log entries',
|
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
2014-12-13 06:19:58 +08:00
|
|
|
managers=[
|
|
|
|
('objects', django.contrib.admin.models.LogEntryManager()),
|
|
|
|
],
|
2014-06-16 02:25:39 +08:00
|
|
|
),
|
|
|
|
]
|