Driky
c3560d3feb
Correction sur Component pour passer get_max_rank en classmethod
9 years ago
Driky
3b97054d3b
Petite correction sur le rank initial
9 years ago
Yann Weber
4fb2f789b5
Replacing EmComponent method getDbE by db_engine
9 years ago
Yann Weber
e87fa84eac
Updating some comments and changing getDbE method name
Maintaining an alias for the new EmComponent.db_engine
9 years ago
ArnAud
c95b37df12
EmComponent: pep8 et pylint
9 years ago
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)
9 years ago
Driky
91ea809d5b
Correction de Component.modify_rank()
Passe tous les tests
9 years ago
Driky
39c63f8ee3
Correction des cas sign = + ou - sur modify rank et creation de get_max_rank()
9 years ago
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
9 years ago
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, +=, -=, *=, /=, +, -, *, /, %, ...)
9 years ago
Yann Weber
690b68d714
Small bugfix in components.py
9 years ago
Yann Weber
ff72825720
Normalize comments for components.py
9 years ago
ArnAud
ac6a2883f2
EmComponents: close db connexion after fetching (sqlite issue)
9 years ago
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
9 years ago
Driky
615bfc5a81
EM Component.py Commentaire
Correction du bloc de mcommentaire de class encore sous l'ancien modèle.
9 years ago
Driky
a611b08e37
EM Component.py modify_rank
remplacement des self.id restant par self.uid
9 years ago
Yann Weber
7e8414c162
Close ticket #29 and bugfix
Now EmComponent is populate if it's instanciated with a name or an id
9 years ago
Driky
7fc1260ffc
Mr correction is here
9 years ago
ArnAud
76da309f4c
EM: put data fields in a dict, simplify save() and populate()
9 years ago
Driky
64fd3317a6
Correction #13542113
9 years ago
Driky
0c5301a235
Super corrector a la rescousse
9 years ago
Driky
8e501346c5
Correction plz!
9 years ago
Driky
3c85c90fe1
Correction once again
9 years ago
Driky
e9c7b5ebf4
Correction :-(
9 years ago
Driky
f4c195f44c
Correction again
9 years ago
Driky
48f286cf30
Correction encoooore
9 years ago
Driky
d5baff9249
Encore des correction
9 years ago
Driky
f93e226b66
Component.modify_ran() correction
Pass the value of ranked_in instaed of the column name.
9 years ago
Driky
79268ca418
Component.new_rank() correction
same as precedent
9 years ago
Driky
350d15cba9
Component.new_rank() correction
test si new_rank - 1 existe pour signe '='
9 years ago
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.
9 years ago
Driky
2e1fb44d26
Component.new_rank() correction
En plus de modifié la valeur en base, modifie la valeur d'instance.
9 years ago
Driky
0090e2551d
Correction Component.new_rank()
Prise en compte du nom de la collonne indiqué par ranked_in
9 years ago
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.
9 years ago
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.
9 years ago
ArnAud
aa4c3e87a2
EmComponent: initialiser la requête
9 years ago
ArnAud
a79e9b2991
EmComponent: tester le type de self, pas l'instance
9 years ago
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
9 years ago
Yann Weber
c4e1afd192
More SQL isolation and some little bugfixes
9 years ago
Yann Weber
46a4686944
SQL isolation in classes and components
SQL calls are in _populateDb , _saveDb and _createDb methods (exception for component::delete() )
9 years ago
ArnAud
462b6f3bbb
EM component: uid not id + make sure it is an integer
9 years ago
ArnAud
a17d889d3f
EmClass : create, save and load
9 years ago
Yann Weber
9896c16e8e
Small bugfixes in sqlobject and sqlwrapper
9 years ago
ArnAud
a86ff9ee97
ME : renommage et import
9 years ago
ArnAud
61e472e16e
ME: no sub-directory
9 years ago
Yann Weber
c7defe71e0
Added tests for sqlwrapper
Removed logging test in EditorialModel/lib/component.py
Added comment in Database/sqlwrapper.py
9 years ago
Yann Weber
ebdb512500
Modification to be less dependent to django + logging in db wrapper
9 years ago
Yann Weber
18c497a27b
Fixing tests name to actually make them run
Test functions name as tests files name must begin with test in order to be run by manage.py test
9 years ago
Yann Weber
eeaaf945d2
Created the class MlString and fixing syntax error
Created the class Lodel.utils.mlstring.MlString needed by EditorialModel.lib.component.EmComponent
The first test pass ! =)
9 years ago
Yann Weber
8f2a3655bb
Renaming and moving files + fixed a bug in Lodel.settings imports
Lodel/sttings/__init__.py wasn't able to import files when called by manage.py
Renaming em to EditorialModel and moved Em* objects to EditorialModel/lib
Adding a first test (that do not pass because of syntax errors in Em* classes)
9 years ago