#36465: Variables containing dashes are now allowed by the parser
-------------------------------------+-------------------------------------
     Reporter:  Baptiste Mispelon    |                     Type:  Bug
       Status:  new                  |                Component:  Template
                                     |  system
      Version:  dev                  |                 Severity:  Release
                                     |  blocker
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 This was originally reported in
 https://code.djangoproject.com/ticket/35816#comment:19

 As noted in the link above, the fix for #35816 introduced was I believe to
 be an unintended side-effect to the parsing rules for variable names.

 The documentation for variable names [1] states that:

 > Variable names consist of any combination of alphanumeric characters and
 the underscore ("_") but may not start with an underscore, and may not be
 a number. The dot (".") also appears in variable sections, although that
 has a special meaning, as indicated below. Importantly, you cannot have
 spaces or punctuation characters in variable names.

 My understanding is that dashes (`-`) do not count as alphanumeric and
 should therefore not be allowed in a variable name.


 [1]
 https://docs.djangoproject.com/en/dev/ref/templates/language/#variables
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36465>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019779799a5f-e2ac2c17-0197-4bd0-a761-22a153465730-000000%40eu-central-1.amazonses.com.

Reply via email to