Roland Haroutiounian
ccf36dfe8b
[EditorialModel - classes] pep8+pylint on classes.py
9 jaren geleden
Yann Weber
ed9133016f
Fixing component deletion
9 jaren geleden
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 jaren geleden
Yann Weber
99ee79b894
Removed the class attribute _fields from EmClass
9 jaren geleden
Roland Haroutiounian
30bbd91f2c
[EmClass] pep8+pylint
9 jaren geleden
Yann Weber
405dd318dd
Added type check in EmComponent and childs class type check. Added some cast functions to Backend
9 jaren geleden
Yann Weber
b6ef37752f
Supressed _fields from EmComponent and transforming the EmComponent in a standart object with standarts attributes
9 jaren geleden
Roland Haroutiounian
77f91bc68b
[#44 ] EmClass: added the call to the check method in the delete process
9 jaren geleden
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 jaren geleden
Yann Weber
db62afb2a1
Updated EmClass to match the new Model
9 jaren geleden
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 jaren geleden
Roland Haroutiounian
ca65d11a5a
pep8 sur classes.py
9 jaren geleden
Roland Haroutiounian
6c6fcea755
[EmClass] Modification de l'appel dans le delete (on appelle celui du parent)
9 jaren geleden
Roland Haroutiounian
f3e05e760d
[EmClass] Correction sur le nom de la classe dans l'appel vers super.create()
9 jaren geleden
Roland Haroutiounian
f2572808d2
Modification du create dans EmClass pour appeler le create de EmComponent
9 jaren geleden
Roland Haroutiounian
116795af12
Passage en commentaire du code obsolète
9 jaren geleden
Roland Haroutiounian
4f63f1c6d8
Suppression d'imports obsolètes dans EmClass
9 jaren geleden
Roland Haroutiounian
1918b18779
Nettoyage de EmClass
- Suppression des méthodes SQL
9 jaren geleden
Roland Haroutiounian
79c168587e
[pep8] Correction sur les lignes vides entre les classes et les méthodes
9 jaren geleden
Yann Weber
889abc8547
Put the database configuration asinstance attribute of EmComponent
9 jaren geleden
ArnAud
89d9cb62cf
EmClass: delete unused variable
9 jaren geleden
ArnAud
3c13e658a3
EmClass: delete unused import
9 jaren geleden
ArnAud
acce76c48b
EmClass: better documentation of linkedtype
9 jaren geleden
Yann Weber
47ce122e93
Changed icon field to EmField_icon in EmClass and EmField. Added sortcolumn argument for EmType and EmClass.
9 jaren geleden
Roland Haroutiounian
76c97bf1f3
[TODO] Suppression du TODO dans classes sur la vérification du class_type dans EmClass
Cette vérification est prise en charge dans EmComponent
9 jaren geleden
Yann Weber
d7d4a989f1
TODO on EmComponent
9 jaren geleden
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 jaren geleden
Driky
347a302e85
Correction: ajout de la valeur de ranked_in pour chaque classe 'em_*'
9 jaren geleden
Yann Weber
a23fd3dbfc
Bugfix on EmClass and EmType so every tests pass
Every tests passes, except the skipped tests on relation_to_type links
There is a strange warning that comes maby from some tests (but maybe not)...
9 jaren geleden
Roland Haroutiounian
744a9fdda2
[EditorialModel/classes.py] Passage au db_engine()
9 jaren geleden
Roland Haroutiounian
501ee8f0ea
PEP8
9 jaren geleden
Roland Haroutiounian
6db8376afb
Nettoyage du code de EmField
9 jaren geleden
Roland Haroutiounian
9f993c4b42
Résolution d'un conflit
9 jaren geleden
Yann Weber
503ecd570b
Some tests dont pass, but most of them does
9 jaren geleden
Roland Haroutiounian
e6783b4580
[#15 ] Implémentation de la méthode linked_types pour EmClass
9 jaren geleden
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 jaren geleden
ArnAud
fcbf952d6d
EmClass: pylint and pep8
ignoring:
- line too long
- doctring
9 jaren geleden
ArnAud
8844aba318
EmClass: creation on linked types table
9 jaren geleden
ArnAud
958c9a9191
EmClasses: implementation of EmClass.fields()
9 jaren geleden
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 jaren geleden
ArnAud
007a04ca2a
EmClass: test of types(), use uid instead of id
9 jaren geleden
ArnAud
98b1dc455f
EmClass: import EditorialModel module. use uid instead of id
9 jaren geleden
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 jaren geleden
ArnAud
76da309f4c
EM: put data fields in a dict, simplify save() and populate()
9 jaren geleden
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 jaren geleden
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 jaren geleden
ArnAud
2f8ca27161
EmClass: create should return a populated object
9 jaren geleden
Yann Weber
c4e1afd192
More SQL isolation and some little bugfixes
9 jaren geleden
Yann Weber
46a4686944
SQL isolation in classes and components
SQL calls are in _populateDb , _saveDb and _createDb methods (exception for component::delete() )
9 jaren geleden
ArnAud
22b9dfc4b6
EmFieldGroup: create, save and load. fieldgroups() method for EmClass.
9 jaren geleden