Changeset 3670

Show
Ignore:
Timestamp:
12/05/07 15:43:20 (1 year ago)
Author:
mscott
Message:

Merge #56 to trunk:

SchevoSchemaDefinition

  • Note newly-deprecated fields.
  • Update information about renamed fields.

Field types

  • String now stores unicode strings.
    • New multiline attribute to use instead of distinct Memo field type.
  • Bytes now stores byte sequences.
  • Blob is deprecated in favor of Bytes.
  • Memo is deprecated in favor of String(multiline=True).
  • Unicode is deprecated in favor of String.

Make appropriate changes in test schemata to sync with the field type name changes.


schevo.field:String.validate

  • Now honors multiline=False and raises a ValueError? if a newline is encountered in such a string.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Schevo/SCHEMA-PREAMBLE.txt

    r3112 r3670  
    1212##     _hidden = True 
    1313## 
    14 ##     name = f.unicode() 
     14##     name = f.string() 
    1515##     data = f.image() 
    1616## 
  • trunk/Schevo/doc/SchevoPublicApi.txt

    r3404 r3670  
    135135    ...     class GreatPerson(E.Entity): 
    136136    ... 
    137     ...         name = f.unicode() 
     137    ...         name = f.string() 
    138138    ...     """) 
    139139    >>> print label(t.db.GreatPerson) 
     
    150150    ...     class GreatPerson(E.Entity): 
    151151    ...       
    152     ...         name = f.unicode() 
     152    ...         name = f.string() 
    153153    ... 
    154154    ...         _label = 'Great PERSON' 
     
    210210    ...     class State(E.Entity): 
    211211    ...      
    212     ...         name = f.unicode() 
    213     ...         abbreviation = f.unicode() 
     212    ...         name = f.string() 
     213    ...         abbreviation = f.string() 
    214214    ...          
    215215    ...         _key(name) 
     
    230230    ...     class City(E.Entity): 
    231231    ... 
    232     ...         name = f.unicode() 
     232    ...         name = f.string() 
    233233    ...         state = f.entity('State') 
    234234    ...          
     
    241241    ...     class State(E.Entity): 
    242242    ...      
    243     ...         name = f.unicode() 
    244     ...         abbreviation = f.unicode() 
     243    ...         name = f.string() 
     244    ...         abbreviation = f.string() 
    245245    ...          
    246246    ...         _key(name) 
     
    262262    ...     class City(E.Entity): 
    263263    ... 
    264     ...         name = f.unicode() 
     264    ...         name = f.string() 
    265265    ...         state = f.entity('State') 
    266266    ...          
     
    276276    ...     class State(E.Entity): 
    277277    ...      
    278     ...         name = f.unicode() 
    279     ...         abbreviation = f.unicode() 
     278    ...         name = f.string() 
     279    ...         abbreviation = f.string() 
    280280    ...          
    281281    ...         _key(name) 
     
    332332  ... class Person(E.Entity): 
    333333  ...  
    334   ...     name = f.unicode() 
     334  ...     name = f.string() 
    335335  ...     birthdate = f.date() 
    336336  ...  
     
    351351  ... class Location(E.Entity): 
    352352  ...  
    353   ...     name = f.unicode() 
     353  ...     name = f.string() 
    354354  ...      
    355355  ...     _key(name) 
     
    411411 
    412412It is worth noting that at any point, you can get a human language 
    413 version of the query by converting it to a string or unicode:: 
     413version of the query by converting it to a string:: 
    414414 
    415415  >>> print person_name 
     
    628628 
    629629      # Assume original declaration order was: 
    630       #    foo = f.unicode() 
    631       #    bar = f.unicode() 
    632       #    baz = f.unicode() 
     630      #    foo = f.string() 
     631      #    bar = f.string() 
     632      #    baz = f.string() 
    633633 
    634634      bar, baz = obj.f.bar, obj.f.baz 
     
    638638 
    639639      # Now the order is the following: 
    640       #    foo = f.unicode() 
    641       #    baz = f.unicode() 
    642       #    bar = f.unicode() 
     640      #    foo = f.string() 
     641      #    baz = f.string() 
     642      #    bar = f.string() 
    643643 
    644644* They have a method, ``obj.sys.fields()``, that returns a 
  • trunk/Schevo/doc/SchevoSchemaDefinition.txt

    r3550 r3670  
    110110      _hidden = True 
    111111 
    112       name = f.unicode() 
     112      name = f.string() 
    113113      data = f.image() 
    114114 
     
    227227 
    228228- `Field definitions`_.  Here is a ``Foo`` extent where each entity 
    229   has a ``name`` field of ``unicode`` type, and a ``FooChild`` extent 
     229  has a ``name`` field of ``string`` type, and a ``FooChild`` extent 
    230230  where each entity has a reference to a ``Foo`` entity and also has a 
    231231  ``bar`` field of ``integer`` type:: 
     
    247247      class Gender(E.Entity): 
    248248 
    249           code = f.unicode() 
    250           name = f.unicode() 
     249          code = f.string() 
     250          name = f.string() 
    251251          @f.integer() 
    252252          def count(self): 
     
    255255      class Person(E.Entity): 
    256256       
    257           name = f.unicode() 
     257          name = f.string() 
    258258          gender = f.entity('Gender', required=False) 
    259259       
     
    264264      class Person(E.Entity): 
    265265 
    266           name = f.unicode() 
     266          name = f.string() 
    267267          age = f.integer() 
    268268 
     
    470470    class Dog(E.Entity): 
    471471     
    472         name = f.unicode()                        # [1] 
     472        name = f.string()                         # [1] 
    473473        birthdate = f.date(required=False)        # [2] 
    474474        disposition = f.entity('Disposition', on_delete=UNASSIGN, 
     
    476476                               default=('Cheerful',))    # [3] 
    477477 
    478 1. The `name` field is a required `Unicode` field.  By default, all 
     4781. The `name` field is a required `String` field.  By default, all 
    479479   fields are required. 
    480480 
     
    600600 
    601601 
     602String field types 
     603.................. 
     604 
     605**String** fields are used to store Unicode strings. An application 
     606may assume that a `String` field's value can be displayed to a user as 
     607text. 
     608 
     609String fields accept a `multiline` attribute that you can set to one 
     610of the following: 
     611 
     612* `None`: (default) The string field accepts newlines in its 
     613  value. User interfaces are encouraged to render the field as a 
     614  single-line widget. 
     615 
     616* `True`: The string field accepts newlines in its value. User 
     617  interfaces are encouraged to render the field as a multi-line 
     618  widget. 
     619 
     620* `False`: The string field does not accept newlines in its 
     621  value. User interfaces are encouraged to render the field as a 
     622  single-line widget. 
     623 
     624**Path** fields are `String` fields used to store filesystem paths. 
     625 
     626 
     627Bytes fields 
     628............ 
     629 
     630**Bytes** fields are used to store 8-bit byte sequences. An 
     631application should not assume that a `Bytes` field can be displayed to 
     632a user as text. 
     633 
     634**Image** fields are `Bytes` fields that store binary data for an 
     635image. 
     636 
     637 
     638Numeric fields 
     639.............. 
     640 
     641**Integer** fields store integer values. 
     642 
     643**Float** fields store floating point values. 
     644 
     645**Money** fields store fixed-point fractional values, and are commonly 
     646used to store values representing monetary amounts. 
     647 
     648 
     649Date and time fields 
     650.................... 
     651 
     652**Date** fields store `datetime.date` objects. 
     653 
     654**Datetime** fields store `datetime.datetime` objects. 
     655 
     656 
     657Boolean field 
     658............. 
     659 
     660A **Boolean** field stores a boolean value. 
     661 
     662 
     663Entity fields 
     664............. 
     665 
     666An **Entity** field stores a reference to another entity. 
     667 
     668An **EntityList** field stores a list of references to other entities. 
     669 
     670An **EntitySet** field stores a set of references to other entities. 
     671 
     672 
    602673HashedValue field types 
    603674....................... 
     
    621692 
    622693 
    623 String field types 
    624 .................. 
    625  
    626 **String** fields are used to store Python ASCII strings. An 
    627 application may assume that a `String` field's value can be displayed 
    628 to a user as text. 
    629  
    630 **Path** fields are `String` fields used to store filesystem paths. 
    631  
    632  
    633 Unicode fields 
    634 .............. 
    635  
    636 **Unicode** fields are used to store Unicode strings. An application 
    637 may assume that a `Unicode` field is a single-line field. 
    638  
    639 **Memo** fields are used to store Unicode strings. An application may 
    640 assume that a `Memo` field is identical in operation to a `Unicode` 
    641 field, but that it is a multiple-line field. 
    642  
    643  
    644 Blob fields 
    645 ........... 
    646  
    647 **Blob** fields are used to store binary large objects as Python 
    648 strings. An application should not assume that a `Blog` field can be 
    649 displayed to a user as text. 
    650  
    651 **Image** fields are `Blob` fields that store binary data for an 
    652 image. 
    653  
    654  
    655 Numeric fields 
    656 .............. 
    657  
    658 **Integer** fields store integer values. 
    659  
    660 **Float** fields store floating point values. 
    661  
    662 **Money** fields store fixed-point fractional values, and are commonly 
    663 used to store values representing monetary amounts. 
    664  
    665  
    666 Date and time fields 
    667 .................... 
    668  
    669 **Date** fields store `datetime.date` objects. 
    670  
    671 **Datetime** fields store `datetime.datetime` objects. 
    672  
    673  
    674 Boolean field 
    675 ............. 
    676  
    677 A **Boolean** field stores a boolean value. 
    678  
    679  
    680 Entity fields 
    681 ............. 
    682  
    683 An **Entity** field stores a reference to another entity. 
    684  
    685 An **EntityList** field stores a list of references to other entities. 
    686  
    687 An **EntitySet** field stores a set of references to other entities. 
    688  
    689  
    690694Custom field types 
    691695.................. 
     
    708712The following types of fields are deprecated: 
    709713 
     714- **Blob**: Use `Bytes fields`_ instead. 
     715 
     716- **Memo**: Use `Unicode fields`_ instead, setting ``multiline=True`` 
     717  in your field definition. 
     718 
    710719- **Password**: Use one of the `HashedValue field types`_ instead. 
    711720 
     
    713722  do one of the following: 
    714723 
    715   * Use the `Unicode` field type:: 
     724  * Use the `String` field type:: 
    716725 
    717726        class Foo(E.Entity): 
    718             password = f.unicode() 
     727            password = f.string() 
    719728 
    720729  * Create a custom `PlaintextPassword` field type:: 
    721730 
    722         class PlaintextPassword(F.Unicode): 
     731        class PlaintextPassword(F.String): 
    723732            pass 
    724733 
    725734        class Foo(E.Entity): 
    726735            password = f.plaintext_password() 
     736 
     737- **Unicode**: Use `String fields`_ to store text, or `Bytes fields`_ 
     738  to store 8-bit byte sequences. 
    727739 
    728740 
  • trunk/Schevo/doc/SchevoTransactionHookMethods.txt

    r3398 r3670  
    4040    class Foo(E.Entity): 
    4141 
    42         bar = f.unicode() 
     42        bar = f.string() 
    4343        count = f.integer() 
    4444                 
     
    5858    class Foo(E.Entity): 
    5959 
    60         bar = f.unicode() 
     60        bar = f.string() 
    6161        count = f.integer() 
    6262 
     
    7878    ...     class Foo(E.Entity): 
    7979    ... 
    80     ...         bar = f.unicode() 
     80    ...         bar = f.string() 
    8181    ... 
    8282    ...         class _Create(T.Create): 
     
    124124    class Foo(E.Entity): 
    125125 
    126         bar = f.unicode() 
     126        bar = f.string() 
    127127        count = f.integer() 
    128128         
     
    137137    class Foo(E.Entity): 
    138138 
    139         bar = f.unicode() 
     139        bar = f.string() 
    140140        count = f.integer() 
    141141 
     
    149149    class Foo(E.Entity): 
    150150 
    151         bar = f.unicode() 
     151        bar = f.string() 
    152152        count = f.integer() 
    153153 
  • trunk/Schevo/doc/SchevoTutorialMovieReviews1.txt

    r3187 r3670  
    2424        _hidden = True 
    2525 
    26         name = f.unicode() 
     26        name = f.string() 
    2727        data = f.image() 
    2828 
     
    3232    class Actor(E.Entity): 
    3333 
    34         name = f.unicode() 
     34        name = f.string() 
    3535 
    3636        _key(name) 
     
    4343    class Director(E.Entity): 
    4444 
    45         name = f.unicode() 
     45        name = f.string() 
    4646 
    4747        _key(name) 
     
    5050    class Movie(E.Entity): 
    5151 
    52         title = f.unicode() 
     52        title = f.string() 
    5353        release_date = f.date() 
    5454        director = f.entity('Director') 
    55         description = f.memo(required=False) 
     55        description = f.string(multiline=True, required=False) 
    5656 
    5757        _key(title) 
     
    196196    ...         _hidden = True              # [2] 
    197197    ... 
    198     ...         name = f.unicode()          # [3] 
     198    ...         name = f.string()           # [3] 
    199199    ...         data = f.image()            # [4] 
    200200    ... 
     
    211211   *may* honor this and hide this extent from the user in some way. 
    212212 
    213 3. ``name`` is a Unicode string *field*. See `SchevoNamespaces`:trac: 
    214    to read more about the ``f`` namespace. 
     2133. ``name`` is a string *field*. See `SchevoNamespaces`:trac: to read 
     214   more about the ``f`` namespace. 
    215215 
    2162164. ``data`` is an Image field. 
     
    257257    ...     class Movie(E.Entity): 
    258258    ... 
    259     ...         title = f.unicode() 
     259    ...         title = f.string() 
    260260    ...         release_date = f.date() 
    261     ...         description = f.memo(required=False)    # [1], [2] 
     261    ...         description = f.string(required=False, 
     262    ...                                multiline=True)  # [1], [2] 
    262263    ... 
    263264    ...         _key(title)                             # [3] 
     
    265266 
    266267 
    267 1. ``memo`` fields are a subclass of ``Unicode`` fields; the fact that 
    268    ``description`` is a ``Memo`` field is a hint that a user interface 
    269    *may* use to render a multi-line input widget rather than a 
    270    single-line one
     2681. By default, `String` fields will store multi-line values, but user 
     269   interfaces typically render them as single-line widgets. We can 
     270   hint to the user interface that it may use a multi-line input 
     271   widget by setting ``multiline=True``
    271272 
    2722732. By default, all fields are required. ``description`` isn't. 
     
    393394    ...     class Movie(E.Entity): 
    394395    ... 
    395     ...         title = f.unicode() 
     396    ...         title = f.string() 
    396397    ...         release_date = f.date() 
    397     ...         description = f.memo(required=False) 
     398    ...         description = f.string(multiline=True, required=False) 
    398399    ... 
    399400    ...         _key(title) 
     
    463464    ...     class Actor(E.Entity): 
    464465    ... 
    465     ...         name = f.unicode() 
     466    ...         name = f.string() 
    466467    ... 
    467468    ...         _key(name) 
     
    470471    ...     class Director(E.Entity): 
    471472    ... 
    472     ...         name = f.unicode() 
     473    ...         name = f.string() 
    473474    ... 
    474475    ...         _key(name) 
     
    477478    ...     class Movie(E.Entity): 
    478479    ... 
    479     ...         title = f.unicode() 
     480    ...         title = f.string() 
    480481    ...         release_date = f.date() 
    481482    ...         director = f.entity('Director') 
    482     ...         description = f.memo(required=False) 
     483    ...         description = f.string(multiline=True, required=False) 
    483484    ... 
    484485    ...         _key(title) 
     
    607608    ...     class Actor(E.Entity): 
    608609    ... 
    609     ...         name = f.unicode() 
     610    ...         name = f.string() 
    610611    ... 
    611612    ...         _key(name) 
     
    621622    ...     class Movie(E.Entity): 
    622623    ... 
    623     ...         title = f.unicode() 
     624    ...         title = f.string() 
    624625    ...         release_date = f.date() 
    625626    ...         director = f.entity('Director') 
    626     ...         description = f.memo(required=False) 
     627    ...         description = f.string(multiline=True, required=False) 
    627628    ... 
    628629    ...         _key(title) 
  • trunk/Schevo/schevo/example/moviereviews/schema/moviereviews_001.py

    r3187 r3670  
    99    _hidden = True 
    1010 
    11     name = f.unicode() 
     11    name = f.string() 
    1212    data = f.image() 
    1313 
     
    1717class Actor(E.Entity): 
    1818 
    19     name = f.unicode() 
     19    name = f.string() 
    2020 
    2121    _key(name) 
     
    2828class Director(E.Entity): 
    2929 
    30     name = f.unicode() 
     30    name = f.string() 
    3131 
    3232    _key(name) 
     
    3535class Movie(E.Entity): 
    3636 
    37     title = f.unicode() 
     37    title = f.string() 
    3838    release_date = f.date() 
    3939    director = f.entity('Director') 
    40     description = f.memo(required=False) 
     40    description = f.string(multiline=True, required=False) 
    4141 
    4242    _key(title) 
  • trunk/Schevo/schevo/example/todo/schema/todo_001.py

    r3306 r3670  
    88    _hidden = True 
    99 
    10     name = f.unicode() 
     10    name = f.string() 
    1111    data = f.image() 
    1212 
     
    1717    """Gender of a person.""" 
    1818 
    19     code = f.unicode() 
    20     name = f.unicode() 
     19    code = f.string() 
     20    name = f.string() 
    2121 
    2222    @f.integer(label=u'Person Count') 
     
    3838 
    3939    done = f.boolean(default=False) 
    40     name = f.unicode() 
     40    name = f.string() 
    4141    topic = f.entity('Topic', required=False) 
    4242    priority = f.entity('Priority') 
    4343    person = f.entity('Person', required=False) 
    44     notes = f.memo(required=False) 
     44    notes = f.string(multiline=True, required=False) 
    4545 
    4646 
     
    5050    _plural = u'People' 
    5151 
    52     name = f.unicode() 
     52    name = f.string() 
    5353    gender = f.entity('Gender') 
    5454 
     
    6767 
    6868    code = f.integer() 
    69     name = f.unicode() 
     69    name = f.string() 
    7070 
    7171    @f.integer(label=u'# Open Items') 
     
    9393    """Subject area for todo items.""" 
    9494 
    95     name = f.unicode() 
     95    name = f.string() 
    9696 
    9797    _sample = [ 
  • trunk/Schevo/schevo/field.py

    r3610 r3670  
    585585 
    586586class String(Field): 
    587     """String field class. 
    588  
    589     monospace: Hint to a UI to display contents using a monospace 
    590     font. 
     587    """Unicode string field class. 
     588 
     589    - `monospace`: Hint to a UI to display contents using a monospace 
     590      font. 
     591    - `multiline`: None (default) to accept newlines and render as 
     592      single-line widget. True to accept newlines and render as 
     593      multi-line widget. False to not accept newlines and to render as 
     594      single-line widget. 
    591595    """ 
    592596 
     597    data_type = unicode 
     598    monospace = False 
     599    multiline = None 
     600 
     601    def convert(self, value, db=None): 
     602        """Convert the value to a Unicode string.""" 
     603        if value is UNASSIGNED: 
     604            return value 
     605        return unicode(value) 
     606 
     607    def db_equivalence_value(self, stop_entities): 
     608        return self._value 
     609 
     610    def validate(self, value): 
     611        Field.validate(self, value) 
     612        if not self.allow_empty and value == u'': 
     613            msg = '%s value must not be empty.' % self._name 
     614            self._raise(ValueError, msg) 
     615        if self.multiline == False and u'\n' in value: 
     616            msg = '%s value must be a single line.' % self._name 
     617            self._raise(ValueError, msg) 
     618        self._validate_min_max_size(value) 
     619 
     620 
     621class Path(String): 
     622    """File path field class. 
     623 
     624    Intended to designate a string field as something that stores a 
     625    path to a file or directory. 
     626 
     627    directory_only: True if only a directory path should be stored in 
     628    the field. 
     629 
     630    file_only: True if only a file path should be stored in the field. 
     631    """ 
     632 
     633    data_type = unicode 
     634    directory_only = False 
     635    file_only = False 
     636 
     637 
     638# -------------------------------------------------------------------- 
     639 
     640 
     641class Bytes(Field): 
     642    """Binary large object field class.""" 
     643 
    593644    data_type = str 
    594     monospace = False 
    595645 
    596646    def convert(self, value, db=None): 
     
    603653        return self._value 
    604654 
    605     def validate(self, value): 
    606         Field.validate(self, value) 
    607         if not self.allow_empty and value == '': 
    608             msg = '%s value must not be empty.' % self._name 
    609             self._raise(ValueError, msg) 
    610         self._validate_min_max_size(value) 
    611  
    612  
    613 class Path(String): 
    614     """File path field class. 
    615  
    616     Intended to designate a string field as something that stores a 
    617     path to a file or directory. 
    618  
    619     directory_only: True if only a directory path should be stored in 
    620     the field. 
    621  
    622     file_only: True if only a file path should be stored in the field. 
    623     """ 
    624  
    625     data_type = str 
    626     directory_only = False 
    627     file_only = False 
    628  
    629  
    630 class Unicode(Field): 
    631     """Unicode field class. 
    632  
    633     monospace: Hint to a UI to display contents using a monospace 
    634     font. 
    635     """ 
    636  
    637     data_type = unicode 
    638     monospace = False 
    639  
    640     def convert(self, value, db=None): 
    641         """Convert the value to a Unicode string.""" 
    642         if value is UNASSIGNED: 
    643             return value 
    644         return unicode(value) 
    645  
    646     def db_equivalence_value(self, stop_entities): 
    647         return self._value 
    648  
    649     def validate(self, value): 
    650         Field.validate(self, value) 
    651         if not self.allow_empty and value == u'': 
    652             msg = '%s value must not be empty.' % self._name 
    653             self._raise(ValueError, msg) 
    654         self._validate_min_max_size(value) 
    655  
    656  
    657 class Memo(Unicode): 
    658     """Memo field class. 
    659  
    660     Intended to designate a unicode string field as something that 
    661     stores a multi-line memo rather than a single-line string. 
    662     """ 
    663  
    664     data_type = unicode 
    665  
    666  
    667 # -------------------------------------------------------------------- 
    668  
    669  
    670 class Blob(Field): 
    671     """Binary large object field class.""" 
    672  
    673     data_type = object 
    674  
    675     def convert(self, value, db=None): 
    676         """Convert the value to a string.""" 
    677         if value is UNASSIGNED: 
    678             return value 
    679         return str(value) 
    680  
    681     def db_equivalence_value(self, stop_entities): 
    682         return self._value 
    683  
    684655    def __str__(self): 
    685656        v = self._value 
     
    697668 
    698669 
    699 class Image(Blob): 
     670class Image(Bytes): 
    700671    """Image field class.""" 
    701672 
    702     data_type = object 
     673    data_type = str 
    703674 
    704675 
     
    16721643 
    16731644 
    1674 class Password(Unicode): 
    1675     """Password field class. 
     1645class Blob(Bytes): 
     1646    """Blob field, deprecated in favor of Bytes.""" 
     1647 
     1648    _deprecated_class = True 
     1649    _deprecated_class_see_also = 'http://schevo.org/wiki/SchevoSchemaDefinition' 
     1650 
     1651 
     1652class Memo(String): 
     1653    """Memo field class, deprecated in favor of String(multiline=True). 
     1654 
     1655    Intended to designate a unicode string field as something that 
     1656    stores a multi-line memo rather than a single-line string. 
     1657    """ 
     1658 
     1659    multiline = True 
     1660 
     1661    _deprecated_class = True 
     1662    _deprecated_class_see_also = 'http://schevo.org/wiki/SchevoSchemaDefinition' 
     1663 
     1664 
     1665class Password(String): 
     1666    """Password field class, deprecated in favor of HashedPassword. 
    16761667 
    16771668    Intended to designate a unicode field as something that stores a 
    16781669    plaintext string, but whose value shouldn't be exposed in a UI. 
    16791670    """ 
    1680  
    1681     data_type = unicode 
    16821671 
    16831672    _deprecated_class = True 
     
    16931682    def reversible(self, value=None): 
    16941683        return u'' 
     1684 
     1685 
     1686class Unicode(String): 
     1687    """Unicode field class, deprecated in favor of String.""" 
     1688 
     1689    _deprecated_class = True 
     1690    _deprecated_class_see_also = 'http://schevo.org/wiki/SchevoSchemaDefinition' 
    16951691 
    16961692 
  • trunk/Schevo/schevo/templates/schevo/+package+/schema/+package+_001.py_tmpl

    r3187 r3670  
    1010    _hidden = True 
    1111 
    12     name = f.unicode() 
     12    name = f.string() 
    1313    data = f.image() 
    1414 
  • trunk/Schevo/schevo/test/test_bank.py

    r3509 r3670  
    1515 
    1616        owner = f.entity('Person') 
    17         name = f.unicode() 
     17        name = f.string() 
    1818        balance = f.money() 
    1919        overdraft_protection = f.boolean(default=False) # XXX 
     
    4949        """Gender of a person.""" 
    5050 
    51         code = f.unicode() 
    52         name = f.unicode() 
     51        code = f.string() 
     52        name = f.string() 
    5353        @f.integer() 
    5454        def count(self): 
     
    6262        """Bank account owner.""" 
    6363 
    64         name = f.unicode() 
     64        name = f.string() 
    6565        gender = f.entity('Gender', required=False) 
    6666 
  • trunk/Schevo/schevo/test/test_change.py

    r3509 r3670  
    1717class User(E.Entity): 
    1818 
    19     name = f.unicode() 
     19    name = f.string() 
    2020    age = f.integer(required=False) 
    2121 
     
    4545 
    4646    owner = f.entity('Person') 
    47     name = f.unicode() 
     47    name = f.string() 
    4848    balance = f.money() 
    4949    overdraft_protection = f.boolean(default=False) # XXX 
     
    7979    """Gender of a person.""" 
    8080 
    81     code = f.unicode() 
    82     name = f.unicode() 
     81    code = f.string() 
     82    name = f.string() 
    8383    @f.integer() 
    8484    def count(self): 
     
    9292    """Bank account owner.""" 
    9393 
    94     name = f.unicode() 
     94    name = f.string() 
    9595    gender = f.entity('Gender', required=False) 
    9696 
  • trunk/Schevo/schevo/test/test_convert_format.py

    r3509 r3670  
    1717        class Foo(E.Entity): 
    1818 
    19             name = f.unicode() 
     19            name = f.string() 
    2020 
    2121            _key(name) 
     
    148148        class Foo(E.Entity): 
    149149 
    150             name = f.unicode() 
     150            name = f.string() 
    151151 
    152152            _key(name) 
     
    159159        class Gee(E.Entity): 
    160160 
    161             name = f.unicode() 
     161            name = f.string() 
    162162 
    163163            _key(name) 
  • trunk/Schevo/schevo/test/test_entity_extent.py

    r3509 r3670  
    2424        realm = f.entity('Realm') 
    2525        user = f.entity('User') 
    26         name = f.unicode() 
     26        name = f.string() 
    2727 
    2828        _key(user, realm, name) 
    &