How do I access dictionary keys that contain hyphens from within a Django template?

前端 未结 3 1931
执笔经年
执笔经年 2020-12-04 01:24

We have a system built on a custom database, where many of the attributes are named containing hyphens, ie:

user-name
phone-number

These pr

3条回答
  •  再見小時候
    2020-12-04 02:01

    Unfortunately, I think you may be out of luck. From the docs:

    Variable names must consist of any letter (A-Z), any digit (0-9), an underscore or a dot.

提交回复
热议问题