Esempio n. 1
0
 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)))
Esempio n. 2
0
 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)))
Esempio n. 3
0
 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)))
Esempio n. 4
0
def test_is_private_url(url, expected):
    assert is_private_url(url) == expected
Esempio n. 5
0
def test_is_private_url(url, expected):
    assert is_private_url(url) == expected