def seed_data(): prxyval = Helper.getconfigvalue('dev.cfg', 'http_proxy', None) if prxyval is not None: prxydict = {'http_proxy': prxyval} else: prxydict = None dburl = Helper.getconfigvalue('dev.cfg', 'DATABASE_URI', None) dbname = Helper.getconfigvalue('dev.cfg', 'DBNAME', None) db = pymongo.MongoClient(dburl)[dbname] emailid = "*****@*****.**" user = User() notobj = user.save(db, emailid, emailid, 'pwd') notobj = user.addcategory(db, emailid, 'fun') notobj = user.addcategory(db, emailid, 'money') notobj = user.addfeed(db, emailid, 'http://raptitude.com/rss', 'fun', prxydict) notobj = user.addfeed(db, emailid, 'http://feeds.feedburner.com/typepad/sethsmainblog', 'fun', prxydict) notobj = user.addfeed(db, emailid, 'http://feeds.feedburner.com/TheInvestorBlog', 'money', prxydict)
def seed_data(): db = pymongo.MongoClient("localhost",27017,safe=True).feedtest emailid = "*****@*****.**" user = User() prxydict = {'http_proxy':'http://www-proxy.au.oracle.com:80'} notobj = user.save(db,emailid,emailid,'pwd') notobj = user.addcategory(db,emailid,'fun') notobj = user.addcategory(db,emailid,'money') notobj = user.addfeed(db,emailid,'http://raptitude.com/rss','fun',prxydict) notobj = user.addfeed(db,emailid,'http://feeds.feedburner.com/typepad/sethsmainblog','fun',prxydict) notobj = user.addfeed(db,emailid,'http://feeds.feedburner.com/TheInvestorBlog','money',prxydict)
def seed_data(): db = pymongo.MongoClient("localhost", 27017, safe=True).feedtest emailid = "*****@*****.**" user = User() prxydict = {'http_proxy': 'http://www-proxy.au.oracle.com:80'} notobj = user.save(db, emailid, emailid, 'pwd') notobj = user.addcategory(db, emailid, 'fun') notobj = user.addcategory(db, emailid, 'money') notobj = user.addfeed(db, emailid, 'http://raptitude.com/rss', 'fun', prxydict) notobj = user.addfeed(db, emailid, 'http://feeds.feedburner.com/typepad/sethsmainblog', 'fun', prxydict) notobj = user.addfeed(db, emailid, 'http://feeds.feedburner.com/TheInvestorBlog', 'money', prxydict)
def seed_data(): prxyval = Helper.getconfigvalue('dev.cfg','http_proxy',None) if prxyval is not None: prxydict = {'http_proxy':prxyval} else: prxydict = None dburl = Helper.getconfigvalue('dev.cfg','DATABASE_URI',None) dbname = Helper.getconfigvalue('dev.cfg','DBNAME',None) db = pymongo.MongoClient(dburl)[dbname] emailid = "*****@*****.**" user = User() notobj = user.save(db,emailid,emailid,'pwd') notobj = user.addcategory(db,emailid,'fun') notobj = user.addcategory(db,emailid,'money') notobj = user.addfeed(db,emailid,'http://raptitude.com/rss','fun',prxydict) notobj = user.addfeed(db,emailid,'http://feeds.feedburner.com/typepad/sethsmainblog','fun',prxydict) notobj = user.addfeed(db,emailid,'http://feeds.feedburner.com/TheInvestorBlog','money',prxydict)
def addcategory(**kwargs): user = User() nobj = user.addcategory(db.connection,kwargs['email'],request.json['category']) return buildresponse(nobj,{'http_status':201})
def addcategory(**kwargs): user = User() nobj = user.addcategory(db.connection, kwargs['email'], request.json['category']) return buildresponse(nobj, {'http_status': 201})