Yann Weber
10379c6a95
Fieldgroups are deleted
9 years ago
Yann Weber
36ffdfdf0c
Some bugfix in components.max_rank model.create_component in the random em generator and in the file fieldtype
9 years ago
Yann Weber
1c4e2ddba8
Some Doxygen comments fix
9 years ago
Roland Haroutiounian
8058785023
PEP8/Pylint on components.py
9 years ago
Yann Weber
2dc226c65a
Fixed a bug in set_rank()
When the list is empty new_rank is > get_max_rank, because get_max_rank returns -1
9 years ago
Yann Weber
58837a0ed4
Fix modify_rank and associated tests
Now modify_rank don't raise anymore when too big/small modifier is given but do its best to make a valid modification
The modify_rank tests (and the __hash__ __cmp__ tests) has been modified to fit this new behavior
9 years ago
Yann Weber
6fa5a2a7f6
Reimplementation of get_max_rank for EmComponent + little correction in hash test
9 years ago
ArnAud
9cc01fec46
EmComponent : lint + pep8
9 years ago
ArnAud
4d1e687065
EmComponent : introduce attr_flat => reusable flattened attribut list of a component
9 years ago
ArnAud
5f0f5dd3bf
EmComponent: convert attr_dump attribut to a method
9 years ago
ArnAud
90fcecd015
EmComponent: make the __hash__ function always return the same hash !
9 years ago
Roland Haroutiounian
e4dfc1bb7a
[#49 ] Changes made in the unit tests for test_model
9 years ago
Yann Weber
3109cc72bd
Deleted deprecated methos new_uid from EmComponent
9 years ago
Roland Haroutiounian
88d79a0a22
[#49 ] added an existence test for the "model" property in EmComponent.dumps()
9 years ago
Roland Haroutiounian
f1a264ac59
[#49 ] Removed the string casting in attr_dump
9 years ago
ArnAud
9131f7bcd2
EmField: type attribute is now called fieldtype
9 years ago
Roland Haroutiounian
f0c760fdb0
[#49 ] Took off the "model" property from the component dump
9 years ago
Roland Haroutiounian
e6de8b7a8b
[#49 ] Changed the value format used for the component in its attr_dump method
9 years ago
Yann Weber
18695e3a72
Implement the BackendJson save method
9 years ago
Yann Weber
d199d571bd
Cleaning & commenting + adding warning
9 years ago
Yann Weber
aa6e01bff0
Dirty comit of a djago MH that "works"
Code cleaning, commenting etc needed...
9 years ago
Yann Weber
17c1eba918
Solved a bug about checking ranks and getting max rank
9 years ago
Yann Weber
46dfe3a7ba
Added a new @property to EmComponent uniq_name
9 years ago
ArnAud
5fb9c8b7b6
EmComponent: get_max_rank() should return an int
9 years ago
Yann Weber
e530211a1e
Comments update
9 years ago
Yann Weber
0901c29a33
Bugfix on EmComponent.check()
9 years ago
Yann Weber
d2f6509397
Checking type of model argument (without importing Model)
The check is done on the __class__.__name__ attr of model argument (maybe not a good solution ?)
9 years ago
Roland Haroutiounian
113deb302d
[EmComponent] added a test to not take uids into account in the hash computation process
9 years ago
Roland Haroutiounian
0bf24b6c48
[#45 ] Changed the return of the hash methods, we get integer instead of string
9 years ago
Yann Weber
084b8af6c1
MigrationHandler enhancement (now records Model's hash for each changes). Better beaviour of Model.create_component if MigrationHandler raises
9 years ago
Roland Haroutiounian
8a6fdd4c6a
[#45 ] Added the __hash__ method implementation for the Model class
9 years ago
Roland Haroutiounian
c916801c99
[#45 ] Changed the __hash__ implementation of the EmComponent class
9 years ago
Yann Weber
ed9133016f
Fixing component deletion
9 years ago
Yann Weber
fe9184f608
Reimplementig EmComponent::__setattr__ to call migration handler
Addding a method to indicate the end of a component initialisation phase (used in Model.load and Model.create_component)
Adding a method that dump component attributes (used in Model.create_component and Model.delete_component to call the migration_handler)
9 years ago
Yann Weber
195cca24a4
Implementing check methods for each EmComponent child (and EmComponent)
No extended checks was done. Only tested if the check passes without syntax error and without failing with no reason
9 years ago
Yann Weber
405dd318dd
Added type check in EmComponent and childs class type check. Added some cast functions to Backend
9 years ago
Yann Weber
b6ef37752f
Supressed _fields from EmComponent and transforming the EmComponent in a standart object with standarts attributes
9 years ago
Yann Weber
a2529cf8eb
Added a check method to EmComponent and EmClass
EmComponent::check() always return True but rearrange ranks if they are not continuous
9 years ago
Yann Weber
8bf864c597
Handling rank sorting in Model and rank modifier in EmComponent
9 years ago
ArnAud
4803eba6a7
EmComponent: access to model is now named model !!
9 years ago
Yann Weber
b87c276b26
Now EmComponents gets a Model instance when instanciate, and the Model._components dict structure has change a bit
Model._components now contains only one dict ( 'uids' key ) and the others are now list of EmComponent instances
Model now handle EVERY access to the _components dict
9 years ago
Yann Weber
6a56b31ba5
Migrating EmClass methods and EmComponent.delete according to the new Model object, changed the Model.components dict keys (and the json test file)
There is now two methods Model.name_from_emclass and emclass_from_name that allows to access the Model.components array
9 years ago
ArnAud
79336030c7
EM: store in each component a reference to the list of the other
9 years ago
ArnAud
c73251795c
EM: first draft for a Model Class
9 years ago
ArnAud
1d2c069fb8
EmComponent: get rid of database functions
9 years ago
Roland Haroutiounian
79c168587e
[pep8] Correction sur les lignes vides entre les classes et les méthodes
9 years ago
Yann Weber
889abc8547
Put the database configuration asinstance attribute of EmComponent
9 years ago
Yann Weber
cd37b0129f
Better comments for set_rank method
9 years ago
Yann Weber
d7d4a989f1
TODO on EmComponent
9 years ago
Roland Haroutiounian
b03958a65a
Suppression de sqlutils.getEngine au profit de sqlutils.get_engine
9 years ago