X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/967eed676fc83d15b26149047f353ac61faa8217..5fb53c16b8de6efee032dea734dd9047f33d3d54:/src/polls/models.py diff --git a/src/polls/models.py b/src/polls/models.py index 4b1882df2..2785f353e 100644 --- a/src/polls/models.py +++ b/src/polls/models.py @@ -1,11 +1,10 @@ -# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.db import models from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ValidationError -from django.core.urlresolvers import reverse +from django.urls import reverse USED_POLLS_KEY = 'used_polls' @@ -42,7 +41,7 @@ class Poll(models.Model): class PollItem(models.Model): - poll = models.ForeignKey(Poll, related_name='items') + poll = models.ForeignKey(Poll, models.CASCADE, related_name='items') content = models.TextField(_('content')) vote_count = models.IntegerField(_('vote count'), default=0)