diff --git a/wotstats/init.py b/wotstats/init.py
index 533b2e3..2ad29ef 100644
--- a/wotstats/init.py
+++ b/wotstats/init.py
@@ -13,7 +13,8 @@ def init_app():
app.config['OPENID_FS_STORE_PATH'] = 'tmp'
#
app.config['WG_ID'] = '502910c1c785c3c7ca2e83c9e89bde02'
- app.config['WG_OPENID_URL'] = 'https://eu.wargaming.net/id/openid/'
+ # app.config['WG_OPENID_URL'] = 'https://eu.wargaming.net/id/openid/'
+ app.config['WG_OPENID_URL'] = 'https://wargaming.net/id/openid/'
# , safe_roots=[]
oid.init_app(app)
diff --git a/wotstats/templates/pages/account/index.html b/wotstats/templates/pages/account/index.html
index fe8cf26..f8b1e60 100644
--- a/wotstats/templates/pages/account/index.html
+++ b/wotstats/templates/pages/account/index.html
@@ -1,5 +1,35 @@
{% extends 'layouts/main.html' %}
{% block content %}
-{{account_statistics}}
+{# {account_statistics} #}
+
+
+
+
+{% for z in account_statistics %}
+ - {{ z }}
+ {% if account_statistics[z] is mapping %}
+
+ {% for x in account_statistics[z] %}
+ - {{ x }}
+ {% if account_statistics[z][x] is mapping %}
+
+ {% for c in account_statistics[z][x] %}
+ - {{ c }}: {{ account_statistics[z][x][c] }}
+ {% endfor %}
+
+ {% else %}
+
+ - {{ x }}: {{ account_statistics[z][x] }}
+
+ {% endif %}
+
+ {% endfor %}
+
+ {% else %}
+ {{ account_statistics[z] }}
+ {% endif %}
+
+{% endfor %}
+
{% endblock %}
diff --git a/wotstats/templates/pages/login.html b/wotstats/templates/pages/login.html
index 633d51f..07a7a7c 100644
--- a/wotstats/templates/pages/login.html
+++ b/wotstats/templates/pages/login.html
@@ -2,12 +2,12 @@
{% block title %}Create Profile{% endblock %}
{% block content %}
Sign in
-
{% endblock %}
diff --git a/wotstats/views/account.py b/wotstats/views/account.py
index e1c575e..35bafa7 100644
--- a/wotstats/views/account.py
+++ b/wotstats/views/account.py
@@ -25,11 +25,19 @@ def __get_player_personal_data():
@pages_account.route('/')
def index():
+ if not g.user:
+ return redirect(url_for('pages_home.index'))
+
account_statistics = __get_player_personal_data()
- return render_template('pages/account/index.html', account_statistics=account_statistics)
+ return render_template(
+ 'pages/account/index.html',
+ account_statistics=account_statistics)
@pages_account.route('/statistics.html')
def statistics():
+ if not g.user:
+ return redirect(url_for('pages_home.index'))
+
return render_template(
'pages/account/statistics.html')
diff --git a/wotstats/views/home.py b/wotstats/views/home.py
index 5564dee..3e37e79 100644
--- a/wotstats/views/home.py
+++ b/wotstats/views/home.py
@@ -30,7 +30,7 @@ def parse_wargaming_openid_url(url):
@pages_home.route('/', defaults={'page': 'index'})
@pages_home.route('/')
def index(page):
- z = session['openid']
+ # z = session['openid']
return render_template('pages/index.html')