mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
Refs #26154 -- Removed deprecated CommaSeparatedIntegerField.
This commit is contained in:
@@ -135,7 +135,6 @@ class DatabaseWrapper(BaseDatabaseWrapper):
|
||||
'BinaryField': 'longblob',
|
||||
'BooleanField': 'bool',
|
||||
'CharField': 'varchar(%(max_length)s)',
|
||||
'CommaSeparatedIntegerField': 'varchar(%(max_length)s)',
|
||||
'DateField': 'date',
|
||||
'DateTimeField': 'datetime',
|
||||
'DecimalField': 'numeric(%(max_digits)s, %(decimal_places)s)',
|
||||
|
||||
@@ -89,7 +89,6 @@ class DatabaseWrapper(BaseDatabaseWrapper):
|
||||
'BinaryField': 'BLOB',
|
||||
'BooleanField': 'NUMBER(1)',
|
||||
'CharField': 'NVARCHAR2(%(max_length)s)',
|
||||
'CommaSeparatedIntegerField': 'VARCHAR2(%(max_length)s)',
|
||||
'DateField': 'DATE',
|
||||
'DateTimeField': 'TIMESTAMP',
|
||||
'DecimalField': 'NUMBER(%(max_digits)s, %(decimal_places)s)',
|
||||
|
||||
@@ -76,7 +76,6 @@ class DatabaseWrapper(BaseDatabaseWrapper):
|
||||
'BinaryField': 'bytea',
|
||||
'BooleanField': 'boolean',
|
||||
'CharField': 'varchar(%(max_length)s)',
|
||||
'CommaSeparatedIntegerField': 'varchar(%(max_length)s)',
|
||||
'DateField': 'date',
|
||||
'DateTimeField': 'timestamp with time zone',
|
||||
'DecimalField': 'numeric(%(max_digits)s, %(decimal_places)s)',
|
||||
|
||||
@@ -73,7 +73,6 @@ class DatabaseWrapper(BaseDatabaseWrapper):
|
||||
'BinaryField': 'BLOB',
|
||||
'BooleanField': 'bool',
|
||||
'CharField': 'varchar(%(max_length)s)',
|
||||
'CommaSeparatedIntegerField': 'varchar(%(max_length)s)',
|
||||
'DateField': 'date',
|
||||
'DateTimeField': 'datetime',
|
||||
'DecimalField': 'decimal',
|
||||
|
||||
@@ -1090,27 +1090,18 @@ class CharField(Field):
|
||||
class CommaSeparatedIntegerField(CharField):
|
||||
default_validators = [validators.validate_comma_separated_integer_list]
|
||||
description = _("Comma-separated integers")
|
||||
system_check_deprecated_details = {
|
||||
system_check_removed_details = {
|
||||
'msg': (
|
||||
'CommaSeparatedIntegerField has been deprecated. Support '
|
||||
'for it (except in historical migrations) will be removed '
|
||||
'in Django 2.0.'
|
||||
'CommaSeparatedIntegerField is removed except for support in '
|
||||
'historical migrations.'
|
||||
),
|
||||
'hint': (
|
||||
'Use CharField(validators=[validate_comma_separated_integer_list]) instead.'
|
||||
'Use CharField(validators=[validate_comma_separated_integer_list]) '
|
||||
'instead.'
|
||||
),
|
||||
'id': 'fields.W901',
|
||||
'id': 'fields.E901',
|
||||
}
|
||||
|
||||
def formfield(self, **kwargs):
|
||||
defaults = {
|
||||
'error_messages': {
|
||||
'invalid': _('Enter only digits separated by commas.'),
|
||||
}
|
||||
}
|
||||
defaults.update(kwargs)
|
||||
return super(CommaSeparatedIntegerField, self).formfield(**defaults)
|
||||
|
||||
|
||||
class DateTimeCheckMixin(object):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user