code: def urlnext(parser, token):
      
      bits = token.split_contents()
      if len(bits) < 2:
          raise template.TemplateSyntaxError(
              "'%s' takes at least one argument"
              " (path to a view)" % bits[0]
          )
      viewname = parser.compile_filter(bits[1])
      args = []
      kwargs = {}
      asvar = None
      bits = bits[2:]
      if len(bits) >= 2 and bits[-2] == "as":
          asvar = bits[-1]
          bits = bits[:-2]
  
      if len(bits):
          for bit in bits:
              match = kwarg_re.match(bit)
              if not match:
                  raise template.TemplateSyntaxError("Malformed arguments to url tag")
              name, value = match.groups()
              if name:
                  kwargs[name] = parser.compile_filter(value)
              else:
                  args.append(parser.compile_filter(value))
  
      return URLNextNode(viewname, args, kwargs, asvar)
docs: {% url %} copied from Django 1.7.