satyaveerendra / djangosearch

Automatically exported from code.google.com/p/djangosearch
0 stars 0 forks source link

_relevance attribute can't be accessed within template #14

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When looking at a result in a Django template, hitting result._relevance throws 
a 
TempalteSyntaxError: Variables and attributes may not begin with underscores: 
'result._relevance'

Is there any way around this?

Original issue reported on code.google.com by m...@pixelcort.com on 22 Jan 2009 at 5:21

GoogleCodeExporter commented 8 years ago
The workaround is to set result.relevance to result._relevance and then use the 
new one in the template.

Original comment by m...@pixelcort.com on 22 Jan 2009 at 5:29