def edit_resource(resource_identifier): """edit a resource""" resource = Resource.query.filter_by(identifier=resource_identifier).first() if resource is None: flash(gettext('Resource not found'), 'danger') return redirect(request.referrer) probes_avail = views.get_probes_avail(resource.resource_type, resource) suggestions = json.dumps( Recipient.get_suggestions('email', g.user.username)) return render_template('edit_resource.html', lang=g.current_lang, resource=resource, suggestions=suggestions, probes_avail=probes_avail)
def edit_resource(resource_identifier): """edit a resource""" resource = Resource.query.filter_by(identifier=resource_identifier).first() if resource is None: flash(gettext('Resource not found'), 'danger') return redirect(request.referrer) probes_avail = views.get_probes_avail(resource.resource_type, resource) suggestions = json.dumps(Recipient.get_suggestions('email', g.user.username)) return render_template('edit_resource.html', lang=g.current_lang, resource=resource, suggestions=suggestions, probes_avail=probes_avail)