Yann Weber
4c0b8d3279
New graphviz backend + some methods added to some components
9 vuotta sitten
Roland Haroutiounian
efcd7448d2
[EmFieldGroup] pep8+pylint
9 vuotta sitten
ArnAud
34fdd8d8b3
EmType: implement select and unselect _field
9 vuotta sitten
Yann Weber
ed9133016f
Fixing component deletion
9 vuotta sitten
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 vuotta sitten
ArnAud
886cee22df
EmType : subordinates_list and fields_list
9 vuotta sitten
Roland Haroutiounian
3b12b84c9d
[EmFieldGroup] pep8+pylint
9 vuotta sitten
Yann Weber
405dd318dd
Added type check in EmComponent and childs class type check. Added some cast functions to Backend
9 vuotta sitten
Yann Weber
d6af3aaf46
Fixing EmFieldGroup (replacing self._fields access by direct attribute access)
9 vuotta sitten
Yann Weber
b6ef37752f
Supressed _fields from EmComponent and transforming the EmComponent in a standart object with standarts attributes
9 vuotta sitten
Roland Haroutiounian
b668556c3f
[#44 ] Ajout d'un début de méthode check et appel de celle-ci dans le delete
9 vuotta sitten
ArnAud
ee9104fd57
EmType : implement .fields()
comment selected_fields because it clashes with ._fields[]
=> we have to rethink of ._fields[] and fieldtypes
9 vuotta sitten
ArnAud
f72799af24
EmFieldgroups: fields(self, type_id=0) can now filter fields for EmType request
9 vuotta sitten
ArnAud
143134ac52
EmFieldgroups: lint and pep8
9 vuotta sitten
Yann Weber
eb69492363
Deleted comments and bugfix on EmFieldGroup.fields()
9 vuotta sitten
Roland Haroutiounian
9c5fad1b76
[EmFieldGroup] Deactivated the create method (soon to be deleted from the class members)
9 vuotta sitten
Roland Haroutiounian
f449ef8a89
[EmFieldGroup] Changed the delete and init methods
9 vuotta sitten
Roland Haroutiounian
10c516e404
[EmFieldGroup] Changed in the deletion process. Raises a NotEmptyError in case fields are still attached to the fieldgroup
9 vuotta sitten
Roland Haroutiounian
2fc6084c82
[EmFieldGroup] implementation of the EmField objects deletion on a EmFieldGroup deletion process
9 vuotta sitten
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 vuotta sitten
Roland Haroutiounian
06b5786c72
[EmFieldGroup] Modification de la méthode fields + pep8/pylint
9 vuotta sitten
Roland Haroutiounian
74b993fba4
[EmFieldGroup] Modification de la récup des noms de clés dans le dictionnaire components
9 vuotta sitten
Roland Haroutiounian
67707c6734
[EmFieldGroup] Update of the docstrings for the create method
9 vuotta sitten
Roland Haroutiounian
129ba00c41
[EmFieldGroup] Changed the create method of the class
9 vuotta sitten
Roland Haroutiounian
abdb50691a
[EmFieldGroup] Correction du nom d'une classe dans l'init
9 vuotta sitten
Roland Haroutiounian
ac181b4f27
[EmFieldGroup] Ajout du constructeur
9 vuotta sitten
Roland Haroutiounian
912ddc5184
[Fieldgroups] Implémentation de la récupération de la liste des fields d'un fieldgroup à partir de self.components
9 vuotta sitten
Roland Haroutiounian
d50a89ec36
[Fieldgroups] pep8
9 vuotta sitten
Roland Haroutiounian
116795af12
Passage en commentaire du code obsolète
9 vuotta sitten
Roland Haroutiounian
87d4ee3090
Nettoyage de EmFieldGroup
- Suppression des imports obsolètes
- Suppression de la méthode create
9 vuotta sitten
Roland Haroutiounian
79c168587e
[pep8] Correction sur les lignes vides entre les classes et les méthodes
9 vuotta sitten
Yann Weber
889abc8547
Put the database configuration asinstance attribute of EmComponent
9 vuotta sitten
ArnAud
b403aef65b
EmFieldgroups: unecessary comment
9 vuotta sitten
ArnAud
3a281f4261
EmFieldgroups: unused import
9 vuotta sitten
Roland Haroutiounian
bf98e2a121
[TODO] Suppression d'un TODO obsolète dans fieldgroups.py
9 vuotta sitten
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 vuotta sitten
Driky
347a302e85
Correction: ajout de la valeur de ranked_in pour chaque classe 'em_*'
9 vuotta sitten
Roland Haroutiounian
d0d9ef6ecd
[EditorialModel/classtypes.py] PEP8
9 vuotta sitten
ArnAud
e72a162605
EmFieldgroups: use canonical name to refer to a class
+ pep8 and pylint
9 vuotta sitten
Yann Weber
ba40f63a65
Changed the EmType.superiors method to EmType.subordinates
subordinates implementation is note tested
9 vuotta sitten
Yann Weber
ea383eb6b7
Now EmFieldGroup.fields(), EmType.fields() and EmType.field_groups() return instance and not uid
9 vuotta sitten
Yann Weber
5e04b34a92
Implemented EmFieldGroup.fields()
Not tested because of bugs in EmField
9 vuotta sitten
Yann Weber
5dbe064b95
EmType.fields() implementation
Changed comments about EmFieldGroup.fields()
9 vuotta sitten
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 vuotta sitten
Yann Weber
e8a2362d21
Normalize comments for EmFieldGroups
9 vuotta sitten
Yann Weber
e79e583dfd
Bugfix in EmFieldGroup
- Added a _fields property (also added it as class property, but the way its done is not satisfactory... we want an ordered dict and not a tuple list as class property)
- Its now allowed to give an uid or a name as em_class for EmFieldGroup.create(name, em_class).
- Now when EmFieldGroup.create is called with an existing name it raises an error (ValueError)
- Removed EmFieldGroup.populate and EmFieldGroup.save
9 vuotta sitten
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 vuotta sitten
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 vuotta sitten
Yann Weber
9d5f1ac260
SQL isolation in fieldgroups and fields
9 vuotta sitten
ArnAud
22b9dfc4b6
EmFieldGroup: create, save and load. fieldgroups() method for EmClass.
9 vuotta sitten