alfortville: use new Django contenttypes.fields (#15007)

This commit is contained in:
Thomas NOËL 2017-02-15 16:01:01 +01:00
parent 4ecbb2e988
commit a6ec6eb908
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.fields import GenericForeignKey
from django.db import models
from django.utils.translation import ugettext_lazy as _
@ -35,7 +35,7 @@ class Inbox(models.Model):
default=INFO)
source_type = models.ForeignKey(ContentType, null=True)
source_pk = models.PositiveIntegerField(null=True)
source = generic.GenericForeignKey('source_type', 'source_pk')
source = GenericForeignKey('source_type', 'source_pk')
done = models.BooleanField(default=False)
comments = models.TextField(blank=True, null=True, verbose_name=_('Comments'))
last_update_timestamp = models.DateTimeField(auto_now=True, null=True)