Rewrite seeding of program timelines.

The past timeline created weird conflicts and was not actually
representative of the flow of a program. They also caused the timeline
widget to render odd values, which has been fixed. If overlapping dates
are needed then they can be easily changed in seed_db or just modified
manually in the program admin dashboard.
diff --git a/app/soc/models/seed_db.py b/app/soc/models/seed_db.py
index 0ceb60e..b68d60c 100644
--- a/app/soc/models/seed_db.py
+++ b/app/soc/models/seed_db.py
@@ -113,26 +113,42 @@
   google = Sponsor(**group_properties)
   google.put()
 
+  # The seeded dates are more or less arbitrary, but are set up in such
+  # a way as to establish a reasonable default timeline. Dates should
+  # begin on the same day as the previous period's ending so that no
+  # gaps are created. Note that the timeline will rotate throughout the
+  # year since it starts relative to the current time, but this can
+  # changed by either changing the assignment of now or manually
+  # through the program admin page.
   now = datetime.datetime.now()
-  before = now - datetime.timedelta(365)
-  after = now + datetime.timedelta(365)
-  past_before = before - datetime.timedelta(2 * 365)
-  past_after = after - datetime.timedelta(2 * 365)
+  week = datetime.timedelta(days=7)
+  month = datetime.timedelta(days=30)
 
   timeline_properties = {
       'key_name': 'google/gsoc2014',
       'link_id': 'gsoc2014',
       'scope': google,
-      'program_start': before,
-      'program_end': after,
-      'accepted_organization_announced_deadline': before,
-      'accepted_students_announced_deadline' : after,
-      'student_signup_start': before,
-      'student_signup_end': after,
-      'application_review_deadline': after,
-      'student_application_matched_deadline': after,
-      'accepted_students_announced_deadline': after,
-      'form_submission_start': before,
+      # Org application period.
+      'program_start': now,
+      'accepted_organization_announced_deadline': now + week,
+      # Student application period; ~14 days.
+      'student_signup_start': now + week,
+      'student_signup_end': now + (week * 2),
+      'application_review_deadline': now + month,
+      # Community bonding period; ~30 days.
+      'accepted_students_announced_deadline' : now + month,
+      'student_application_matched_deadline': now + month,
+      'form_submission_start': now + month,
+      'bonding_start' : now + month,
+      'bonding_end' : now + (month * 2),
+      # Coding period; ~60 days.
+      'coding_start' : now + (month * 2),
+      'coding_end' : now + (month * 4),
+      # Mentor summit; 2 days, past the end of the coding period.
+      'mentor_summit_start' : now + (month * 4),
+      'mentor_summit_end' : now + (month * 4) + datetime.timedelta(2),
+      # Remainder of the offseason.
+      'program_end': now + (month * 4) + datetime.timedelta(3),
   }
   gsoc2014_timeline = GSoCTimeline(**timeline_properties)
   gsoc2014_timeline.put()
@@ -154,20 +170,34 @@
   gsoc2014 = GSoCProgram(**program_properties)
   gsoc2014.put()
 
-  timeline_properties.update({
+  past = now - datetime.timedelta(365 * 4)
+
+  timeline_properties = {
       'key_name': 'google/gsoc2010',
       'link_id': 'gsoc2010',
-      'program_start': past_before,
-      'program_end': past_after,
-      'accepted_organization_announced_deadline': past_before,
-      'accepted_students_announced_deadline' : past_after,
-      'student_signup_start': past_before,
-      'student_signup_end': past_after,
-      'application_review_deadline': past_after,
-      'student_application_matched_deadline': past_after,
-      'accepted_students_announced_deadline': past_after,
-      'form_submission_start': past_before,
-  })
+      'scope': google,
+      # Org application period.
+      'program_start': past,
+      'accepted_organization_announced_deadline': past + week,
+      # Student application period; ~20 days.
+      'student_signup_start': past + week,
+      'student_signup_end': past + (week * 2),
+      'application_review_deadline': past + month,
+      # Community bonding period; ~30 days.
+      'accepted_students_announced_deadline' : past + month,
+      'student_application_matched_deadline': past + month,
+      'form_submission_start': past + month,
+      'bonding_start' : past + month,
+      'bonding_end' : past + (month * 2),
+      # Coding period; ~60 days.
+      'coding_start' : past + (month * 2),
+      'coding_end' : past + (month * 4),
+      # Mentor summit; 2 days, past the end of the coding period.
+      'mentor_summit_start' : past + (month * 4),
+      'mentor_summit_end' : past + (month * 4) + datetime.timedelta(2),
+      # Remainder of the offseason.
+      'program_end': past + (month * 4) + datetime.timedelta(3),
+  }
   gsoc2010_timeline = GSoCTimeline(**timeline_properties)
   gsoc2010_timeline.put()
 
@@ -192,30 +222,35 @@
     'title' : 'Org App Survey',
     'content' : 'Here is some content.',
     'modified_by' : current_user.key.to_old_key(),
-    'survey_start' : before,
-    'survey_end' : after
+    'survey_start' : gsoc2014_timeline.program_start,
+    'survey_end' : gsoc2014_timeline.program_start + datetime.timedelta(9)
   }
   org_app_survey_model.OrgAppSurvey(**org_app_survey_properties).put()
 
+  org_app_start = gsoc2010_timeline.program_start
+  org_app_end = gsoc2010_timeline.program_end + datetime.timedelta(9)
+
   org_app_survey_properties['key_name'] = ('%s/%s/orgapp' % (
       gsoc2010.prefix, gsoc2010.key().name()))
   org_app_survey_properties['program'] = gsoc2010
-  org_app_survey_properties['survey_start'] = past_before
-  org_app_survey_properties['survey_end'] = past_after
+  org_app_survey_properties['survey_start'] = org_app_start
+  org_app_survey_properties['survey_end'] = org_app_end
   org_app_survey_model.OrgAppSurvey(**org_app_survey_properties).put()
 
   timeline_properties = {
         'key_name': 'google/gci2013',
         'link_id': 'gci2013',
         'scope': google,
-        'program_start': before,
-        'program_end': after,
-        'accepted_organization_announced_deadline': before,
-        'student_signup_start': before,
-        'student_signup_end': after,
-        'tasks_publicly_visible': before,
-        'task_claim_deadline': after,
-        'stop_all_work_deadline': after,
+        'program_start': now,
+        'accepted_organization_announced_deadline': now + (week * 2),
+        'student_signup_start': now + (week * 2),
+        'student_signup_end': now + month,
+        'tasks_publicly_visible': now + month,
+        'task_claim_deadline': now + (month * 2),
+        'stop_all_work_deadline': now + (month * 4),
+        'work_review_deadline' : now + (month * 4) + week,
+        'winners_announced_deadline' : now + (month * 4) + week,
+        'program_end': now + (month * 4) + week,
   }
   gci2013_timeline = GCITimeline(**timeline_properties)
   gci2013_timeline.put()