256 def post(self):
257 upload_files = self.request.POST.multi.__dict__['_items']
258 version = self.request.
get(
'version')
259 logging.info('files: %r' % upload_files)
260 for data in upload_files:
261 if data[0] != 'files': continue
262 file = data[1]
263 logging.info('upload feed: %r' % file.filename)
264
265 data = json.loads(file.value)
266
267 feedId = file.filename
268 feed = Feed.get_or_insert(feedId)
269
270
271 sectionTitle = data['section']
273 if section != None:
274 if feed.key() in section.feeds:
275 logging.warning('Already contains feed %s, replacing' % feedId)
276 section.feeds.remove(feed.key())
277
278
279 section.feeds.insert(0, feed.key())
280 section.put()
281
282
284
285 else:
286 logging.error('Could not find section %s to add the feed to' %
287 sectionTitle)
288
289 self.redirect('/')
290
291
292
def findSectionByTitle(title)
def collectFeed(feed, data, continuation=None)
const myers::Point & get(const myers::Segment &)