Skip to content

Commit

Permalink
using named args
Browse files Browse the repository at this point in the history
  • Loading branch information
anxolerd committed Aug 27, 2015
1 parent f3a6512 commit aa2ecba
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions project/bl/uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ def delete(self):
def get_url(self, is_thumbnail=False):
model = self.model
img_type = 'thumb' if is_thumbnail else 'full'
filepath = '{}/{}/{}.{}'.format(
model.img_category.name,
img_type,
model.name.hex,
model.ext,
filepath = '{category}/{img_type}/{name}.{ext}'.format(
category=model.img_category.name,
img_type=img_type,
name=model.name.hex,
ext=model.ext,
)
return url_for('get_file', path=filepath, _external=True)

0 comments on commit aa2ecba

Please sign in to comment.