def _DisplayReleaseReport(self, date=None, range_of_days=6):
    # TODO(user): This should probably handle subversions of the OS as well.
    # TODO(user): This should be able to do a testing report as well.
    try:
      period = datetime.timedelta(days=range_of_days)
    except TypeError:
      self.error(400)
      self.response.out.write('invalid date input')
      return
    candidate_items = []
    if not date:
      start_date = datetime.datetime.now()
    else:
      try:
        start_date = datetime.datetime(date)
      except TypeError:
        self.error(400)
        self.response.out.write('invalid date input')
        return
    # Get all package logs for the appropriate time range.
    query = models.AdminPackageLog.all()
    query.filter('mtime >', start_date - period)
    # Check for packages that were in stable in some log entry.
    for item in query:
      if 'stable' in item.catalogs:
        if item.filename not in candidate_items:
          candidate_items.append(item.filename)
    # Pass list of packages that were in stable in the time range.
    final_list = self.ItemQualificationCheck(
        candidate_items, start_date, range_of_days)
    # Generate Actual Report.
    final_report, contains_forced_install = self.MakeReleaseReport(final_list)
    username = users.get_current_user()
    report_date = str(datetime.date.today())
    self.Render('release_report.html', {
        'report_items': final_report,
        'admin_username': username,
        'contains_forced_install': contains_forced_install,
        'report_date': report_date,
        'salutation': settings.RELEASE_REPORT_SALUTATION,
        'title': settings.RELEASE_REPORT_TITLE,
        'subject_line_flag': settings.RELEASE_REPORT_SUBJECT_FLAG,
        'introduction': settings.RELEASE_REPORT_INTRODUCTION,
        'introduction_warning': settings.RELEASE_REPORT_INTRODUCTION_WARNING,
        'managed_install_text': settings.RELEASE_REPORT_MANAGED_INSTALL_TEXT,
        'managed_update_and_optional_text':
            settings.RELEASE_REPORT_MANAGED_UPDATE_AND_OPTIONAL_TEXT,
        'managed_update_text': settings.RELEASE_REPORT_MANAGED_UPDATE_TEXT,
        'optional_install_text': settings.RELEASE_REPORT_OPTIONAL_INSTALL_TEXT,
        'unattended_and_forced_text':
            settings.RELEASE_REPORT_UNATTENDED_AND_FORCED_TEXT,
        'forced_text': settings.RELEASE_REPORT_FORCED_TEXT,
        'restart_required_text': settings.RELEASE_REPORT_RESTART_REQUIRED_TEXT,
        'signature': settings.RELEASE_REPORT_SIGNATURE,
        'version_verb': settings.RELEASE_REPORT_VERSION_VERB,
        })
Load macros from a directory. By default loads macros in the current directory.
dataset/ETHPy150Open google/simian/src/simian/mac/admin/release_report.py/ReleaseReport._DisplayReleaseReport--crossover with--dataset/ETHPy150Open roglew/pappy-proxy/pappyproxy/plugins/macrocmds.py/load_macros_cmd