1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2026-06-14 06:20:48 +02:00
Commit graph

15 commits

Author SHA1 Message Date
Yann
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
2015-06-19 12:29:19 +02:00
ArnAud
007a04ca2a EmClass: test of types(), use uid instead of id 2015-06-19 11:33:51 +02:00
ArnAud
98b1dc455f EmClass: import EditorialModel module. use uid instead of id 2015-06-19 11:33:51 +02:00
Yann
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
2015-06-17 17:07:18 +02:00
ArnAud
76da309f4c EM: put data fields in a dict, simplify save() and populate() 2015-06-12 14:09:16 +02:00
Yann
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.
2015-06-11 12:06:53 +02:00
Yann
c94719ed75 Merge branch 'master' of git.labocleo.org:lodel2
Conflicts:
	EditorialModel/classes.py
2015-06-05 16:50:53 +02:00
Yann
f958efbff5 Code factorisation for new UID creation
Added a classmethod EmComponent::newUid() that determines the caller's class and return a newly registrated UID
2015-06-05 16:46:02 +02:00
ArnAud
2f8ca27161 EmClass: create should return a populated object 2015-06-05 16:45:15 +02:00
Yann
c4e1afd192 More SQL isolation and some little bugfixes 2015-06-05 16:19:48 +02:00
Yann
46a4686944 SQL isolation in classes and components
SQL calls are in _populateDb , _saveDb and _createDb methods (exception for component::delete() )
2015-06-05 14:32:51 +02:00
ArnAud
22b9dfc4b6 EmFieldGroup: create, save and load. fieldgroups() method for EmClass. 2015-06-04 16:02:50 +02:00
ArnAud
9479e4483b EmClass: implement types() method 2015-06-04 14:10:06 +02:00
ArnAud
a17d889d3f EmClass : create, save and load 2015-06-04 11:41:12 +02:00
ArnAud
a86ff9ee97 ME : renommage et import 2015-05-29 17:09:10 +02:00
Renamed from EditorialModel/class.py (Browse further)