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
4a715d95c0
commit
be3a67b9c5
1 changed files with 5 additions and 1 deletions
|
|
@ -30,7 +30,11 @@ class Poll(models.Model):
|
|||
|
||||
@python_2_unicode_compatible
|
||||
class Choice(models.Model):
|
||||
poll = models.ForeignKey(Poll, verbose_name=_('poll'))
|
||||
poll = models.ForeignKey(
|
||||
Poll,
|
||||
verbose_name=_('poll'),
|
||||
on_delete=models.CASCADE
|
||||
)
|
||||
choice_text = models.CharField(
|
||||
max_length=200, verbose_name=_('choice text'))
|
||||
votes = models.IntegerField(default=0, verbose_name=_('votes'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue