Commit 4356da19 authored by Samuel GAIST's avatar Samuel GAIST Committed by Flavio TARSETTI
Browse files

[team][templatetags] Pre-commit cleanup

parent 13ed9575
......@@ -26,19 +26,18 @@
###############################################################################
from django import template
from django.conf import settings
register = template.Library()
#--------------------------------------------------
# --------------------------------------------------
@register.inclusion_tag('team/panels/table.html', takes_context=True)
@register.inclusion_tag("team/panels/table.html", takes_context=True)
def team_table(context, objects, owner, id):
'''Composes a team list table
"""Composes a team list table
This panel primarily exists for user's team list page.
......@@ -50,22 +49,22 @@ def team_table(context, objects, owner, id):
id: The HTML id to set on the generated table. This is handy for the
filter functionality normally available on list pages.
'''
"""
return {
'request': context['request'],
'objects': objects,
'owner': owner,
'panel_id': id,
"request": context["request"],
"objects": objects,
"owner": owner,
"panel_id": id,
}
#--------------------------------------------------
# --------------------------------------------------
@register.inclusion_tag('team/panels/actions.html', takes_context=True)
@register.inclusion_tag("team/panels/actions.html", takes_context=True)
def team_actions(context, obj, display_count):
'''Composes the action buttons for a particular team
"""Composes the action buttons for a particular team
This panel primarily exists for showing action buttons for a given
team taking into consideration it is being displayed for a given user.
......@@ -78,29 +77,30 @@ def team_actions(context, obj, display_count):
display_count (bool): If true, displays the number of elements in the
team in a button
'''
"""
return {
'request': context['request'],
'display_count': display_count,
'object': obj,
"request": context["request"],
"display_count": display_count,
"object": obj,
}
#--------------------------------------------------
# --------------------------------------------------
@register.inclusion_tag('ui/contribution_list.html')
@register.inclusion_tag("ui/contribution_list.html")
def user_list(id):
return { 'panel_id': id,
'URL_PREFIX': settings.URL_PREFIX,
'finder_placeholder': 'Find an User...',
'owner': False,
return {
"panel_id": id,
"URL_PREFIX": settings.URL_PREFIX,
"finder_placeholder": "Find an User...",
"owner": False,
}
#--------------------------------------------------
# --------------------------------------------------
@register.simple_tag(takes_context=True)
def total_shares_for_user(context, team):
return team.total_shares(context['request'].user)
return team.total_shares(context["request"].user)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment