Esempio n. 1
0
 def _process(self):
     stats = {'python_version': platform.python_version(),
              'indico_version': indico.__version__,
              'operating_system': get_os(),
              'postgres_version': get_postgres_version(),
              'language': config.DEFAULT_LOCALE,
              'debug': config.DEBUG}
     return jsonify(stats)
Esempio n. 2
0
 def _process(self):
     stats = {'python_version': platform.python_version(),
              'indico_version': indico.__version__,
              'operating_system': get_os(),
              'postgres_version': get_postgres_version(),
              'language': config.DEFAULT_LOCALE,
              'debug': config.DEBUG}
     return jsonify(stats)
Esempio n. 3
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())
Esempio n. 4
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())
Esempio n. 5
0
 def _process(self):
     config = Config.getInstance()
     stats = {
         'python_version': platform.python_version(),
         'indico_version': indico.__version__,
         'operating_system': get_os(),
         'postgres_version': get_postgres_version(),
         'language': config.getDefaultLocale(),
         'debug': config.getDebug()
     }
     return jsonify(stats)
Esempio n. 6
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)
Esempio n. 7
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. 8
0
    def _process(self):
        if User.query.filter_by(is_system=False).has_rows():
            return redirect(url_for_index())

        form = BootstrapForm()
        if form.validate_on_submit():
            return self._handle_submit(form)

        return render_template(
            'bootstrap/bootstrap.html',
            form=form,
            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. 9
0
 def _process(self):
     form = CephalopodForm(obj=FormDefaults(
         **cephalopod_settings.get_all()))
     if form.validate_on_submit():
         return self._process_form(form)
     config = Config.getInstance()
     hub_url = url_join(
         config.getCommunityHubURL(),
         '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.getBaseURL(),
         language=config.getDefaultLocale(),
         operating_system=get_os(),
         postgres_version=get_postgres_version(),
         python_version=platform.python_version(),
         hub_url=hub_url)
Esempio n. 10
0
def _get_versions():
    return {
        'postgres_version': Version(get_postgres_version()),
        'python_version': Version(platform.python_version()),
        'indico_version': Version(indico.__version__),
    }