Example #1
0
def create():
    authz.require(authz.dataset_create())
    if app.config.get('DATASET_CREATION_DISABLED'):
        raise Forbidden("Sorry, dataset creation is disabled")
    dataset = Dataset.create(request_data(), request.account)
    db.session.commit()
    return redirect(url_for('.view', dataset=dataset.name))
Example #2
0
def create():
    authz.require(authz.dataset_create())
    data = request_content()
    try:
        dataset = Dataset.create(data, request.account)
        db.session.commit()
        return redirect(url_for('.view', dataset=dataset.name))
    except Invalid, inv:
        return handle_invalid(inv, new, data=data)
Example #3
0
def create():
    authz.require(authz.dataset_create())
    data = request_content()
    try:
        dataset = Dataset.create(data, request.account)
        db.session.commit()
        return redirect(url_for('.view', dataset=dataset.name))
    except Invalid, inv:
        return handle_invalid(inv, new, data=data)
Example #4
0
def create():
    authz.require(authz.dataset_create())
    dataset = Dataset.create(request_data(), request.account)
    db.session.commit()
    return redirect(url_for('.view', dataset=dataset.name))
Example #5
0
def new():
    authz.require(authz.dataset_create())
    return render_template('dataset/new.html')
Example #6
0
def new():
    authz.require(authz.dataset_create())
    return render_template('dataset/new.html')