Base¶
Base is the core app that serves the main pages of the visualization application. It also gathers together some miscellaneous utilities and shared classes that are used by other apps.
Views¶
Template Tags¶
Checks the current request to see if it matches a pattern. If so, it returns ‘active’.
To use, add this to your Django template:
{% load tags %} <li class="{% active request home %}"><a href="/">Home</a></li>
Models¶
-
class
msgvis.apps.base.models.
MappedValuesQuerySet
(*args, **kwargs)[source]¶ A special ValuesQuerySet that can re-map the dictionary keys while they are bing iterated over.
valuesQuerySet = queryset.values('some__ugly__field__expression') mapped = MappedQuerySet.create_from(valuesQuerySet, { 'some__ugly__field__expression': 'nice_expression' }) mapped[0] # { 'nice_expression': 5 }