mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
22 lines
639 B
Python
Executable file
22 lines
639 B
Python
Executable file
from django.views import View
|
|
from django.shortcuts import render
|
|
from apps.rss_feeds.models import MStory, MStarredStory
|
|
from apps.rss_feeds.models import MStory, MStarredStory
|
|
|
|
class Stories(View):
|
|
|
|
def get(self, request):
|
|
data = {
|
|
'stories': MStory.objects.count(),
|
|
'starred_stories': MStarredStory.objects.count(),
|
|
}
|
|
chart_name = "stories"
|
|
chart_type = "histogram"
|
|
|
|
context = {
|
|
"data": data,
|
|
"chart_name": chart_name,
|
|
"chart_type": chart_type,
|
|
}
|
|
return render(request, 'monitor/prometheus_data.html', context)
|
|
|