Skip to content

Commit

Permalink
fixed comment and naming
Browse files Browse the repository at this point in the history
  • Loading branch information
d.choban committed Feb 23, 2018
1 parent fb846f0 commit 9860ec1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions arctic/templatetags/arctic_pagination_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_current_app(context):
return current_app


def strToBool(val):
def str_to_bool(val):
"""
Helper function to turn a string representation of "true" into
boolean True.
Expand Down Expand Up @@ -73,9 +73,9 @@ def render(self, context):
if range_length is not None:
range_length = int(range_length)

show_prev_next = strToBool(kwargs.get("show_prev_next", "true"))
show_first_last = strToBool(kwargs.get("show_first_last", "false"))
show_index_range = strToBool(kwargs.get("show_index_range", "false"))
show_prev_next = str_to_bool(kwargs.get("show_prev_next", "true"))
show_first_last = str_to_bool(kwargs.get("show_first_last", "false"))
show_index_range = str_to_bool(kwargs.get("show_index_range", "false"))

# Generage our viewable page range
page_count = page.paginator.num_pages
Expand Down Expand Up @@ -134,7 +134,6 @@ def render(self, context):
def arctic_paginate(parser, token):
"""
Renders a Page object as a Twitter Bootstrap styled pagination bar.
Compatible with Bootstrap 3.x only.
Example::
{% bootstrap_paginate page_obj range=10 %}
Named Parameters::
Expand Down

0 comments on commit 9860ec1

Please sign in to comment.