diff --git a/hotel/db.sqlite3 b/hotel/db.sqlite3 index abcf312..0ba0880 100644 Binary files a/hotel/db.sqlite3 and b/hotel/db.sqlite3 differ diff --git a/hotel/rooms/__pycache__/models.cpython-35.pyc b/hotel/rooms/__pycache__/models.cpython-35.pyc index 930053f..386b93f 100644 Binary files a/hotel/rooms/__pycache__/models.cpython-35.pyc and b/hotel/rooms/__pycache__/models.cpython-35.pyc differ diff --git a/hotel/rooms/__pycache__/urls.cpython-35.pyc b/hotel/rooms/__pycache__/urls.cpython-35.pyc index b9f2f28..5aa9817 100644 Binary files a/hotel/rooms/__pycache__/urls.cpython-35.pyc and b/hotel/rooms/__pycache__/urls.cpython-35.pyc differ diff --git a/hotel/rooms/__pycache__/views.cpython-35.pyc b/hotel/rooms/__pycache__/views.cpython-35.pyc index 3ab7a68..acb1b9e 100644 Binary files a/hotel/rooms/__pycache__/views.cpython-35.pyc and b/hotel/rooms/__pycache__/views.cpython-35.pyc differ diff --git a/hotel/rooms/models.py b/hotel/rooms/models.py index 150f282..add9c0e 100644 --- a/hotel/rooms/models.py +++ b/hotel/rooms/models.py @@ -25,3 +25,6 @@ class Room(models.Model): room_type = models.ForeignKey(RoomType, on_delete=models.CASCADE) reserved = models.BooleanField() + + def __str__(self): + return str(self.room_number) diff --git a/hotel/rooms/templates/index.html b/hotel/rooms/templates/index.html index 1b1dbac..6a3b8d6 100644 --- a/hotel/rooms/templates/index.html +++ b/hotel/rooms/templates/index.html @@ -23,9 +23,13 @@ {% if room.reserved %} ZAREZERWOWANE {% else %} -
+ {% endif %} diff --git a/hotel/rooms/templates/reservation.html b/hotel/rooms/templates/reservation.html new file mode 100644 index 0000000..c0ba886 --- /dev/null +++ b/hotel/rooms/templates/reservation.html @@ -0,0 +1,10 @@ + + + + +