@communities.command()<EOL>@click.argument('<STR_LIT>')<EOL>@click.argument('<STR_LIT>', type=click.File('<STR_LIT:rb>'))<EOL>@with_appcontext<EOL>def addlogo(community_id, logo):
<EOL>c = Community.get(community_id)<EOL>if not c:<EOL><INDENT>click.secho('<STR_LIT>'.format(community_id),<EOL>fg='<STR_LIT>')<EOL>return<EOL><DEDENT>ext = save_and_validate_logo(logo, logo.name, c.id)<EOL>c.logo_ext = ext<EOL>db.session.commit()<EOL>
Add logo to the community.