Scrapy, a fast high-level web crawling & scraping framework for Python.
added ListField documentation, ordered field reference alphabetically
Ismael Carnales32894643a034
diff --git a/docs/experimental/ref/newitem/fields.rst b/docs/experimental/ref/newitem/fields.rstindex cd54c2ccb..dd2e4b5e5 100644--- a/docs/experimental/ref/newitem/fields.rst+++ b/docs/experimental/ref/newitem/fields.rst@@ -6,48 +6,56 @@ Item Fields.. module:: scrapy.newitem.fields+Field options=============Every ``Field`` class constructor accepts these arguments.+``default``-----------The default value for the field. See :ref:`topics-newitem-index-defaults`.+Field types===========These are the available built-in ``Field`` types. See:ref:`ref-newitem-fields-custom-fields` for info on creating your own field types.-TextField-----------.. class:: TextField+``BooleanField``+----------------- A unicode text.+.. class:: BooleanField- This class overrides the following methods from :class:`BaseField`:+ A boolean (true/false) field.- .. method:: from_unicode_list(unicode_list)- Return a unicode string composed by joining the elements of- ``unicode_list`` with spaces.+``DateField``+-------------- For more info about this method see :class:`BaseField.from_unicode_list`.+.. class:: DateField+ A date, represented in Python by a `datetime.date`_ instance.-IntegerField-------------+.. _datetime.date: http://docs.python.org/library/datetime.html#datetime.date-.. class:: IntegerField- An integer.+``DateTimeField``+-----------------++.. class:: DateTimeField++ A date with time, represented in Python by a `datetime.datetime`_ instance.++.. _datetime.datetime: http://docs.python.org/library/datetime.html#datetime.datetime-DecimalField-------------++``DecimalField``+----------------.. class:: DecimalField@@ -56,40 +64,61 @@ DecimalField.. _Decimal: http://docs.python.org/library/decimal.html#decimal.Decimal-FloatField-----------++``FloatField``+--------------.. class:: FloatFieldA floating-point number represented in Python by a ``float`` instance.-BooleanField--------------.. class:: BooleanField+``IntegerField``+----------------- A boolean (true/false) field.+.. class:: IntegerField-DateTimeField+ An integer.+++``ListField``--------------.. class:: DateTimeField+.. class:: ListField(field)- A date with time, represented in Python by a `datetime.datetime`_ instance.+ A special field that works like a list of fields of another provided field kind.-.. _datetime.datetime: http://docs.python.org/library/datetime.html#datetime.datetime+ :param field: The field which the elements of this list must conform to.+ :type field: a :class:`~scrapy.newitem.fields.BaseField` object-DateField----------+ Usage example::-.. class:: DateField+ class ExampleItem(Item)+ names = fields.ListField(fields.TextField())- A date, represented in Python by a `datetime.date`_ instance.+ item = ExampleItem()+ item['names'] = [u'John', u'Jeena']-.. _datetime.date: http://docs.python.org/library/datetime.html#datetime.date-TimeField----------+``TextField``+-------------++.. class:: TextField++ A unicode text.++ This class overrides the following methods from :class:`BaseField`:++ .. method:: from_unicode_list(unicode_list)++ Return a unicode string composed by joining the elements of+ ``unicode_list`` with spaces.++ For more info about this method see :class:`BaseField.from_unicode_list`.+++``TimeField``+-------------.. class:: TimeField@@ -99,6 +128,7 @@ TimeField.. _ref-newitem-fields-custom-fields:+Creating custom fields======================@@ -108,6 +138,7 @@ which you can also subclass to create your own custom fields.You can also subclass a more specific field class, say :class:`DecimalField`,to implement a ``PriceField``, for example.+BaseField class---------------