Yann Weber
cd37b0129f
Better comments for set_rank method
il y a 9 ans
Yann Weber
d7d4a989f1
TODO on EmComponent
il y a 9 ans
Roland Haroutiounian
b03958a65a
Suppression de sqlutils.getEngine au profit de sqlutils.get_engine
il y a 9 ans
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
il y a 9 ans
Yann Weber
f41d164603
Added test for EmComponent.get_max_rank(), replacing the default value for rank by the one processed by get_max_rank
il y a 9 ans
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
il y a 9 ans
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
il y a 9 ans
Driky
347a302e85
Correction: ajout de la valeur de ranked_in pour chaque classe 'em_*'
il y a 9 ans
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
il y a 9 ans
Roland Haroutiounian
43bb085667
[EmField] Modification AddColumn + test ranked_in dans Components repassé temporairement à -1
il y a 9 ans
Driky
847509590a
Correction de Component. cl -> cls
il y a 9 ans
Driky
c3560d3feb
Correction sur Component pour passer get_max_rank en classmethod
il y a 9 ans
Driky
3b97054d3b
Petite correction sur le rank initial
il y a 9 ans
Yann Weber
4fb2f789b5
Replacing EmComponent method getDbE by db_engine
il y a 9 ans
Yann Weber
e87fa84eac
Updating some comments and changing getDbE method name
Maintaining an alias for the new EmComponent.db_engine
il y a 9 ans
ArnAud
c95b37df12
EmComponent: pep8 et pylint
il y a 9 ans
Yann Weber
a042306c14
Delete implementation for EmClass and EmField
The EmField version cannot be tested yet (drop column not yet implemented for sqlite in Database.sqlalter)
il y a 9 ans
Driky
91ea809d5b
Correction de Component.modify_rank()
Passe tous les tests
il y a 9 ans
Driky
39c63f8ee3
Correction des cas sign = + ou - sur modify rank et creation de get_max_rank()
il y a 9 ans
Yann Weber
00614d90e9
New way to specify _fields and table in EmComponent's child classes
Now _fields and table MUST be class attribute.
Its important to note that _fields now consist in a list of (name, ftype) tuples and that ftype is a EmFieldType class and NOT an EmFieldType instance
il y a 9 ans
Yann Weber
80e82073fc
Bugfixes on EmComponent
- Now except for the modify_rank tests test_component didn't fails
- Added simple integer operation capabilities to EmFieldType_integer ( int cast, +=, -=, *=, /=, +, -, *, /, %, ...)
il y a 9 ans
Yann Weber
690b68d714
Small bugfix in components.py
il y a 9 ans
Yann Weber
ff72825720
Normalize comments for components.py
il y a 9 ans
ArnAud
ac6a2883f2
EmComponents: close db connexion after fetching (sqlite issue)
il y a 9 ans
Yann Weber
97c6b41e88
Close #31
EmComponent.create() now takes keywords arguments corresponding to the _fields property of the calling class
WARNING !!! Hardcoded rank = -1 at component creation and Hardcoded 0 as default value for EmClass icon
il y a 9 ans
Driky
615bfc5a81
EM Component.py Commentaire
Correction du bloc de mcommentaire de class encore sous l'ancien modèle.
il y a 9 ans
Driky
a611b08e37
EM Component.py modify_rank
remplacement des self.id restant par self.uid
il y a 9 ans
Yann Weber
7e8414c162
Close ticket #29 and bugfix
Now EmComponent is populate if it's instanciated with a name or an id
il y a 9 ans
Driky
7fc1260ffc
Mr correction is here
il y a 9 ans
ArnAud
76da309f4c
EM: put data fields in a dict, simplify save() and populate()
il y a 9 ans
Driky
64fd3317a6
Correction #13542113
il y a 9 ans
Driky
0c5301a235
Super corrector a la rescousse
il y a 9 ans
Driky
8e501346c5
Correction plz!
il y a 9 ans
Driky
3c85c90fe1
Correction once again
il y a 9 ans
Driky
e9c7b5ebf4
Correction :-(
il y a 9 ans
Driky
f4c195f44c
Correction again
il y a 9 ans
Driky
48f286cf30
Correction encoooore
il y a 9 ans
Driky
d5baff9249
Encore des correction
il y a 9 ans
Driky
f93e226b66
Component.modify_ran() correction
Pass the value of ranked_in instaed of the column name.
il y a 9 ans
Driky
79268ca418
Component.new_rank() correction
same as precedent
il y a 9 ans
Driky
350d15cba9
Component.new_rank() correction
test si new_rank - 1 existe pour signe '='
il y a 9 ans
Driky
0bdf755be4
Component.new_rank() correction
En cas de signe égale prend désormais en charge une valeur de new_rank superieur ou inferieur a la valeur actuelle.
il y a 9 ans
Driky
2e1fb44d26
Component.new_rank() correction
En plus de modifié la valeur en base, modifie la valeur d'instance.
il y a 9 ans
Driky
0090e2551d
Correction Component.new_rank()
Prise en compte du nom de la collonne indiqué par ranked_in
il y a 9 ans
Driky
2fcd8c7448
Implementation de new_rank()
Fonction new_rank dans component. Permet la modification d'un rank tout en gardant la collection de component valide.
il y a 9 ans
Yann Weber
c100dd43f3
Adding default date for date_create and date_update columns
The dates are set in EmComponent::create() for date_create and in EmComponent::save() for date_update
The values are sets to datetime.datetime.utcnow() so we now that EVERY date in the db are in UTC, no matter django, database or even server configurations.
We will have to take care to convert dates from database to django timezone in dates fieldtypes.
il y a 9 ans
ArnAud
aa4c3e87a2
EmComponent: initialiser la requête
il y a 9 ans
ArnAud
a79e9b2991
EmComponent: tester le type de self, pas l'instance
il y a 9 ans
Yann Weber
f958efbff5
Code factorisation for new UID creation
Added a classmethod EmComponent::newUid() that determines the caller's class and return a newly registrated UID
il y a 9 ans
Yann Weber
c4e1afd192
More SQL isolation and some little bugfixes
il y a 9 ans