def __wrapped_render(self, dictionary = {}, *args, **kwargs):
        """Render the provided dictionary using the default template for the given action.
            The keyword argument 'mimetype' may be used to alter the response type.
        """
        from django.template import loader
        from django.template.context import RequestContext
        
        dictionary.update({
            'request':self._request,
            'controller_name':self._controller_name,
            'controller_actions':self._actions.keys(),
            'action_name':self._action_name,
            'controller_helper':self._helper,
            'flash': self._flash,
        })
        
        mimetype = kwargs.pop('mimetype', None)
        if mimetype:
            self._response['content-type'] = ('Content-Type', mimetype)

        if kwargs not in 'template_name':
            template_replacement_data = {'controller':self._template_prefix,
                                         'action':self._action_name,
                                         'ext':self._template_extension}

            if self._is_ajax and self._no_ajax_prefix==False:
                if hasattr(self._action_func, 'ajax_template_name'):
                    template_name = self._action_func.ajax_template_name
                else:
                    template_name = self._ajax_template_string % template_replacement_data
            elif hasattr(self._action_func,'template_name'):
                template_name = self._action_func.template_name
            else:
                template_name = self._template_string % template_replacement_data
            kwargs['template_name'] = template_name
            
        if 'context_instance' not in kwargs:
            kwargs['context_instance'] = RequestContext(self._request)

        self._template_context.update(dictionary)
        
        if getattr(self, '_before_render_runonce', False) == False and getattr(self._action_func,'disable_filters', False) == False:
            self._before_render_runonce = True
            before_render_response = self._before_render()
            if type(before_render_response) is dict:
                self._template_context.update(before_render_response)
            elif before_render_response is not None:
                return before_render_response

        # todo used to populate xheaders for debugging purposes
        # obj = getattr(self, '_object',None)
        # if obj is not None:
        #     populate_xheaders(self._request, self._response, obj.__class__, obj.pk)

        self._response.content = loader.render_to_string(dictionary=self._template_context, *args, **kwargs)
        return self._response
dataset/ETHPy150Open zeraien/django-url-framework/django_url_framework/controller.py/ActionController.__wrapped_render/swapped operands of `not in`