code: def rotate_content(day=None):
      
      # getting the content rotation settings from site settings
  
      for main in Main.objects.all():
          site = main.sites_rooted_here.all().first()
          main_lang = Languages.for_site(site).languages.filter(
              is_main_language=True).first()
          index = SectionIndexPage.objects.live().child_of(main).first()
          site_settings = SiteSettings.for_site(site)
          if day is None:
              day = timezone.now().weekday()
  
          # calls the two rotate methods with the necessary params
          if main and index:
              rotate_latest(main_lang, index, main, site_settings, day)
              rotate_featured_in_homepage(main_lang, day, main)
docs: this method gets the parameters that are needed for rotate_latest
      and rotate_featured_in_homepage methods, and calls them both