mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Corrected deprecation warning silencing of SubfieldBase.
This commit is contained in:
@@ -1,13 +1,23 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import json
|
||||
import warnings
|
||||
|
||||
from django.db import models
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils import six
|
||||
from django.utils.deprecation import RemovedInDjango20Warning
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
|
||||
# Catch warning about subfieldbase -- remove in Django 2.0
|
||||
warnings.filterwarnings(
|
||||
'ignore',
|
||||
'SubfieldBase has been deprecated. Use Field.from_db_value instead.',
|
||||
RemovedInDjango20Warning
|
||||
)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Small(object):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user