'Update context from module if standard and append script'

def add_custom_context_and_script(self, context):

    if self.web_form_module:
        new_context = self.web_form_module.get_context(context)
        if new_context:
            context.update(new_context)
        js_path = os.path.join(os.path.dirname(self.web_form_module.__file__), (scrub(self.name) + u'.js'))
        if os.path.exists(js_path):
            context.script = open(js_path, u'r').read()
        css_path = os.path.join(os.path.dirname(self.web_form_module.__file__), (scrub(self.name) + u'.css'))
        if os.path.exists(css_path):
            context.style = open(css_path, u'r').read()
