i m using the following code to upload data.
from google.appengine.tools import bulkloader
from google.appengine.ext import db
import datetime
class DbaV2(db.Model):
Symbol=db.StringProperty()
Series=db.StringProperty()
Date=db.StringProperty()
Pre_close=db.StringProperty()
Op_pr=db.StringProperty()
Hi_pr=db.StringProperty()
lo_pr=db.StringProperty()
las_pr=db.StringProperty()
Clo_pr=db.StringProperty()
To_tr_quan=db.StringProperty()
turn_ovr_lac=db.StringProperty()
blank=db.StringProperty()
class DbaV2Loader(bulkloader.Loader):
def __init__(self):
bulkloader.Loader.__init__(self, 'DbaV2',
[('Symbol', str),
('Series', str),
('Op_pr', str),
('Hi_pr', str),
('lo_pr', str),
('Clo_pr', str),
('las_pr', str),
('Pre_close', str),
('To_tr_quan', str),
('turn_ovr_lac', str),
('Date', str),
('blank',str)
])
loaders=[DbaV2Loader]
this works fine...but now i need a id to prevent data replication i
want the id to comprise of 'Symbol'+Series+'date' what changes do i
need to make to my code?
in the bulkupload i was using
def GenerateKey(self, i, values):
a="P"
b=str(values[0])
c=str(values[10])
d=str(values[1])
c=a+b+d+c
return c
and it was working fine... need urgent help
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---