mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Renamed to 'datasette'
This commit is contained in:
parent
292f140a4f
commit
e7e50875d3
22 changed files with 693 additions and 693 deletions
|
|
@ -1 +1 @@
|
||||||
recursive-include immutabase/static *
|
recursive-include datasette/static *
|
||||||
|
|
|
||||||
BIN
datasette/.DS_Store
vendored
Normal file
BIN
datasette/.DS_Store
vendored
Normal file
Binary file not shown.
|
|
@ -466,13 +466,13 @@ def app_factory(files, num_threads=3):
|
||||||
jinja = SanicJinja2(
|
jinja = SanicJinja2(
|
||||||
app,
|
app,
|
||||||
loader=FileSystemLoader([
|
loader=FileSystemLoader([
|
||||||
str(app_root / 'immutabase' / 'templates')
|
str(app_root / 'datasette' / 'templates')
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
app.add_route(IndexView.as_view(files, jinja, executor), '/')
|
app.add_route(IndexView.as_view(files, jinja, executor), '/')
|
||||||
# TODO: /favicon.ico and /-/static/ deserve far-future cache expires
|
# TODO: /favicon.ico and /-/static/ deserve far-future cache expires
|
||||||
app.add_route(favicon, '/favicon.ico')
|
app.add_route(favicon, '/favicon.ico')
|
||||||
app.static('/-/static/', str(app_root / 'immutabase' / 'static'))
|
app.static('/-/static/', str(app_root / 'datasette' / 'static'))
|
||||||
app.add_route(
|
app.add_route(
|
||||||
DatabaseView.as_view(files, jinja, executor),
|
DatabaseView.as_view(files, jinja, executor),
|
||||||
'/<db_name:[^/\.]+?><as_json:(.jsono?)?$>'
|
'/<db_name:[^/\.]+?><as_json:(.jsono?)?$>'
|
||||||
|
|
@ -6,7 +6,7 @@ from .app import app_factory, ensure_build_metadata
|
||||||
@click.group(cls=DefaultGroup, default='serve', default_if_no_args=True)
|
@click.group(cls=DefaultGroup, default='serve', default_if_no_args=True)
|
||||||
def cli():
|
def cli():
|
||||||
"""
|
"""
|
||||||
Immutabase!
|
Datasette!
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -26,7 +26,7 @@ def serve(files, host, port, debug, reload):
|
||||||
"""Serve up specified database files with a web UI"""
|
"""Serve up specified database files with a web UI"""
|
||||||
if reload:
|
if reload:
|
||||||
import hupper
|
import hupper
|
||||||
hupper.start_reloader('immutabase.cli.serve')
|
hupper.start_reloader('datasette.cli.serve')
|
||||||
|
|
||||||
click.echo('Serve! files={} on port {}'.format(files, port))
|
click.echo('Serve! files={} on port {}'.format(files, port))
|
||||||
app = app_factory(files)
|
app = app_factory(files)
|
||||||
6
setup.py
6
setup.py
|
|
@ -1,10 +1,10 @@
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='immutabase',
|
name='datasette',
|
||||||
version='0.1',
|
version='0.1',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
package_data={'immutabase': ['templates/*.html']},
|
package_data={'datasette': ['templates/*.html']},
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'click==6.7',
|
'click==6.7',
|
||||||
|
|
@ -15,7 +15,7 @@ setup(
|
||||||
],
|
],
|
||||||
entry_points='''
|
entry_points='''
|
||||||
[console_scripts]
|
[console_scripts]
|
||||||
immutabase=immutabase.cli:cli
|
datasette=datasette.cli:cli
|
||||||
''',
|
''',
|
||||||
setup_requires=['pytest-runner'],
|
setup_requires=['pytest-runner'],
|
||||||
tests_require=['pytest'],
|
tests_require=['pytest'],
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from immutabase import app
|
from datasette import app
|
||||||
import pytest
|
import pytest
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue