def inject_variable(): ''' Inject into all templates variables that we would like to have all the time. ''' justedit = flask.session.get('justedit', False) if justedit: # pragma: no cover flask.session['justedit'] = None cron_status = utilities.get_last_cron(SESSION) return dict( version=__version__, is_admin=admin.is_admin(), justedit=justedit, cron_status=cron_status, )
def inject_variable(): ''' Inject into all templates variables that we would like to have all the time. ''' justedit = flask.session.get('justedit', False) if justedit: # pragma: no cover flask.session['justedit'] = None cron_status = utilities.get_last_cron(Session) return dict( version=__version__, is_admin=admin.is_admin(), justedit=justedit, cron_status=cron_status, user=current_user, available_backends=load_backends(anitya_config['SOCIAL_AUTH_AUTHENTICATION_BACKENDS']), )
def inject_variable(): """ Inject into all templates variables that we would like to have all the time. """ justedit = flask.session.get("justedit", False) if justedit: # pragma: no cover flask.session["justedit"] = None cron_status = utilities.get_last_cron(Session) return dict( version=__version__, is_admin=admin.is_admin(), justedit=justedit, cron_status=cron_status, user=current_user, available_backends=load_backends( anitya_config["SOCIAL_AUTH_AUTHENTICATION_BACKENDS"] ), )