Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smarter_split parsing problems #4

Open
svevang opened this issue Jul 26, 2011 · 0 comments
Open

smarter_split parsing problems #4

svevang opened this issue Jul 26, 2011 · 0 comments

Comments

@svevang
Copy link

svevang commented Jul 26, 2011

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.


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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant