diff --git a/README b/README new file mode 100644 index 0000000..fba02aa --- /dev/null +++ b/README @@ -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. diff --git a/app.py b/app.py index 686d741..e5401f5 100644 --- a/app.py +++ b/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(): diff --git a/templates/base.html b/templates/base.html index ea5bae6..e5d55b4 100644 --- a/templates/base.html +++ b/templates/base.html @@ -9,16 +9,9 @@ - - - - @@ -44,7 +37,10 @@ {% block content %} {% endblock %}
+ {% block footer %} + Your IP: {{ request.remote_addr }}
Have fun! + {% endblock %} diff --git a/templates/dns.html b/templates/dns.html new file mode 100644 index 0000000..6907b3f --- /dev/null +++ b/templates/dns.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} +{% block content %} +

{%trans%}Update your DNS{%endtrans%}

+

+ There will be a form here. +

+ +{% endblock %} \ No newline at end of file diff --git a/templates/profile.html b/templates/profile.html index fc50d19..2d1469a 100644 --- a/templates/profile.html +++ b/templates/profile.html @@ -2,9 +2,10 @@ {% block content %}

{%trans%}Profile Page{%endtrans%}

- {%trans%}Hello{%endtrans%} {{ current_user.username or current_user.email }}! + {%trans%}Hello{%endtrans%} {{ current_user.username or current_user.email }}!