symposion_app/symposion/reviews/context_processors.py
2012-08-14 03:54:45 -04:00

13 lines
382 B
Python

from django.contrib.contenttypes.models import ContentType
from symposion.proposals.models import ProposalSection
def reviews(request):
sections = []
for section in ProposalSection.objects.all():
if request.user.has_perm("reviews.can_review_%s" % section.section.slug):
sections.append(section)
return {
"review_sections": sections,
}