diff --git a/app.py b/app.py index fa5fdb1..2c904a8 100644 --- a/app.py +++ b/app.py @@ -153,6 +153,11 @@ def users(): return render_template('users.html', users=users) +@app.route('/settings') +@login_required +def settings(): + return render_template('settings.html', users=users) + @app.route('/users/edit/', methods=['GET', 'POST']) @login_required def edit_user(id): diff --git a/db/create_tables.sql b/db/create_tables.sql index 861a61a..8cc704a 100644 --- a/db/create_tables.sql +++ b/db/create_tables.sql @@ -19,7 +19,8 @@ CREATE TABLE api_calls ( status_code INT, status varchar, total_rows_found INT, - error_message TEXT DEFAULT NULL + error_message TEXT DEFAULT NULL, + data_day TIMESTAMPTZ ); CREATE TABLE daily_visits ( diff --git a/templates/course_contents.html b/templates/course_contents.html index 2596d7c..39b5e6b 100644 --- a/templates/course_contents.html +++ b/templates/course_contents.html @@ -22,7 +22,7 @@

Course Contents

{% for course_content in course_contents %} - + {{ course_content.type_of }} @@ -35,15 +35,15 @@

Course Contents

{{ course_content.lecture_no }} - {{ course_content.ex_number }} {{ course_content.ex_instruction }} {% endif %} - - -
- -
+ {% set file_name = course_content.language ~ '_' ~ course_content.type_of ~ '_' ~ course_content.lecture_no ~ '.html' %} {% if file_exists(file_name) %} {% endif %} + +
+ +
{% endfor %} diff --git a/templates/create_course_content.html b/templates/create_course_content.html index 3471ae9..817d19e 100644 --- a/templates/create_course_content.html +++ b/templates/create_course_content.html @@ -3,19 +3,25 @@ {% block content %}

Create Course Content

-
+
- +
-
+
- +
-
+
@@ -23,7 +29,7 @@

Create Course Content

-
+
diff --git a/templates/edit_course_content.html b/templates/edit_course_content.html index 34d3de5..90720f6 100644 --- a/templates/edit_course_content.html +++ b/templates/edit_course_content.html @@ -3,19 +3,25 @@ {% block content %}

Edit Course Content

-
+
- +
-
+
- +
-
+
@@ -23,7 +29,7 @@

Edit Course Content

-
+
@@ -33,7 +39,7 @@

Edit Course Content

- Cancel + Cancel
{% endblock %} diff --git a/templates/navigation.html b/templates/navigation.html index 131974e..524fb6e 100644 --- a/templates/navigation.html +++ b/templates/navigation.html @@ -47,6 +47,14 @@
+
  • + + +
    + Settings +
    +
    +
  • {#
  • #} {#
    #} {# #} diff --git a/templates/settings.html b/templates/settings.html new file mode 100644 index 0000000..88b21dc --- /dev/null +++ b/templates/settings.html @@ -0,0 +1,17 @@ +{% extends "static.html" %} + +{% block content %} +

    Edit User

    +
    +
    +
    + + +
    +
    + + Cancel +
    +
    +
    +{% endblock %}