430 user = users.get_current_user()
431 prefs = UserData.get_or_insert(user.user_id())
432
433 sections = []
434 for i in range(3):
435 s1 = Section.get_or_insert('Test%d' % i)
436 s1.title = 'Section %d' % (i + 1)
437
438 feeds = []
439 for j in range(4):
440 label = '%d_%d' % (i, j)
441 f1 = Feed.get_or_insert('Test%s' % label)
442 f1.title = 'Feed %s' % label
444 f1.lastUpdated = 0
445 f1.put()
446 feeds.append(f1.key())
447
448 for k in range(8):
449 label = '%d_%d_%d' % (i, j, k)
450 a1 = Article.get_or_insert('Test%s' % label)
451 if a1.title is None:
452 a1.feed = f1
453 a1.title = 'Article %s' % label
454 a1.author = 'anon'
455 a1.content = 'Lorem ipsum something or other...'
456 a1.snippet = 'Lorem ipsum something or other...'
457 a1.thumbnail = None
458 a1.srcurl = ''
459 a1.date = 0
460
461 s1.feeds = feeds
462 s1.put()
463 sections.append(s1.key())
464
465 prefs.sections = sections
466 prefs.put()
467
468 self.redirect('/')
469
470
const myers::Point & get(const myers::Segment &)