Runs black

This commit is contained in:
Mouse Reeve
2021-03-08 08:49:10 -08:00
parent a07f955781
commit 70296e760b
198 changed files with 10239 additions and 8572 deletions

View File

@ -1,17 +1,20 @@
''' endpoints for getting updates about activity '''
""" endpoints for getting updates about activity """
from django.contrib.auth.decorators import login_required
from django.http import JsonResponse
from django.utils.decorators import method_decorator
from django.views import View
# pylint: disable= no-self-use
@method_decorator(login_required, name='dispatch')
@method_decorator(login_required, name="dispatch")
class Updates(View):
''' so the app can poll '''
""" so the app can poll """
def get(self, request):
''' any notifications waiting? '''
return JsonResponse({
'notifications': request.user.notification_set.filter(
read=False
).count(),
})
""" any notifications waiting? """
return JsonResponse(
{
"notifications": request.user.notification_set.filter(
read=False
).count(),
}
)