Roland Haroutiounian
88d79a0a22
[#49 ] added an existence test for the "model" property in EmComponent.dumps()
9 lat temu
Roland Haroutiounian
f1a264ac59
[#49 ] Removed the string casting in attr_dump
9 lat temu
ArnAud
9131f7bcd2
EmField: type attribute is now called fieldtype
9 lat temu
Roland Haroutiounian
f0c760fdb0
[#49 ] Took off the "model" property from the component dump
9 lat temu
Roland Haroutiounian
e6de8b7a8b
[#49 ] Changed the value format used for the component in its attr_dump method
9 lat temu
Yann Weber
18695e3a72
Implement the BackendJson save method
9 lat temu
Yann Weber
d199d571bd
Cleaning & commenting + adding warning
9 lat temu
Yann Weber
aa6e01bff0
Dirty comit of a djago MH that "works"
Code cleaning, commenting etc needed...
9 lat temu
Yann Weber
17c1eba918
Solved a bug about checking ranks and getting max rank
9 lat temu
Yann Weber
46dfe3a7ba
Added a new @property to EmComponent uniq_name
9 lat temu
ArnAud
5fb9c8b7b6
EmComponent: get_max_rank() should return an int
9 lat temu
Yann Weber
e530211a1e
Comments update
9 lat temu
Yann Weber
0901c29a33
Bugfix on EmComponent.check()
9 lat temu
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 lat temu
Roland Haroutiounian
113deb302d
[EmComponent] added a test to not take uids into account in the hash computation process
9 lat temu
Roland Haroutiounian
0bf24b6c48
[#45 ] Changed the return of the hash methods, we get integer instead of string
9 lat temu
Yann Weber
084b8af6c1
MigrationHandler enhancement (now records Model's hash for each changes). Better beaviour of Model.create_component if MigrationHandler raises
9 lat temu
Roland Haroutiounian
8a6fdd4c6a
[#45 ] Added the __hash__ method implementation for the Model class
9 lat temu
Roland Haroutiounian
c916801c99
[#45 ] Changed the __hash__ implementation of the EmComponent class
9 lat temu
Yann Weber
ed9133016f
Fixing component deletion
9 lat temu
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 lat temu
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 lat temu
Yann Weber
405dd318dd
Added type check in EmComponent and childs class type check. Added some cast functions to Backend
9 lat temu
Yann Weber
b6ef37752f
Supressed _fields from EmComponent and transforming the EmComponent in a standart object with standarts attributes
9 lat temu
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 lat temu
Yann Weber
8bf864c597
Handling rank sorting in Model and rank modifier in EmComponent
9 lat temu
ArnAud
4803eba6a7
EmComponent: access to model is now named model !!
9 lat temu
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 lat temu
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 lat temu
ArnAud
79336030c7
EM: store in each component a reference to the list of the other
9 lat temu
ArnAud
c73251795c
EM: first draft for a Model Class
9 lat temu
ArnAud
1d2c069fb8
EmComponent: get rid of database functions
9 lat temu
Roland Haroutiounian
79c168587e
[pep8] Correction sur les lignes vides entre les classes et les méthodes
9 lat temu
Yann Weber
889abc8547
Put the database configuration asinstance attribute of EmComponent
9 lat temu
Yann Weber
cd37b0129f
Better comments for set_rank method
9 lat temu
Yann Weber
d7d4a989f1
TODO on EmComponent
9 lat temu
Roland Haroutiounian
b03958a65a
Suppression de sqlutils.getEngine au profit de sqlutils.get_engine
9 lat temu
Yann Weber
49dfe9ad03
Code factorization on EmComponent.modify_rank()
Changed beahvior : when a 'non-change' is asked (like +0 -0 or set ranke to actual rank) don't raise an Error
9 lat temu
Yann Weber
f41d164603
Added test for EmComponent.get_max_rank(), replacing the default value for rank by the one processed by get_max_rank
9 lat temu
Yann Weber
6af0b45f3f
Code factorization on EmType select and unselect fields. Added comparison capabilities to EmComponent (and childs)
Implemented __hash__ and __eq__ for EmComponent (based on class name and uid) to test equality betwenn two instance. Allows to use "instance in instance_list" syntax
9 lat temu
Yann Weber
27d178e531
Code factorization and create methods for EmComponent and childs changes
Behaviour changed for EmComponent and childs create method :
- Takes care of duplicated names at creation
- Handle all the checks in EmComponent method
Factorization of EmField.get_class_table() method
Added a @property method class_table_name to EmClass
9 lat temu
Driky
347a302e85
Correction: ajout de la valeur de ranked_in pour chaque classe 'em_*'
9 lat temu
Yann Weber
a3b9daf319
sqlwrapper deletion and sqlsetup enhancement
Moved the database initialisation functionnality to sqlsetup and fixed all the code to handle the sqlwrapper deletion
9 lat temu
Roland Haroutiounian
43bb085667
[EmField] Modification AddColumn + test ranked_in dans Components repassé temporairement à -1
9 lat temu
Driky
847509590a
Correction de Component. cl -> cls
9 lat temu
Driky
c3560d3feb
Correction sur Component pour passer get_max_rank en classmethod
9 lat temu
Driky
3b97054d3b
Petite correction sur le rank initial
9 lat temu
Yann Weber
4fb2f789b5
Replacing EmComponent method getDbE by db_engine
9 lat temu
Yann Weber
e87fa84eac
Updating some comments and changing getDbE method name
Maintaining an alias for the new EmComponent.db_engine
9 lat temu
ArnAud
c95b37df12
EmComponent: pep8 et pylint
10 lat temu