1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Fixed #6867 -- Added some missing DeprecationWarnings to db.models.fields.related. Thanks, dcramer

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7362 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2008-03-25 05:13:08 +00:00
parent 0e552e5cd6
commit 3d779efbe5

View File

@ -508,7 +508,7 @@ class ForeignKey(RelatedField, Field):
if 'edit_inline_type' in kwargs:
import warnings
warnings.warn("edit_inline_type is deprecated. Use edit_inline instead.")
warnings.warn("edit_inline_type is deprecated. Use edit_inline instead.", DeprecationWarning)
kwargs['edit_inline'] = kwargs.pop('edit_inline_type')
kwargs['rel'] = ManyToOneRel(to, to_field,
@ -618,7 +618,7 @@ class OneToOneField(RelatedField, IntegerField):
if 'edit_inline_type' in kwargs:
import warnings
warnings.warn("edit_inline_type is deprecated. Use edit_inline instead.")
warnings.warn("edit_inline_type is deprecated. Use edit_inline instead.", DeprecationWarning)
kwargs['edit_inline'] = kwargs.pop('edit_inline_type')
kwargs['rel'] = OneToOneRel(to, to_field,