Page MenuHome

settings.py
No OneTemporary

settings.py

import json
from flask import (flash,
render_template,
request,
Blueprint)
from application import app
from application import http_server_request
from application import list_integers_string
from application import check_connection
# Name of the Blueprint
settings = Blueprint('settings', __name__)
@settings.route('/', methods=['GET', 'POST'])
def index():
if request.method == 'POST':
params = request.form
http_server_request('post', '/settings', params)
projects = http_server_request('get', '/projects')
settings = http_server_request('get', '/settings')
return render_template('settings/index.html',
title='settings',
settings=settings,
projects=projects)
@settings.route('/render/', methods=['GET'])
def render():
render_settings = http_server_request('get', '/settings/render')
return render_template('settings/render.html',
title='render settings',
render_settings=render_settings)
@settings.route('/status/', methods=['GET'])
def status():
try:
server_status = check_connection()
server_stats = http_server_request('get', '/stats')
except:
server_status = 'offline'
server_stats = ''
return render_template('settings/status.html',
title='server status',
server_stats=server_stats,
server_status=server_status)

File Metadata

Mime Type
text/x-python
Expires
Wed, Sep 30, 2:43 AM (2 d)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
8b/d3/a2b849348d63abb1f4b3d374d041

Event Timeline