- {% with messages = get_flashed_messages(with_categories=true) %} - {% if messages %} - {% for category, message in messages %} -
- {{ message }} -
- {% endfor %} - {% endif %} - {% endwith %} {% block content %}{% endblock %}
diff --git a/aula/templates/thread_show.html b/aula/templates/thread_show.html new file mode 100644 index 0000000..9b039d8 --- /dev/null +++ b/aula/templates/thread_show.html @@ -0,0 +1,22 @@ +{% extends "layout.html" %} +{% block content %} +
+

{{ thread.title }}

+
+
+ {% for message in messages %} + {% if message.author_id == current_user.user_id %} +
+ {% else %} +
+ {% endif %} +
+ {{ message.author.first_name }} +

{{ message.content }}

+
+

{{ message.created_date }}

+
+ {% endfor %} +
+
+{% endblock content %} diff --git a/aula/templates/threads.html b/aula/templates/threads.html index 229cbb6..ccc6415 100644 --- a/aula/templates/threads.html +++ b/aula/templates/threads.html @@ -1,46 +1,10 @@ {% extends "layout.html" %} {% block content %} -
-
- {{ form.hidden_tag() }} -
- {{ form.sourceAccount.label(class="form-control-label") }} - {{ form.sourceAccount(class="form-control")}} -
-
-
- {{ form.amount.label(class="form-control-label") }} - {% if form.amount.errors %} - {{ form.amount(class="form-control form-control-lg is-invalid") }} -
- {% for error in form.password.errors %} - {{ error }} - {% endfor %} -
- {% else %} - {{ form.amount(class="form-control form-control-lg") }} - {% endif %} -
-
-
- {{ form.targetAccount.label(class="form-control-label") }} - {{ form.targetAccount(class="form-control") }} -
-
- {{ form.submit(class="btn btn-outline-info") }} -
-
-
- -
-

Dropdown customer account tuples:

-
    - {% for n in drop_cus_acc %} -
  • {{n}}}
  • - {% endfor %} -
-
-

Same list with a filter: {{ drop_cus_acc|join(', ') }}

-
- +

Tråde

+
+ {% for thread in threads %} + + {% endfor %} {% endblock content %}