$def with (work, edition) $ username = ctx.user and ctx.user.key.split('/')[-1] $ rating = work and username and work.get_users_rating(username) $ edition_key = edition.key if edition else ""
$ NUM_STARS = 5 $for star in range(1, NUM_STARS + 1)
$if rating: