diff --git a/amadeus/settings.py b/amadeus/settings.py index 6878198..b18cffe 100644 --- a/amadeus/settings.py +++ b/amadeus/settings.py @@ -94,8 +94,8 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'amadeus', - 'USER': 'amadeus_admin', - 'PASSWORD': 'amadeus', + 'USER': 'postgres', + 'PASSWORD': 'felipe', 'HOST': '127.0.0.1', 'PORT': '5432', } diff --git a/core/context_processors.py b/core/context_processors.py index d0f4aa6..cc8602f 100644 --- a/core/context_processors.py +++ b/core/context_processors.py @@ -1,6 +1,9 @@ from .models import Notification def notifications(request): - return { - 'notifications': Notifications.objects.filter(user= request.user, read=False).order_by('-datetime') - } \ No newline at end of file + if request.user.is_authenticated: + return { + 'notifications': Notification.objects.filter(user= request.user, read=False).order_by('-datetime') + } + else: + return request \ No newline at end of file diff --git a/core/static/css/base/header.css b/core/static/css/base/header.css index a7e2099..deb3afb 100644 --- a/core/static/css/base/header.css +++ b/core/static/css/base/header.css @@ -21,6 +21,10 @@ transform:scale(1.1); } +.notification-count{ + background-color: #cc0000; +} + /* ID */ .notifications{ diff --git a/core/templates/base.html b/core/templates/base.html index 56e7d32..02ecf17 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -53,7 +53,7 @@