-
Notifications
You must be signed in to change notification settings - Fork 0
/
route_template.py
88 lines (88 loc) · 3.51 KB
/
route_template.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# from flask import Blueprint, request, render_template, json, session
# from flask_wtf import csrf
# from wtforms import Label
#
# from utils import *
# from forms import LoginForm, RegisterForm
# from constants import RECAPTCHA_PUBLIC_KEY
#
# root_path = 'static'
#
# template = Blueprint('template', __name__)
#
#
# @template.route('/main_section', methods=['POST', 'GET'])
# def main_section():
#
# # if 'lang' not in session:
# # session['lang'] = 'zh-tw'
# # if 'page' in session:
# # if session['page'] == 'txnHistory':
# # return jsonify(render=render_template('page-txnHistory.html', rec=rec, report_date=report_date,
# # translations=translations))
#
# csrf_token = csrf.generate_csrf()
# session['csrf'] = csrf_token
# login_form = LoginForm()
# login_form.csrf_token.data = csrf_token
# register_form = RegisterForm()
# register_form.csrf_token.data = csrf_token
# if 'lang' not in session:
# # find user's location, defaults to English
# debug_out('looking up geolocation for language setting...')
# set_session_geo_lang(request.remote_addr)
# set_flag_from_lang()
# debug_out('done')
# return render_template('page-gallery.html', icon_placement=icon_placement, game_titles=game_titles,
# root_path='', login_form=login_form, register_form=register_form,
# RECAPTCHA_PUBLIC_KEY=RECAPTCHA_PUBLIC_KEY, notification_popup=False,
# notification='', notification_title='', reset_pass=False,
# lang=session['lang'], translations=translations)
#
#
# @template.route('/navigationbar', methods=['POST', 'GET'])
# def navigationbar():
#
# # if 'lang' not in session:
# # session['lang'] = 'zh-tw'
#
# return render_template('section-navbar.html', lang=session['lang'], translations=translations)
#
#
# @template.route('/topbar', methods=['POST', 'GET'])
# def topbar():
#
# # if 'lang' not in session:
# # session['lang'] = 'zh-tw'
#
# return render_template('section-topbar.html', root_path=root_path, lang=session['lang'], translations=translations)
#
#
# @template.route('/modals', methods=['POST', 'GET'])
# def modals():
#
# # if 'lang' not in session:
# # session['lang'] = 'zh-tw'
#
# csrf_token = csrf.generate_csrf()
# login_form = LoginForm(session['lang'])
# login_form.csrf_token.data = csrf_token
# login_form.login.label = Label("login", translations['log in'][session['lang']])
# register_form = RegisterForm()
#
# # if 'ref' in session:
# # register_form.referral.default = session['ref']
#
# register_form.csrf_token.data = csrf_token
# register_form.register.label = Label("register", translations['register'][session['lang']])
# return render_template('template-modals.html', login_form=login_form, register_form=register_form,
# RECAPTCHA_PUBLIC_KEY=RECAPTCHA_PUBLIC_KEY, lang=session['lang'], translations=translations,
# notification_popup=request.form['notification_popup'], notification=request.form['notification'],
# notification_title=request.form['notification_title'])
#
#
# @template.route('/topSection')
# def top_section():
#
# return render_template('section-baccarat.html', icon_placement=icon_placement, game_titles=game_titles,
# root_path='', lang=session['lang'], translations=translations)