1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2026-06-22 09:30:48 +02:00

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.
This commit is contained in:
Yann 2015-06-11 12:06:53 +02:00
commit f26e87f621

View file

@ -5,8 +5,8 @@ import sqlalchemy as sql
class SQLSetup(object):
def initDb(self, dbconfname = 'default'):
db = SqlWrapper(read_db = dbconfname, write_db = dbconfname, alchemy_logs=True)
def initDb(self, dbconfname = 'default', alchemy_logs=None):
db = SqlWrapper(read_db = dbconfname, write_db = dbconfname, alchemy_logs=alchemy_logs)
tables = self.get_schema()
db.dropAll()
db.createAllFromConf(tables)