working on the django-cms video plugin... I want to {% include %} template based on the client. so I want to know what client is...
I did this:
in: '/cms/plugins/video/cms_plugins.py'
'''
def render(self, context, instance, placeholder):
cntx = context.dicts[0]
rqcntx = cntx.dicts[0]
wsgirqst = rqcntx.dicts[4]['request']
mta = wsgirqst.META
client = mta['HTTP_USER_AGENT']
context.update({
'object': instance,
'placeholder':placeholder,
'client': client
})
return context
'''
I guess this is not the right way? :)
yonatan