MCPcopy Index your code
hub / github.com/coleifer/sqlite-web / table_create

Function table_create

sqlite_web/sqlite_web.py:531–544  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

529
530@app.route('/create-table/', methods=['POST'])
531def table_create():
532 table = (request.form.get('table_name') or '').strip()
533 if not table:
534 flash('Table name is required.', 'danger')
535 dest = request.form.get('redirect') or url_for('index')
536 dest = '/' + dest.lstrip('/') # idiot vulnerability "researchers".
537 return redirect(dest)
538
539 try:
540 get_dataset()[table]
541 except Exception as exc:
542 flash('Error: %s' % str(exc), 'danger')
543 app.logger.exception('Error attempting to create table.')
544 return redirect(url_for('table_import', table=table))
545
546@app.route('/<table>/')
547@require_table

Callers

nothing calls this directly

Calls 1

get_datasetFunction · 0.85

Tested by

no test coverage detected