# Bootstraps the Roots instance with the default
# set of the necessary objects

import datetime

site = Site.objects.get_current()

competition = Competition(
  name="Sample competition",
  site=site
)

competition.save()

problemset_series_1 = ProblemSet(
    name="Problems in the first series",
    competition=competition
)
problemset_series_1.save()

season = Season(
    competition=competition,
    name="First season",
    year=datetime.date.today().year,
    number=1,
    start=datetime.datetime.now(),
    end=datetime.datetime.now()+datetime.timedelta(days=30),
    problemset=problemset_series_1
)
season.save()

series = Series(
   season=season,
   name="First series",
   number=1,
   submission_deadline=datetime.datetime.now()+datetime.timedelta(days=30)
)
series.save()

@@ -221,141 +221,8 @@
 ()%0A%0A
-problemset_series_1 = ProblemSet(%0A    name=%22Problems in the first series%22,%0A    competition=competition%0A)%0Aproblemset_series_1.save()%0A%0A
 seas
@@ -439,23 +439,130 @@
 0),%0A
-    problemset=
+)%0Aseason.save()%0A%0Aproblemset_series_1 = ProblemSet(%0A    name=%22Problems in the first series%22,%0A    competition=competition%0A)%0A
 prob
@@ -576,25 +576,16 @@
 series_1
-%0A)%0Aseason
 .save()%0A
@@ -731,16 +731,51 @@
 days=30)
+,%0A   problemset=problemset_series_1
 %0A)%0Aserie

Improve bootstrap script with default problemset