phone: share context between home and zone

This commit is contained in:
Frédéric Péters 2015-11-03 11:35:45 +01:00
parent ae975de117
commit f0512a1b4c
1 changed files with 3 additions and 2 deletions

View File

@ -36,9 +36,10 @@ class Home(object):
self.request = request
def render(self):
zone = PhoneZone()
zone.request = self.request
context = RequestContext(self.request)
context['source_type'] = ContentType.objects.get_for_model(PhoneCall)
context['phonelines'] = PhoneLine.objects.filter(users__id=self.request.user.id)
context.update(zone.get_context_data())
tmpl = template.loader.get_template('welco/phone_home.html')
return tmpl.render(context)