Skip to content
Snippets Groups Projects
Commit cf48331a authored by Samuel GAIST's avatar Samuel GAIST Committed by Flavio TARSETTI
Browse files

[databases][templatetags] Pre-commit cleanup

parent 0145bfb7
No related branches found
No related tags found
2 merge requests!350Cleanup databases,!342Django 3 migration
...@@ -28,13 +28,12 @@ ...@@ -28,13 +28,12 @@
from django import template from django import template
register = template.Library() register = template.Library()
@register.inclusion_tag('databases/panels/table.html', takes_context=True) @register.inclusion_tag("databases/panels/table.html", takes_context=True)
def database_table(context, objects, id): def database_table(context, objects, id):
'''Composes a database list table """Composes a database list table
This panel primarily exists for user's database list page. This panel primarily exists for user's database list page.
...@@ -44,18 +43,14 @@ def database_table(context, objects, id): ...@@ -44,18 +43,14 @@ def database_table(context, objects, id):
id: The HTML id to set on the generated table. This is handy for the id: The HTML id to set on the generated table. This is handy for the
filter functionality normally available on list pages. filter functionality normally available on list pages.
''' """
return dict( return dict(request=context["request"], objects=objects, panel_id=id,)
request=context['request'],
objects=objects,
panel_id=id,
)
@register.inclusion_tag('databases/panels/actions.html', takes_context=True) @register.inclusion_tag("databases/panels/actions.html", takes_context=True)
def database_actions(context, object, display_count): def database_actions(context, object, display_count):
'''Composes the action buttons for a particular database """Composes the action buttons for a particular database
This panel primarily exists for showing action buttons for a given This panel primarily exists for showing action buttons for a given
database taking into consideration it is being displayed for a given user. database taking into consideration it is being displayed for a given user.
...@@ -68,9 +63,5 @@ def database_actions(context, object, display_count): ...@@ -68,9 +63,5 @@ def database_actions(context, object, display_count):
display the number of protocols as a button (useful for the list display the number of protocols as a button (useful for the list
view) view)
''' """
return dict( return dict(request=context["request"], object=object, display_count=display_count,)
request=context['request'],
object=object,
display_count=display_count,
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment