diff --git a/src/animals/static/js/add_animal.js b/src/animals/static/js/add_animal.js
index fff4280..3b6e3ab 100644
--- a/src/animals/static/js/add_animal.js
+++ b/src/animals/static/js/add_animal.js
@@ -32,7 +32,6 @@ document.addEventListener('DOMContentLoaded', function() {
})
.then(response => response.json())
.then(data => {
- console.log('Animal added:', data);
// You can add some feedback here, like a toast notification
showToast('Animal added successfully!');
})
diff --git a/src/blog/urls.py b/src/blog/urls.py
index fda5107..8ac721e 100644
--- a/src/blog/urls.py
+++ b/src/blog/urls.py
@@ -17,15 +17,7 @@
router.register(r"likes", LikeViewSet)
router.register(r"comment-likes", CommentLikeViewSet, basename="comment-likes")
-
-# path('api/posts-by-date/', posts_by_date, name='posts_by_date'),
-# router.register(r"posts-by-date", posts_by_date, basename="posts-by-date")
-
urlpatterns = [
- path(
- "api/",
- include("notifications.urls"),
- ),
path("api/", include(router.urls)),
path("api/posts-by-date/", posts_by_date, name="posts_by_date"),
path(
diff --git a/src/brazil_blog/static/css/brazil_blog_compiled.css b/src/brazil_blog/static/css/brazil_blog_compiled.css
index 151b56a..bb22e2d 100644
--- a/src/brazil_blog/static/css/brazil_blog_compiled.css
+++ b/src/brazil_blog/static/css/brazil_blog_compiled.css
@@ -1598,6 +1598,10 @@ select {
margin-top: 1rem;
}
+.mt-6 {
+ margin-top: 1.5rem;
+}
+
.mt-8 {
margin-top: 2rem;
}
@@ -1725,6 +1729,10 @@ select {
min-height: 12rem;
}
+.min-h-96 {
+ min-height: 24rem;
+}
+
.min-h-screen {
min-height: 100vh;
}
@@ -2398,6 +2406,10 @@ select {
padding-bottom: 1rem;
}
+.pb-8 {
+ padding-bottom: 2rem;
+}
+
.pl-0 {
padding-left: 0px;
}
@@ -2513,6 +2525,11 @@ select {
color: rgb(243 244 246 / var(--tw-text-opacity));
}
+.text-gray-400 {
+ --tw-text-opacity: 1;
+ color: rgb(156 163 175 / var(--tw-text-opacity));
+}
+
.text-gray-500 {
--tw-text-opacity: 1;
color: rgb(107 114 128 / var(--tw-text-opacity));
@@ -2590,6 +2607,12 @@ select {
opacity: 0.5;
}
+.shadow {
+ --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
+ --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
+}
+
.shadow-lg {
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
diff --git a/src/brazil_blog/urls.py b/src/brazil_blog/urls.py
index 889079c..4a5cf72 100644
--- a/src/brazil_blog/urls.py
+++ b/src/brazil_blog/urls.py
@@ -26,6 +26,7 @@
path("locations/", include("locations.urls")),
path("drinks/", include(drinks_urls)),
path("animals/", include(animals_urls)),
+ path("notifications/", include("notifications.urls")),
]
diff --git a/src/drinks/static/js/add_drink.js b/src/drinks/static/js/add_drink.js
index 73b7f78..8f6c95f 100644
--- a/src/drinks/static/js/add_drink.js
+++ b/src/drinks/static/js/add_drink.js
@@ -32,7 +32,6 @@ document.addEventListener('DOMContentLoaded', function() {
})
.then(response => response.json())
.then(data => {
- console.log('Drink added:', data);
// You can add some feedback here, like a toast notification
showToast('Drink added successfully!');
})
diff --git a/src/drinks/views.py b/src/drinks/views.py
index 0bb28d6..c13ff1f 100644
--- a/src/drinks/views.py
+++ b/src/drinks/views.py
@@ -224,8 +224,6 @@ def get_context_data(self, **kwargs):
today_date = date.today()
total_days_amount = (today_date - start_date).days + 1
- print(total_days_amount)
-
# Average drinks per day per type
avg_drinks = (
DrinkType.objects.all()
diff --git a/src/notifications/templates/notifications/all-notifications.html b/src/notifications/templates/notifications/all-notifications.html
new file mode 100644
index 0000000..d2d3a0e
--- /dev/null
+++ b/src/notifications/templates/notifications/all-notifications.html
@@ -0,0 +1,103 @@
+{% extends "base.html" %} {% load static %} {% block content %}
+
+
+
All Notifications
+
+
+
+
+
+
+
+
+
+
+{% endblock %}
diff --git a/src/notifications/templates/notifications/includes/notifications.html b/src/notifications/templates/notifications/includes/notifications.html
index 2637569..0cc4809 100644
--- a/src/notifications/templates/notifications/includes/notifications.html
+++ b/src/notifications/templates/notifications/includes/notifications.html
@@ -12,7 +12,7 @@
-
+
@@ -26,7 +26,7 @@
const list = document.getElementById('notification-list');
function fetchNotifications() {
- fetch('/blog/api/notifications/')
+ fetch('/notifications/api/notifications/')
.then(response => response.json())
.then(data => {
const unreadCount = data.filter(n => !n.read).length;
@@ -35,7 +35,7 @@
list.innerHTML = data.map(notification => `
-
${notification.title}
+
${notification.title}
${new Date(notification.created_at).toLocaleString()}
${!notification.read ? `