def site_map(): pages = [p.replace(".html", "") for p in os.listdir('feda11y/templates')] excludes = {'errors', 'includes', 'base', 'sitemap.xml', 'index'} base_url = "https://feda11y.com" pages = [f'{base_url}/{p}' for p in pages if p not in excludes] last_scan_date = models.get_last_scan_date(current_app) return render_template('sitemap.xml', pages=pages, base_url=base_url, last_scan_date=last_scan_date)
def analytics(): last_scan_date = models.get_last_scan_date(current_app) kwargs = request.args.to_dict() try: group = list(kwargs.values())[0] except IndexError: group = False kwargs.update(dict(group=group, last_scan_date=last_scan_date)) return render_template('analytics.html', **kwargs)
def make_shell_context(): '''Make the data objects available in flask shell''' data = models.get_data(app) hist = models.get_hist(app) index_data = models.get_index_data(app) last_scan_date = models.get_last_scan_date(app) objects = dict( data=data, hist=hist, index_data=index_data, last_scan_date=last_scan_date) return objects
def faq(): last_scan_date = models.get_last_scan_date(current_app) return render_template('faq.html', last_scan_date=last_scan_date)
def about(): last_scan_date = models.get_last_scan_date(current_app) return render_template('about.html', last_scan_date=last_scan_date)