Skip to content
Snippets Groups Projects
Commit c15afcd3 authored by ale's avatar ale
Browse files

templatified support pages; add js-based redirect page

parent dc30ffec
No related branches found
No related tags found
No related merge requests found
<!doctype html>
<html>
<head>
<title>DJ RANDOM :: {% block title %}{% endblock %}</title>
<link href="/static/favicon.ico" type="image/x-icon" rel="shortcut icon">
<link rel="stylesheet" type="text/css" href="/static/css/login.css">
</head>
<body>
<div id="main">
<div id="form">
{% block main %}
{% endblock %}
</div>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<title>DJ RANDOM :: About</title>
<link href="/static/favicon.ico" type="image/x-icon" rel="shortcut icon">
<link rel="stylesheet" type="text/css" href="/static/css/login.css">
</head>
<body>
{% extends "_std_base.html" %}
{% block title %}About{% endblock %}
{% block main %}
<div id="main">
<div id="form">
<h3>DJ:Random</h3>
<p>
......@@ -19,9 +12,4 @@
(<b>{{ used_gb }}</b> Gb).
</p>
</div>
</div>
</body>
</html>
{% endblock %}
{% extends "_std_base.html" %}
{% block title %}About{% endblock %}
{% block main %}
<p>
Redirecting to <a href="{{ url | e }}">{{ url | e }}</a> ...
</p>
<script type="text/javascript">
window.location = '{{ url | e }}';
</script>
{% endblock %}
<!doctype html>
<html>
<head>
<title>DJ RANDOM</title>
<link href="/static/favicon.ico" type="image/x-icon" rel="shortcut icon">
<link rel="stylesheet" type="text/css" href="/static/css/login.css">
</head>
<body>
<div id="main">
{% extends "_std_base.html" %}
{% block title %}User Details{% endblock %}
{% block main %}
<div id="form">
{%- for msg in get_flashed_messages() -%}
......@@ -55,5 +49,4 @@
</div>
</body>
</html>
{% endblock %}
<!doctype html>
<html>
<head>
<title>DJ RANDOM</title>
<link href="/static/favicon.ico" type="image/x-icon" rel="shortcut icon">
<link rel="stylesheet" type="text/css" href="/static/css/login.css">
</head>
<body>
{% extends "_std_base.html" %}
{% block title %}Invites{% endblock %}
{% block main %}
<div id="main">
<div id="form">
<form action="/user/invite" method="post">
{{ form.hidden_tag() | safe }}
......@@ -27,9 +20,5 @@
<input type="submit" class="f_submit" value=" Invite ">
</p>
</form>
</div>
</div>
</body>
</html>
{% endblock %}
......@@ -52,6 +52,15 @@ def homepage():
return render_template('index.html', user=user)
@app.route('/ext')
@require_auth
def redirect_to_external_url():
url = request.args.get('url')
if not url:
abort(400)
return render_template('redirect.html', url=url)
def fileiter(path, pos, end):
with open(path, 'r') as fd:
fd.seek(pos)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment