Commit f6c1f05f authored by Tim Graham's avatar Tim Graham
Browse files

Removed Model._meta.module_name per deprecation timeline.

refs #19689.
parent 4965a774
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@ from __future__ import unicode_literals

from bisect import bisect
from collections import OrderedDict
import warnings

from django.apps import apps
from django.conf import settings
@@ -10,7 +9,6 @@ from django.db.models.fields.related import ManyToManyRel
from django.db.models.fields import AutoField, FieldDoesNotExist
from django.db.models.fields.proxy import OrderWrt
from django.utils import six
from django.utils.deprecation import RemovedInDjango18Warning
from django.utils.encoding import force_text, smart_text, python_2_unicode_compatible
from django.utils.functional import cached_property
from django.utils.text import camel_case_to_spaces
@@ -165,16 +163,6 @@ class Options(object):
            self.db_table = "%s_%s" % (self.app_label, self.model_name)
            self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())

    @property
    def module_name(self):
        """
        This property has been deprecated in favor of `model_name`. refs #19689
        """
        warnings.warn(
            "Options.module_name has been deprecated in favor of model_name",
            RemovedInDjango18Warning, stacklevel=2)
        return self.model_name

    def _prepare(self, model):
        if self.order_with_respect_to:
            self.order_with_respect_to = self.get_field(self.order_with_respect_to)