$def with (work, edition=None, redir_url=None, id='', rating=None) $ username = ctx.user and ctx.user.key.split('/')[-1] $if rating is None and work and username: $ rating = work.get_users_rating(username) $ edition_key = edition.key if edition else "" $ form_id = "ratingsForm%s" % id