[TASK] Add README file.
This commit is contained in:
parent
0da26c151a
commit
b8406c6c80
|
@ -0,0 +1,8 @@
|
|||
This is a simple flask app that works as a webfrontend for a simple dynamic dns hosting service.
|
||||
|
||||
In the back, it uses nsupdate to speak to the configured dns master and manage dns records for the registered users.
|
||||
|
||||
Use pip to install the things mentioned in requirements.txt to get started.
|
||||
A virtualenv will also come in handy.
|
||||
|
||||
This thing is just in a very early stage and i don't know how far it will go from here.
|
5
app.py
5
app.py
|
@ -84,6 +84,11 @@ def create_app(test_config=None): # For automated tests
|
|||
def profile_page():
|
||||
return render_template('profile.html')
|
||||
|
||||
@app.route('/dns')
|
||||
@login_required
|
||||
def update_dns():
|
||||
return render_template('dns.html')
|
||||
|
||||
@app.route('/special')
|
||||
@roles_required('admin')
|
||||
def special_page():
|
||||
|
|
|
@ -9,16 +9,9 @@
|
|||
<!-- Bootstrap -->
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<style>
|
||||
.col-centered { float: none; margin: 0 auto; }
|
||||
.col-centered { float: none; margin: 0px auto; }
|
||||
hr { border-color: #cccccc; }
|
||||
</style>
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -44,7 +37,10 @@
|
|||
{% block content %}
|
||||
{% endblock %}
|
||||
<hr>
|
||||
{% block footer %}
|
||||
Your IP: {{ request.remote_addr }}<br>
|
||||
Have fun!
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h1>{%trans%}Update your DNS{%endtrans%}</h1>
|
||||
<p>
|
||||
There will be a form here.
|
||||
</p>
|
||||
|
||||
{% endblock %}
|
|
@ -2,9 +2,10 @@
|
|||
{% block content %}
|
||||
<h2>{%trans%}Profile Page{%endtrans%}</h2>
|
||||
<p>
|
||||
{%trans%}Hello{%endtrans%} {{ current_user.username or current_user.email }}!
|
||||
{%trans%}Hello{%endtrans%} {{ current_user.username or current_user.email }}!<br>
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('update_dns') }}">{%trans%}Update DNS{%endtrans%}</a></li>
|
||||
<li><a href="{{ url_for('user.change_username') }}">{%trans%}Change username{%endtrans%}</a></li>
|
||||
<li><a href="{{ url_for('user.change_password') }}">{%trans%}Change password{%endtrans%}</a></li>
|
||||
<li><a href="{{ url_for('user.logout') }}?next={{ url_for('user.login') }}">{%trans%}Sign out{%endtrans%}</a></li>
|
||||
|
|
Loading…
Reference in New Issue