reviewboard.accounts.templatetags.accounts¶
Account-related template tags.
Render the user’s display name.
Parameters: - context (django.template.context.Context) – The template rendering context.
- user (django.contrib.auth.models.User) – The user whose display name is to be rendered.
Returns: The user’s display name.
Return type: unicode
Return JSON-serialized data for a new RB.UserSession instance.
This is used on all Review Board pages to construct the attributes passed to
RB.UserSession()
. This contains information on the user and their authentication state, important API URLs that need to be accessed, timezone information, avatar URLs, and various user preferences.Parameters: context (django.template.Context) – The current template context. Returns: The JSON-serialized attribute data. Return type: django.utils.safestring.SafeText