mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
15 lines
487 B
Python
Executable file
15 lines
487 B
Python
Executable file
from django.views import View
|
|
from django.http import JsonResponse
|
|
from apps.analyzer.models import MClassifierFeed, MClassifierAuthor, MClassifierTag, MClassifierTitle
|
|
|
|
|
|
class Classifiers(View):
|
|
|
|
def get(self, request):
|
|
return JsonResponse({
|
|
'feeds': MClassifierFeed.objects.count(),
|
|
'authors': MClassifierAuthor.objects.count(),
|
|
'tags': MClassifierTag.objects.count(),
|
|
'titles': MClassifierTitle.objects.count(),
|
|
})
|
|
|