Removed Model._meta.module_name per deprecation timeline.

refs #19689.
This commit is contained in:
Tim Graham 2014-03-21 11:10:34 -04:00
parent 4965a77407
commit f6c1f05fbf
1 changed files with 0 additions and 12 deletions

View File

@ -2,7 +2,6 @@ from __future__ import unicode_literals
from bisect import bisect from bisect import bisect
from collections import OrderedDict from collections import OrderedDict
import warnings
from django.apps import apps from django.apps import apps
from django.conf import settings 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 import AutoField, FieldDoesNotExist
from django.db.models.fields.proxy import OrderWrt from django.db.models.fields.proxy import OrderWrt
from django.utils import six 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.encoding import force_text, smart_text, python_2_unicode_compatible
from django.utils.functional import cached_property from django.utils.functional import cached_property
from django.utils.text import camel_case_to_spaces 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 = "%s_%s" % (self.app_label, self.model_name)
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length()) 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): def _prepare(self, model):
if self.order_with_respect_to: if self.order_with_respect_to:
self.order_with_respect_to = self.get_field(self.order_with_respect_to) self.order_with_respect_to = self.get_field(self.order_with_respect_to)