From 587aec09bc931f5ee4b17bb2c93a1193fccf30b3 Mon Sep 17 00:00:00 2001 From: Th3NiKo Date: Sun, 8 Dec 2019 01:05:41 +0100 Subject: [PATCH] Add notes listing html connected with backend --- bestnotes/templates/notes.html | 37 ++++++++++++++++++++++++++++++ bestnotes/templates/subjects.html | 12 +++++----- bestnotes/urls.py | 2 +- bestnotes/views.py | 6 ++--- db.sqlite3 | Bin 172032 -> 172032 bytes 5 files changed, 47 insertions(+), 10 deletions(-) create mode 100644 bestnotes/templates/notes.html diff --git a/bestnotes/templates/notes.html b/bestnotes/templates/notes.html new file mode 100644 index 0000000..8bf2cb6 --- /dev/null +++ b/bestnotes/templates/notes.html @@ -0,0 +1,37 @@ +{% extends 'base.html' %} +{% load static %} +{% block css %} + +{% endblock %} +{% block content %} +{% include 'navbar.html' %} +
+

{{id}}

+
+ +
+
+
+

Dostępne notatki

+
    + {% for note in notes%} + {% if user.id != note.user.user.id %} + {{ note.name }} + {% endif %} + {% endfor %} +
+
+
+

Twoje notatki

+
    + {% for note in notes%} + {% if user.id == note.user.user.id %} + {{ note.name }} + {% endif %} + {% endfor %} +
+
+
+
+ +{% endblock %} diff --git a/bestnotes/templates/subjects.html b/bestnotes/templates/subjects.html index a063669..f78dc08 100644 --- a/bestnotes/templates/subjects.html +++ b/bestnotes/templates/subjects.html @@ -25,18 +25,18 @@ Liczba dostępnych przedmiotów: 3/5