Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: f99d4abe81
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (21 sloc) 0.6 kB
from django.core.exceptions import ObjectDoesNotExist
from django.http import Http404
def group_and_bridge(kwargs):
"""
Given kwargs from the view (with view specific keys popped) pull out the
bridge and fetch group from database.
"""
bridge = kwargs.pop("bridge", None)
if bridge:
try:
group = bridge.get_group(**kwargs)
except ObjectDoesNotExist:
raise Http404
else:
group = None
return group, bridge
def group_context(group, bridge):
# @@@ use bridge
return {
"group": group,
}
Jump to Line
Something went wrong with that request. Please try again.