Ticket #6867: warnings.diff

File warnings.diff, 1.0 KB (added by David Cramer, 17 years ago)
  • django/django/db/models/fields/related.py

     
    508508
    509509        if 'edit_inline_type' in kwargs:
    510510            import warnings
    511             warnings.warn("edit_inline_type is deprecated. Use edit_inline instead.")
     511            warnings.warn("edit_inline_type is deprecated. Use edit_inline instead.", DeprecationWarning)
    512512            kwargs['edit_inline'] = kwargs.pop('edit_inline_type')
    513513
    514514        kwargs['rel'] = ManyToOneRel(to, to_field,
     
    618618
    619619        if 'edit_inline_type' in kwargs:
    620620            import warnings
    621             warnings.warn("edit_inline_type is deprecated. Use edit_inline instead.")
     621            warnings.warn("edit_inline_type is deprecated. Use edit_inline instead.", DeprecationWarning)
    622622            kwargs['edit_inline'] = kwargs.pop('edit_inline_type')
    623623
    624624        kwargs['rel'] = OneToOneRel(to, to_field,
Back to Top