Open
Description
I using "group_by" sphinx functionality and want to have access to @count virtual sphinx attribute in django templates but I can't because django don't like "@" symbol in the beginning of the variable name. I mean I can't write in templates like this:
{% for item in results %}
Count of items in group: {{ item.sphinx.@count }}
{% endfor %}
I suggest to add a small patch to SphinxProxy class in models.py:
def count(self):
return self._sphinx['attrs'].get('@count')
I'm not sure that this is appropriate patch. What do you think?
Metadata
Metadata
Assignees
Labels
No labels