For Private page, add feature 'take note'

This makes this app much more meaningful. For this feature, a new database table is added. More complicated logics are also needed, for example, we use hash(user ID + timestamp + note contant) as the unique id of each note (it's necessary when we try to delete a note)
This commit is contained in:
XD-DENG
2017-07-03 22:34:58 +08:00
parent 8ff8bb625c
commit c072aa771d
8 changed files with 150 additions and 21 deletions

View File

@@ -5,16 +5,18 @@
{# only invoked when failed adding new ID due to duplication #}
{% if id_to_add_is_duplicated %}
<div class="text-danger">
<strong>Warning!</strong> The account name already exists.
</div>
<div class="alert alert-dismissible alert-danger">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Warning!</strong> The account name already exists.
</div>
{% endif %}
{# only invoked when failed adding new ID due to invalid character #}
{% if id_to_add_is_invalid %}
<div class="text-danger">
<strong>Warning!</strong> The account name is invalid.
</div>
<div class="alert alert-dismissible alert-danger">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Warning!</strong> The account name is invalid.
</div>
{% endif %}
<div class = "container">
@@ -63,10 +65,4 @@
</div>
{% endblock %}