@blueprint.route('<STR_LIT>', methods=['<STR_LIT:GET>', '<STR_LIT:POST>'])<EOL>@register_breadcrumb(blueprint, '<STR_LIT>', _('<STR_LIT>'))<EOL>@login_required<EOL>def new():
form = GroupForm(request.form)<EOL>if form.validate_on_submit():<EOL><INDENT>try:<EOL><INDENT>group = Group.create(admins=[current_user], **form.data)<EOL>flash(_('<STR_LIT>', name=group.name), '<STR_LIT:success>')<EOL>return redirect(url_for("<STR_LIT>"))<EOL><DEDENT>except IntegrityError:<EOL><INDENT>flash(_('<STR_LIT>'), '<STR_LIT:error>')<EOL><DEDENT><DEDENT>return render_template(<EOL>"<STR_LIT>",<EOL>form=form,<EOL>)<EOL>
Create new group.