phone: share context between home and zone
This commit is contained in:
parent
ae975de117
commit
f0512a1b4c
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue