fnp
/
redakcja.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add first alerts.
[redakcja.git]
/
src
/
alerts
/
templatetags
/
alerts.py
1
from django.template import Library
2
from ..models import Alert
3
4
5
register = Library()
6
7
@register.simple_tag
8
def get_alerts():
9
return {
10
'count': Alert.objects.all().count(),
11
'items': Alert.objects.all()[:20],
12
}