Ticket #3094: XMLField_deprecation.diff
File XMLField_deprecation.diff, 5.6 KB (added by , 14 years ago) |
---|
-
docs/internals/deprecation.txt
41 41 removed. 42 42 43 43 * The ``get_db_prep_save``, ``get_db_prep_value`` and 44 ``get_db_prep_lookup`` methods on Field were modified in 1.2 to support 45 multiple databases. In 1.4, the support functions that allow methods 46 with the old prototype to continue working will be removed. 44 ``get_db_prep_lookup`` methods on Field were modified in 1.2 45 to support multiple databases. In 1.4, the support functions 46 that allow methods with the old prototype to continue 47 working will be removed. 47 48 48 49 * The ``Message`` model (in ``django.contrib.auth``), its related 49 50 manager in the ``User`` model (``user.message_set``), and the … … 105 106 with a trailing slash to ensure there is a consistent way to 106 107 combine paths in templates. 107 108 109 * ``XMLField`` was deprecated in 1.3 and will be removed in 110 1.4. This accelerated process was chosen since the field 111 hasn't worked properly since oldforms was removed. 112 108 113 * 1.5 109 114 * The ``mod_python`` request handler has been deprecated since the 1.3 110 115 release. The ``mod_wsgi`` handler should be used instead. -
docs/topics/forms/modelforms.txt
106 106 107 107 ``URLField`` ``URLField`` with ``verify_exists`` set 108 108 to the model field's ``verify_exists`` 109 110 ``XMLField`` ``CharField`` with111 ``widget=forms.Textarea``112 109 =============================== ======================================== 113 110 114 111 .. versionadded:: 1.2 -
docs/ref/models/fields.txt
836 836 ``XMLField`` 837 837 ------------ 838 838 839 .. versionchanged:: 1.3 840 ``XMLField`` is deprecated. Use TextField instead. 841 839 842 .. class:: XMLField(schema_path=None, [**options]) 840 843 841 A :class:`TextField` that checks that the value is valid XML that matches a842 given schema. Takes one requiredargument:844 A :class:`TextField` that stores XML data and a path to a schema. Takes one 845 optional argument: 843 846 844 847 .. attribute:: schema_path 845 848 846 The filesystem path to a RelaxNG_ schema against which to validate the 847 field. 849 The filesystem path to a schema for the field. 848 850 849 .. _RelaxNG: http://www.relaxng.org/850 851 851 852 Relationship fields 852 853 =================== -
tests/regressiontests/serializers_regress/tests.py
222 222 (data_obj, 180, USStateData, "MA"), 223 223 (data_obj, 181, USStateData, None), 224 224 (data_obj, 182, USStateData, ""), 225 (data_obj, 190, XMLData, "<foo></foo>"),226 (data_obj, 191, XMLData, None),227 (data_obj, 192, XMLData, ""),228 225 229 226 (generic_obj, 200, GenericData, ['Generic Object 1', 'tag1', 'tag2']), 230 227 (generic_obj, 201, GenericData, ['Generic Object 2', 'tag2', 'tag3']), -
tests/regressiontests/serializers_regress/models.py
79 79 class USStateData(models.Model): 80 80 data = USStateField(null=True) 81 81 82 class XMLData(models.Model):83 data = models.XMLField(null=True)84 85 82 class Tag(models.Model): 86 83 """A tag on an item.""" 87 84 data = models.SlugField() … … 218 215 class USStatePKData(models.Model): 219 216 data = USStateField(primary_key=True) 220 217 221 # class XMLPKData(models.Model):222 # data = models.XMLField(primary_key=True)223 224 218 class ComplexModel(models.Model): 225 219 field1 = models.CharField(max_length=10) 226 220 field2 = models.CharField(max_length=10) -
django/db/models/fields/__init__.py
1136 1136 description = _("XML text") 1137 1137 1138 1138 def __init__(self, verbose_name=None, name=None, schema_path=None, **kwargs): 1139 import warnings 1140 warnings.warn("XMLField is deprecated, please migrate to " 1141 "TextField for equivalent functionality", 1142 DeprecationWarning) 1139 1143 self.schema_path = schema_path 1140 1144 Field.__init__(self, verbose_name, name, **kwargs) 1141 1145 -
django/contrib/gis/utils/layermapping.py
54 54 models.TextField : OFTString, 55 55 models.URLField : OFTString, 56 56 USStateField : OFTString, 57 #This is a reminder that XMLField is deprecated 58 # and this needs to be removed in 1.4 57 59 models.XMLField : OFTString, 58 60 models.SmallIntegerField : (OFTInteger, OFTReal, OFTString), 59 61 models.PositiveSmallIntegerField : (OFTInteger, OFTReal, OFTString),