mirror of
https://github.com/nikdoof/vapemap.git
synced 2025-12-14 14:52:16 +00:00
* Add better admin interface for FlaggedObject * Export totals via context processors * Update base template to show this data to admins.
11 lines
321 B
Python
11 lines
321 B
Python
from django.contrib.sites.models import Site
|
|
from moderation.models import FlaggedObject
|
|
|
|
def pending_flagged_admin(request):
|
|
if request.user.is_superuser:
|
|
pending_flags = FlaggedObject.objects.filter(status=1).count()
|
|
return {
|
|
'admin_pending_flags': pending_flags
|
|
}
|
|
return {}
|