diff --git a/polymorphic/polymorphic_model.py b/polymorphic/polymorphic_model.py index 1a819d2..5b20751 100644 --- a/polymorphic/polymorphic_model.py +++ b/polymorphic/polymorphic_model.py @@ -17,7 +17,6 @@ from __future__ import absolute_import from django.db import models from django.contrib.contenttypes.models import ContentType -from django import VERSION as django_VERSION from django.utils import six from .base import PolymorphicModelBase @@ -57,13 +56,8 @@ class PolymorphicModel(six.with_metaclass(PolymorphicModelBase, models.Model)): abstract = True # avoid ContentType related field accessor clash (an error emitted by model validation) - # we really should use both app_label and model name, but this is only possible since Django 1.2 - if django_VERSION[0] <= 1 and django_VERSION[1] <= 1: - p_related_name_template = 'polymorphic_%(class)s_set' - else: - p_related_name_template = 'polymorphic_%(app_label)s.%(class)s_set' polymorphic_ctype = models.ForeignKey(ContentType, null=True, editable=False, - related_name=p_related_name_template) + related_name='polymorphic_%(app_label)s.%(class)s_set') # some applications want to know the name of the fields that are added to its models polymorphic_internal_model_fields = ['polymorphic_ctype']