Changeset 3670
- Timestamp:
- 12/05/07 15:43:20 (1 year ago)
- Files:
-
- trunk/Schevo/SCHEMA-PREAMBLE.txt (modified) (1 diff)
- trunk/Schevo/doc/SchevoPublicApi.txt (modified) (12 diffs)
- trunk/Schevo/doc/SchevoSchemaDefinition.txt (modified) (11 diffs)
- trunk/Schevo/doc/SchevoTransactionHookMethods.txt (modified) (6 diffs)
- trunk/Schevo/doc/SchevoTutorialMovieReviews1.txt (modified) (14 diffs)
- trunk/Schevo/schevo/example/moviereviews/schema/moviereviews_001.py (modified) (4 diffs)
- trunk/Schevo/schevo/example/todo/schema/todo_001.py (modified) (6 diffs)
- trunk/Schevo/schevo/field.py (modified) (5 diffs)
- trunk/Schevo/schevo/templates/schevo/+package+/schema/+package+_001.py_tmpl (modified) (1 diff)
- trunk/Schevo/schevo/test/test_bank.py (modified) (3 diffs)
- trunk/Schevo/schevo/test/test_change.py (modified) (4 diffs)
- trunk/Schevo/schevo/test/test_convert_format.py (modified) (3 diffs)
- trunk/Schevo/schevo/test/test_entity_extent.py (modified) (8 diffs)
- trunk/Schevo/schevo/test/test_entity_subclass.py (modified) (2 diffs)
- trunk/Schevo/schevo/test/test_equivalent.py (modified) (19 diffs)
- trunk/Schevo/schevo/test/test_evolve.py (modified) (2 diffs)
- trunk/Schevo/schevo/test/test_field.py (modified) (8 diffs)
- trunk/Schevo/schevo/test/test_field_entitylist.py (modified) (8 diffs)
- trunk/Schevo/schevo/test/test_field_entityset.py (modified) (8 diffs)
- trunk/Schevo/schevo/test/test_field_entitysetset.py (modified) (4 diffs)
- trunk/Schevo/schevo/test/test_field_factory_aliases.py (modified) (2 diffs)
- trunk/Schevo/schevo/test/test_field_maps.py (modified) (1 diff)
- trunk/Schevo/schevo/test/test_icon.py (modified) (1 diff)
- trunk/Schevo/schevo/test/test_label.py (modified) (7 diffs)
- trunk/Schevo/schevo/test/test_on_delete.py (modified) (13 diffs)
- trunk/Schevo/schevo/test/test_relax_index.py (modified) (1 diff)
- trunk/Schevo/schevo/test/test_transaction.py (modified) (14 diffs)
- trunk/Schevo/schevo/test/test_transaction_before_after.py (modified) (1 diff)
- trunk/Schevo/schevo/test/test_transaction_cdu_subclass.py (modified) (1 diff)
- trunk/Schevo/schevo/test/test_transaction_field_reorder.py (modified) (1 diff)
- trunk/Schevo/schevo/test/test_view.py (modified) (3 diffs)
- trunk/Schevo/schevo/test/testschema_equivalent_bad/schema_001.py (modified) (1 diff)
- trunk/Schevo/schevo/test/testschema_equivalent_bad/schema_002.py (modified) (1 diff)
- trunk/Schevo/schevo/test/testschema_equivalent_bad/schema_003.py (modified) (1 diff)
- trunk/Schevo/schevo/test/testschema_equivalent_good/schema_001.py (modified) (1 diff)
- trunk/Schevo/schevo/test/testschema_equivalent_good/schema_002.py (modified) (1 diff)
- trunk/Schevo/schevo/test/testschema_equivalent_good/schema_003.py (modified) (1 diff)
- trunk/Schevo/schevo/test/testschema_evolve/schema_001.py (modified) (1 diff)
- trunk/Schevo/schevo/test/testschema_evolve/schema_002.py (modified) (1 diff)
- trunk/Schevo/schevo/test/testschema_prefix_bad1/bar_001.py (modified) (1 diff)
- trunk/Schevo/schevo/test/testschema_prefix_bad1/foo_001.py (modified) (1 diff)
- trunk/Schevo/schevo/test/testschema_prefix_bad2/bar_002.py (modified) (1 diff)
- trunk/Schevo/schevo/test/testschema_prefix_bad2/foo_001.py (modified) (1 diff)
- trunk/Schevo/schevo/test/testschema_prefix_good/foo_001.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Schevo/SCHEMA-PREAMBLE.txt
r3112 r3670 12 12 ## _hidden = True 13 13 ## 14 ## name = f. unicode()14 ## name = f.string() 15 15 ## data = f.image() 16 16 ## trunk/Schevo/doc/SchevoPublicApi.txt
r3404 r3670 135 135 ... class GreatPerson(E.Entity): 136 136 ... 137 ... name = f. unicode()137 ... name = f.string() 138 138 ... """) 139 139 >>> print label(t.db.GreatPerson) … … 150 150 ... class GreatPerson(E.Entity): 151 151 ... 152 ... name = f. unicode()152 ... name = f.string() 153 153 ... 154 154 ... _label = 'Great PERSON' … … 210 210 ... class State(E.Entity): 211 211 ... 212 ... name = f. unicode()213 ... abbreviation = f. unicode()212 ... name = f.string() 213 ... abbreviation = f.string() 214 214 ... 215 215 ... _key(name) … … 230 230 ... class City(E.Entity): 231 231 ... 232 ... name = f. unicode()232 ... name = f.string() 233 233 ... state = f.entity('State') 234 234 ... … … 241 241 ... class State(E.Entity): 242 242 ... 243 ... name = f. unicode()244 ... abbreviation = f. unicode()243 ... name = f.string() 244 ... abbreviation = f.string() 245 245 ... 246 246 ... _key(name) … … 262 262 ... class City(E.Entity): 263 263 ... 264 ... name = f. unicode()264 ... name = f.string() 265 265 ... state = f.entity('State') 266 266 ... … … 276 276 ... class State(E.Entity): 277 277 ... 278 ... name = f. unicode()279 ... abbreviation = f. unicode()278 ... name = f.string() 279 ... abbreviation = f.string() 280 280 ... 281 281 ... _key(name) … … 332 332 ... class Person(E.Entity): 333 333 ... 334 ... name = f. unicode()334 ... name = f.string() 335 335 ... birthdate = f.date() 336 336 ... … … 351 351 ... class Location(E.Entity): 352 352 ... 353 ... name = f. unicode()353 ... name = f.string() 354 354 ... 355 355 ... _key(name) … … 411 411 412 412 It 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::413 version of the query by converting it to a string:: 414 414 415 415 >>> print person_name … … 628 628 629 629 # 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() 633 633 634 634 bar, baz = obj.f.bar, obj.f.baz … … 638 638 639 639 # 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() 643 643 644 644 * They have a method, ``obj.sys.fields()``, that returns a trunk/Schevo/doc/SchevoSchemaDefinition.txt
r3550 r3670 110 110 _hidden = True 111 111 112 name = f. unicode()112 name = f.string() 113 113 data = f.image() 114 114 … … 227 227 228 228 - `Field definitions`_. Here is a ``Foo`` extent where each entity 229 has a ``name`` field of `` unicode`` type, and a ``FooChild`` extent229 has a ``name`` field of ``string`` type, and a ``FooChild`` extent 230 230 where each entity has a reference to a ``Foo`` entity and also has a 231 231 ``bar`` field of ``integer`` type:: … … 247 247 class Gender(E.Entity): 248 248 249 code = f. unicode()250 name = f. unicode()249 code = f.string() 250 name = f.string() 251 251 @f.integer() 252 252 def count(self): … … 255 255 class Person(E.Entity): 256 256 257 name = f. unicode()257 name = f.string() 258 258 gender = f.entity('Gender', required=False) 259 259 … … 264 264 class Person(E.Entity): 265 265 266 name = f. unicode()266 name = f.string() 267 267 age = f.integer() 268 268 … … 470 470 class Dog(E.Entity): 471 471 472 name = f. unicode()# [1]472 name = f.string() # [1] 473 473 birthdate = f.date(required=False) # [2] 474 474 disposition = f.entity('Disposition', on_delete=UNASSIGN, … … 476 476 default=('Cheerful',)) # [3] 477 477 478 1. The `name` field is a required ` Unicode` field. By default, all478 1. The `name` field is a required `String` field. By default, all 479 479 fields are required. 480 480 … … 600 600 601 601 602 String field types 603 .................. 604 605 **String** fields are used to store Unicode strings. An application 606 may assume that a `String` field's value can be displayed to a user as 607 text. 608 609 String fields accept a `multiline` attribute that you can set to one 610 of 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 627 Bytes fields 628 ............ 629 630 **Bytes** fields are used to store 8-bit byte sequences. An 631 application should not assume that a `Bytes` field can be displayed to 632 a user as text. 633 634 **Image** fields are `Bytes` fields that store binary data for an 635 image. 636 637 638 Numeric 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 646 used to store values representing monetary amounts. 647 648 649 Date and time fields 650 .................... 651 652 **Date** fields store `datetime.date` objects. 653 654 **Datetime** fields store `datetime.datetime` objects. 655 656 657 Boolean field 658 ............. 659 660 A **Boolean** field stores a boolean value. 661 662 663 Entity fields 664 ............. 665 666 An **Entity** field stores a reference to another entity. 667 668 An **EntityList** field stores a list of references to other entities. 669 670 An **EntitySet** field stores a set of references to other entities. 671 672 602 673 HashedValue field types 603 674 ....................... … … 621 692 622 693 623 String field types624 ..................625 626 **String** fields are used to store Python ASCII strings. An627 application may assume that a `String` field's value can be displayed628 to a user as text.629 630 **Path** fields are `String` fields used to store filesystem paths.631 632 633 Unicode fields634 ..............635 636 **Unicode** fields are used to store Unicode strings. An application637 may assume that a `Unicode` field is a single-line field.638 639 **Memo** fields are used to store Unicode strings. An application may640 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 fields645 ...........646 647 **Blob** fields are used to store binary large objects as Python648 strings. An application should not assume that a `Blog` field can be649 displayed to a user as text.650 651 **Image** fields are `Blob` fields that store binary data for an652 image.653 654 655 Numeric fields656 ..............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 commonly663 used to store values representing monetary amounts.664 665 666 Date and time fields667 ....................668 669 **Date** fields store `datetime.date` objects.670 671 **Datetime** fields store `datetime.datetime` objects.672 673 674 Boolean field675 .............676 677 A **Boolean** field stores a boolean value.678 679 680 Entity fields681 .............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 690 694 Custom field types 691 695 .................. … … 708 712 The following types of fields are deprecated: 709 713 714 - **Blob**: Use `Bytes fields`_ instead. 715 716 - **Memo**: Use `Unicode fields`_ instead, setting ``multiline=True`` 717 in your field definition. 718 710 719 - **Password**: Use one of the `HashedValue field types`_ instead. 711 720 … … 713 722 do one of the following: 714 723 715 * Use the ` Unicode` field type::724 * Use the `String` field type:: 716 725 717 726 class Foo(E.Entity): 718 password = f. unicode()727 password = f.string() 719 728 720 729 * Create a custom `PlaintextPassword` field type:: 721 730 722 class PlaintextPassword(F. Unicode):731 class PlaintextPassword(F.String): 723 732 pass 724 733 725 734 class Foo(E.Entity): 726 735 password = f.plaintext_password() 736 737 - **Unicode**: Use `String fields`_ to store text, or `Bytes fields`_ 738 to store 8-bit byte sequences. 727 739 728 740 trunk/Schevo/doc/SchevoTransactionHookMethods.txt
r3398 r3670 40 40 class Foo(E.Entity): 41 41 42 bar = f. unicode()42 bar = f.string() 43 43 count = f.integer() 44 44 … … 58 58 class Foo(E.Entity): 59 59 60 bar = f. unicode()60 bar = f.string() 61 61 count = f.integer() 62 62 … … 78 78 ... class Foo(E.Entity): 79 79 ... 80 ... bar = f. unicode()80 ... bar = f.string() 81 81 ... 82 82 ... class _Create(T.Create): … … 124 124 class Foo(E.Entity): 125 125 126 bar = f. unicode()126 bar = f.string() 127 127 count = f.integer() 128 128 … … 137 137 class Foo(E.Entity): 138 138 139 bar = f. unicode()139 bar = f.string() 140 140 count = f.integer() 141 141 … … 149 149 class Foo(E.Entity): 150 150 151 bar = f. unicode()151 bar = f.string() 152 152 count = f.integer() 153 153 trunk/Schevo/doc/SchevoTutorialMovieReviews1.txt
r3187 r3670 24 24 _hidden = True 25 25 26 name = f. unicode()26 name = f.string() 27 27 data = f.image() 28 28 … … 32 32 class Actor(E.Entity): 33 33 34 name = f. unicode()34 name = f.string() 35 35 36 36 _key(name) … … 43 43 class Director(E.Entity): 44 44 45 name = f. unicode()45 name = f.string() 46 46 47 47 _key(name) … … 50 50 class Movie(E.Entity): 51 51 52 title = f. unicode()52 title = f.string() 53 53 release_date = f.date() 54 54 director = f.entity('Director') 55 description = f. memo(required=False)55 description = f.string(multiline=True, required=False) 56 56 57 57 _key(title) … … 196 196 ... _hidden = True # [2] 197 197 ... 198 ... name = f. unicode()# [3]198 ... name = f.string() # [3] 199 199 ... data = f.image() # [4] 200 200 ... … … 211 211 *may* honor this and hide this extent from the user in some way. 212 212 213 3. ``name`` is a Unicode string *field*. See `SchevoNamespaces`:trac:214 to readmore about the ``f`` namespace.213 3. ``name`` is a string *field*. See `SchevoNamespaces`:trac: to read 214 more about the ``f`` namespace. 215 215 216 216 4. ``data`` is an Image field. … … 257 257 ... class Movie(E.Entity): 258 258 ... 259 ... title = f. unicode()259 ... title = f.string() 260 260 ... release_date = f.date() 261 ... description = f.memo(required=False) # [1], [2] 261 ... description = f.string(required=False, 262 ... multiline=True) # [1], [2] 262 263 ... 263 264 ... _key(title) # [3] … … 265 266 266 267 267 1. ``memo`` fields are a subclass of ``Unicode`` fields; the fact that268 ``description`` is a ``Memo`` field is a hint that a user interface269 *may* use to render a multi-line input widget rather than a270 single-line one.268 1. 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``. 271 272 272 273 2. By default, all fields are required. ``description`` isn't. … … 393 394 ... class Movie(E.Entity): 394 395 ... 395 ... title = f. unicode()396 ... title = f.string() 396 397 ... release_date = f.date() 397 ... description = f. memo(required=False)398 ... description = f.string(multiline=True, required=False) 398 399 ... 399 400 ... _key(title) … … 463 464 ... class Actor(E.Entity): 464 465 ... 465 ... name = f. unicode()466 ... name = f.string() 466 467 ... 467 468 ... _key(name) … … 470 471 ... class Director(E.Entity): 471 472 ... 472 ... name = f. unicode()473 ... name = f.string() 473 474 ... 474 475 ... _key(name) … … 477 478 ... class Movie(E.Entity): 478 479 ... 479 ... title = f. unicode()480 ... title = f.string() 480 481 ... release_date = f.date() 481 482 ... director = f.entity('Director') 482 ... description = f. memo(required=False)483 ... description = f.string(multiline=True, required=False) 483 484 ... 484 485 ... _key(title) … … 607 608 ... class Actor(E.Entity): 608 609 ... 609 ... name = f. unicode()610 ... name = f.string() 610 611 ... 611 612 ... _key(name) … … 621 622 ... class Movie(E.Entity): 622 623 ... 623 ... title = f. unicode()624 ... title = f.string() 624 625 ... release_date = f.date() 625 626 ... director = f.entity('Director') 626 ... description = f. memo(required=False)627 ... description = f.string(multiline=True, required=False) 627 628 ... 628 629 ... _key(title) trunk/Schevo/schevo/example/moviereviews/schema/moviereviews_001.py
r3187 r3670 9 9 _hidden = True 10 10 11 name = f. unicode()11 name = f.string() 12 12 data = f.image() 13 13 … … 17 17 class Actor(E.Entity): 18 18 19 name = f. unicode()19 name = f.string() 20 20 21 21 _key(name) … … 28 28 class Director(E.Entity): 29 29 30 name = f. unicode()30 name = f.string() 31 31 32 32 _key(name) … … 35 35 class Movie(E.Entity): 36 36 37 title = f. unicode()37 title = f.string() 38 38 release_date = f.date() 39 39 director = f.entity('Director') 40 description = f. memo(required=False)40 description = f.string(multiline=True, required=False) 41 41 42 42 _key(title) trunk/Schevo/schevo/example/todo/schema/todo_001.py
r3306 r3670 8 8 _hidden = True 9 9 10 name = f. unicode()10 name = f.string() 11 11 data = f.image() 12 12 … … 17 17 """Gender of a person.""" 18 18 19 code = f. unicode()20 name = f. unicode()19 code = f.string() 20 name = f.string() 21 21 22 22 @f.integer(label=u'Person Count') … … 38 38 39 39 done = f.boolean(default=False) 40 name = f. unicode()40 name = f.string() 41 41 topic = f.entity('Topic', required=False) 42 42 priority = f.entity('Priority') 43 43 person = f.entity('Person', required=False) 44 notes = f. memo(required=False)44 notes = f.string(multiline=True, required=False) 45 45 46 46 … … 50 50 _plural = u'People' 51 51 52 name = f. unicode()52 name = f.string() 53 53 gender = f.entity('Gender') 54 54 … … 67 67 68 68 code = f.integer() 69 name = f. unicode()69 name = f.string() 70 70 71 71 @f.integer(label=u'# Open Items') … … 93 93 """Subject area for todo items.""" 94 94 95 name = f. unicode()95 name = f.string() 96 96 97 97 _sample = [ trunk/Schevo/schevo/field.py
r3610 r3670 585 585 586 586 class 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. 591 595 """ 592 596 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 621 class 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 641 class Bytes(Field): 642 """Binary large object field class.""" 643 593 644 data_type = str 594 monospace = False595 645 596 646 def convert(self, value, db=None): … … 603 653 return self._value 604 654 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._name609 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 a617 path to a file or directory.618 619 directory_only: True if only a directory path should be stored in620 the field.621 622 file_only: True if only a file path should be stored in the field.623 """624 625 data_type = str626 directory_only = False627 file_only = False628 629 630 class Unicode(Field):631 """Unicode field class.632 633 monospace: Hint to a UI to display contents using a monospace634 font.635 """636 637 data_type = unicode638 monospace = False639 640 def convert(self, value, db=None):641 """Convert the value to a Unicode string."""642 if value is UNASSIGNED:643 return value644 return unicode(value)645 646 def db_equivalence_value(self, stop_entities):647 return self._value648 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._name653 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 that661 stores a multi-line memo rather than a single-line string.662 """663 664 data_type = unicode665 666 667 # --------------------------------------------------------------------668 669 670 class Blob(Field):671 """Binary large object field class."""672 673 data_type = object674 675 def convert(self, value, db=None):676 """Convert the value to a string."""677 if value is UNASSIGNED:678 return value679 return str(value)680 681 def db_equivalence_value(self, stop_entities):682 return self._value683 684 655 def __str__(self): 685 656 v = self._value … … 697 668 698 669 699 class Image(B lob):670 class Image(Bytes): 700 671 """Image field class.""" 701 672 702 data_type = object673 data_type = str 703 674 704 675 … … 1672 1643 1673 1644 1674 class Password(Unicode): 1675 """Password field class. 1645 class 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 1652 class 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 1665 class Password(String): 1666 """Password field class, deprecated in favor of HashedPassword. 1676 1667 1677 1668 Intended to designate a unicode field as something that stores a 1678 1669 plaintext string, but whose value shouldn't be exposed in a UI. 1679 1670 """ 1680 1681 data_type = unicode1682 1671 1683 1672 _deprecated_class = True … … 1693 1682 def reversible(self, value=None): 1694 1683 return u'' 1684 1685 1686 class 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' 1695 1691 1696 1692 trunk/Schevo/schevo/templates/schevo/+package+/schema/+package+_001.py_tmpl
r3187 r3670 10 10 _hidden = True 11 11 12 name = f. unicode()12 name = f.string() 13 13 data = f.image() 14 14 trunk/Schevo/schevo/test/test_bank.py
r3509 r3670 15 15 16 16 owner = f.entity('Person') 17 name = f. unicode()17 name = f.string() 18 18 balance = f.money() 19 19 overdraft_protection = f.boolean(default=False) # XXX … … 49 49 """Gender of a person.""" 50 50 51 code = f. unicode()52 name = f. unicode()51 code = f.string() 52 name = f.string() 53 53 @f.integer() 54 54 def count(self): … … 62 62 """Bank account owner.""" 63 63 64 name = f. unicode()64 name = f.string() 65 65 gender = f.entity('Gender', required=False) 66 66 trunk/Schevo/schevo/test/test_change.py
r3509 r3670 17 17 class User(E.Entity): 18 18 19 name = f. unicode()19 name = f.string() 20 20 age = f.integer(required=False) 21 21 … … 45 45 46 46 owner = f.entity('Person') 47 name = f. unicode()47 name = f.string() 48 48 balance = f.money() 49 49 overdraft_protection = f.boolean(default=False) # XXX … … 79 79 """Gender of a person.""" 80 80 81 code = f. unicode()82 name = f. unicode()81 code = f.string() 82 name = f.string() 83 83 @f.integer() 84 84 def count(self): … … 92 92 """Bank account owner.""" 93 93 94 name = f. unicode()94 name = f.string() 95 95 gender = f.entity('Gender', required=False) 96 96 trunk/Schevo/schevo/test/test_convert_format.py
r3509 r3670 17 17 class Foo(E.Entity): 18 18 19 name = f. unicode()19 name = f.string() 20 20 21 21 _key(name) … … 148 148 class Foo(E.Entity): 149 149 150 name = f. unicode()150 name = f.string() 151 151 152 152 _key(name) … … 159 159 class Gee(E.Entity): 160 160 161 name = f. unicode()161 name = f.string() 162 162 163 163 _key(name) trunk/Schevo/schevo/test/test_entity_extent.py
r3509 r3670 24 24 realm = f.entity('Realm') 25 25 user = f.entity('User') 26 name = f. unicode()26 name = f.string() 27 27 28 28 _key(user, realm, name) &
