Changes between Initial Version and Version 1 of Ticket #21077, comment 1


Ignore:
Timestamp:
09/10/2013 02:58:14 AM (20 months ago)
Author:
marfire
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21077, comment 1

    initial v1  
    771. Only allow valid Python identifiers to be named arguments in `simple_tag` tags. If users want something else they'll have to forgo using `simple_tag`. This isn't backwards compatible, though, and is more restrictive than we might like.
    88
    9 2. Allow named arguments to be invalid Python identifiers, acknowledging that users can simply use `**kwargs` in their function signatures. In this case, I agree with semenov that we should be more permissive in what we accept; in particular, I don't see any reason to outlaw dashes. This is backwards compatible and more functional, though it seems hackish to only allow the `**kwargs` style of function signature is these cases.
     92. Allow named arguments to be invalid Python identifiers, acknowledging that users can simply use `**kwargs` in their function signatures. In this case, I agree with semenov that we should be more permissive in what we accept; in particular, I don't see any reason to outlaw dashes. This is backwards compatible and more functional, though it seems hackish that only the `**kwargs` style of function signature can be used with named arguments that aren't Python identifiers.
    1010
    1111It looks like this same regular expression is used for other tags with keyword arguments (`with`, `include`, `blocktrans`, `url`) so it's probably worth thinking about any implications for those cases as well.
Back to Top