def _process_GET(self): if User.query.filter_by(is_system=False).has_rows(): return redirect(url_for_index()) return render_template('bootstrap/bootstrap.html', form=BootstrapForm(), timezone=config.DEFAULT_TIMEZONE, languages=get_all_locales(), operating_system=get_os(), postgres_version=get_postgres_version(), indico_version=indico.__version__, python_version=python_version(), show_local_warning=(config.DEBUG or is_private_url(request.url_root)))
def _process_GET(self): if User.query.filter_by(is_system=False).has_rows(): return redirect(url_for_index()) return render_template('bootstrap/bootstrap.html', form=BootstrapForm(), timezone=config.DEFAULT_TIMEZONE, languages=get_all_locales(), operating_system=get_os(), postgres_version=get_postgres_version(), indico_version=indico.__version__, python_version=python_version(), show_local_warning=(config.DEBUG or is_private_url(request.url_root)))
def _process(self): form = CephalopodForm(obj=FormDefaults(**cephalopod_settings.get_all())) if form.validate_on_submit(): return self._process_form(form) hub_url = url_join(config.COMMUNITY_HUB_URL, 'api/instance/{}'.format(cephalopod_settings.get('uuid'))) cephalopod_settings.set('show_migration_message', False) return WPCephalopod.render_template('cephalopod.html', 'cephalopod', affiliation=core_settings.get('site_organization'), enabled=cephalopod_settings.get('joined'), form=form, indico_version=indico.__version__, instance_url=config.BASE_URL, language=config.DEFAULT_LOCALE, operating_system=get_os(), postgres_version=get_postgres_version(), python_version=platform.python_version(), hub_url=hub_url, show_local_warning=(config.DEBUG or is_private_url(request.url_root)))
def test_is_private_url(url, expected): assert is_private_url(url) == expected
def test_is_private_url(url, expected): assert is_private_url(url) == expected