# Path: djedi/compat.py
# def generic_tag_compiler(parser, token, params, varargs, varkw, defaults,
#                          name, takes_context, node_class):
#     """
#     Returns a template.Node subclass.
# 
#     This got inlined into django.template.library since Django since 1.9, this here
#     is a copypasta replacement:
#     https://github.com/django/django/blob/stable/1.8.x/django/template/base.py#L1089
#     """
#     bits = token.split_contents()[1:]
#     args, kwargs = parse_bits(parser, bits, params, varargs, varkw,
#                               defaults, takes_context, name)
#     return node_class(takes_context, args, kwargs)
# 
# def getargspec(func):
#     spec = getfullargspec(func)
#     return ArgSpec(
#         args=spec.args,
#         varargs=spec.varargs,
#         keywords=spec.varkw,
#         defaults=spec.defaults,
#     )


from functools import partial
from django import template
from django.template import Context
from django.template.base import Node, TemplateSyntaxError
from ..compat import generic_tag_compiler, getargspec
        return render
    """
    def dec(func):
        params, varargs, varkw, defaults = getargspec(func)

        class SimpleNode(Node):

            def __init__(self, takes_context, args, kwargs):
                self.takes_context = takes_context
                self.args = args
                self.kwargs = kwargs

                resolved_args, resolved_kwargs = self.get_resolved_arguments(Context({}))

                self.resolved_args = resolved_args
                self.resolved_kwargs = resolved_kwargs
                self.render_func = func(*resolved_args, **resolved_kwargs)

            def get_resolved_arguments(self, context):
                resolved_args = [var.resolve(context) for var in self.args]
                if self.takes_context:
                    resolved_args = [context] + resolved_args
                resolved_kwargs = dict((k, v.resolve(context)) for k, v in self.kwargs.items())
                return resolved_args, resolved_kwargs

            def render(self, context):
                return self.render_func(context)

        function_name = (name or
                         getattr(func, '_decorated_function', func).__name__)

# Path: djedi/compat.py
# def generic_tag_compiler(parser, token, params, varargs, varkw, defaults,
#                          name, takes_context, node_class):
#     """
#     Returns a template.Node subclass.
# 
#     This got inlined into django.template.library since Django since 1.9, this here
#     is a copypasta replacement:
#     https://github.com/django/django/blob/stable/1.8.x/django/template/base.py#L1089
#     """
#     bits = token.split_contents()[1:]
#     args, kwargs = parse_bits(parser, bits, params, varargs, varkw,
#                               defaults, takes_context, name)
#     return node_class(takes_context, args, kwargs)
# 
# def getargspec(func):
#     spec = getfullargspec(func)
#     return ArgSpec(
#         args=spec.args,
#         varargs=spec.varargs,
#         keywords=spec.varkw,
#         defaults=spec.defaults,
#     )


# Path: djedi/templatetags/template.py
from functools import partial
from django import template
from django.template import Context
from django.template.base import Node, TemplateSyntaxError
from ..compat import generic_tag_compiler, getargspec

        return render
    """
    def dec(func):
        params, varargs, varkw, defaults = getargspec(func)

        class SimpleNode(Node):

            def __init__(self, takes_context, args, kwargs):
                self.takes_context = takes_context
                self.args = args
                self.kwargs = kwargs

                resolved_args, resolved_kwargs = self.get_resolved_arguments(Context({}))

                self.resolved_args = resolved_args
                self.resolved_kwargs = resolved_kwargs
                self.render_func = func(*resolved_args, **resolved_kwargs)

            def get_resolved_arguments(self, context):
                resolved_args = [var.resolve(context) for var in self.args]
                if self.takes_context:
                    resolved_args = [context] + resolved_args
                resolved_kwargs = dict((k, v.resolve(context)) for k, v in self.kwargs.items())
                return resolved_args, resolved_kwargs

            def render(self, context):
                return self.render_func(context)

        function_name = (name or
                         getattr(func, '_decorated_function', func).__name__)

        compile_func = partial(generic_tag_compiler,