mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-16 22:20:24 +00:00
add on_delete positional arg to related fields
This commit is contained in:
parent
e3822dee39
commit
33b41fa311
1 changed files with 4 additions and 2 deletions
|
|
@ -30,9 +30,11 @@ class LogEntry(models.Model):
|
|||
|
||||
action_time = models.DateTimeField(_('action time'), auto_now=True)
|
||||
user = models.ForeignKey(settings.AUTH_USER_MODEL,
|
||||
related_name='log_entries')
|
||||
related_name='log_entries',
|
||||
on_delete=models.CASCADE)
|
||||
content_type = models.ForeignKey(ContentType, blank=True, null=True,
|
||||
related_name='log_entries')
|
||||
related_name='log_entries',
|
||||
on_delete=models.CASCADE)
|
||||
object_id = models.TextField(_('object id'), blank=True, null=True)
|
||||
object_repr = models.CharField(_('object repr'), max_length=200)
|
||||
action_flag = models.PositiveSmallIntegerField(_('action flag'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue