You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a template tag that uses a little bit of JSON as a keyword arg. I'm getting exceptions thrown in the Arg class code. I believe I have the issue traced to the regular expressions used in the smarter_split function.
In [37]: tag_args = "tagname asdf='embedded=true&locations=[\"blah\", \"asdf\"]'"
In [38]: print tag_args
tagname asdf='embedded=true&locations=["blah", "asdf"]'
In [39]: list(smarter_split(tag_args))
Out[39]: [u'tagname', [u'asdf=\'embedded=true&locations=["blah"', u'"asdf"]\'']]
Later on , the code in Arg tries to use the result of the string split and I get:
line 191, in _process_named_args
arg = self._meta.named_args[arg_name]
TypeError: unhashable type: 'list'
So it seems that the regex should not be returning a list?
Thanks a lot!
The text was updated successfully, but these errors were encountered:
Hello,
I'm trying to create a template tag that uses a little bit of JSON as a keyword arg. I'm getting exceptions thrown in the Arg class code. I believe I have the issue traced to the regular expressions used in the
smarter_split
function.Later on , the code in Arg tries to use the result of the string split and I get:
So it seems that the regex should not be returning a list?
Thanks a lot!
The text was updated successfully, but these errors were encountered: