My Django app is interacting with an API and displaying results in the templates.
The API result has some normal Key Value pairs and some custom fields which have a Key in double and single quotations.
The key is formatted as " 'custom_field_123' " in the result JSON:
{'cost_price': '0.00', "'asset_field_1234'": None, "'asset_field_5768'": None}
I know this isn't correct JSON format but it's what I have to deal with.
In the Django templates I can use:
<p>{{tower.name}}</p>
for regular format keys. But the template language will not recognize:
<p>{{tower.'custom_field_123'}}</p>
Or
<p>{{tower.('custom_field_123')}}</p>
Is there a way to access these values or will I have to rename the keys in quotations to access them in the template.