Skip to content

Commit

Permalink
Tidy up some string expansions
Browse files Browse the repository at this point in the history
  • Loading branch information
paltman committed Oct 24, 2014
1 parent 5c53f0f commit ca5bcd6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions phileo/templatetags/phileo_tags.py
Expand Up @@ -27,7 +27,7 @@ def __init__(self, user, model_list, varname):
if len(model_list) == 0:
# These need to look like strings, otherwise they will be treated as variables
# when they are `resolve()`d later
model_list = ['"%s"' % model for model in LIKABLE_MODELS]
model_list = ['"{}"'.format(model) for model in LIKABLE_MODELS]

self.model_list = [template.Variable(m) for m in model_list]
self.varname = varname
Expand Down Expand Up @@ -88,8 +88,8 @@ def render(self, context):
}

return render_to_string([
'phileo/%s/%s.html' % (app_name, model_name),
'phileo/%s/like.html' % (app_name),
'phileo/{}/{}.html'.format(app_name, model_name),
'phileo/{}/like.html'.format(app_name),
'phileo/_like.html',
], like_context, context)

Expand Down

0 comments on commit ca5bcd6

Please sign in to comment.