audit: add created field
This commit is contained in:
parent
3267d7fb99
commit
32a73cbbf3
|
@ -0,0 +1,20 @@
|
|||
# Generated by Django 2.1.4 on 2018-12-11 15:00
|
||||
|
||||
import django.utils.timezone
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('passbook_audit', '0004_auto_20181210_1348'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='auditentry',
|
||||
name='created',
|
||||
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
|
@ -46,6 +46,7 @@ class AuditEntry(UUIDModel):
|
|||
_context = models.TextField()
|
||||
_context_cache = None
|
||||
request_ip = models.GenericIPAddressField()
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
@property
|
||||
def context(self):
|
||||
|
|
Reference in New Issue