('When',lambda x: datetime.datetime.strptime(x.split('.')[0], '%Y-%m-%d %H:%M:%S')),
Причем миллисекунды - отсекаются. Т.к. питон 2.5 их не знает...
Личный блог Фунтикова Виталия. Full stack developer
('When',lambda x: datetime.datetime.strptime(x.split('.')[0], '%Y-%m-%d %H:%M:%S')),
class Organization_Shop(db.Model):
Id=db.StringProperty()
Name=db.StringProperty()
Deleted=db.BooleanProperty()
class Organization_Shop_Loader(Loader):
def __init__(self):
Loader.__init__(
self,
'Organization_Shop',
[('Id',str),
('Name',lambda x: unicode(x, 'utf-8')),
('Deleted',bool)]
)
application: fun-test version: 2 runtime: python api_version: 1 handlers: - url: /remote_api script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py login: admin - url: /.* script: main.py
# coding=UTF-8
import datetime
from google.appengine.ext import db
class Test(db.Model):
Name=db.StringProperty()
LastName=db.StringProperty()
class TestLoader(Loader):
def __init__(self):
Loader.__init__(
self,
'Test',
[('Name',str),
('LastName',str)]
)
loaders = [TestLoader]
Jonny, Lee Carl,Donny Nick,Cookie
C:\Program Files\Google>c:\Python25\python.exe google_appengine/bulkloader.py --filename=testapp/d.csv --kind=Test --url=http://localhost:8080/remote_api --config_file=testapp/uploader.py --app_id=fun-test