Skip to content

Commit

Permalink
Added __version__, bumped it to 0.12
Browse files Browse the repository at this point in the history
Closes #108
  • Loading branch information
Simon Willison committed Nov 16, 2017
1 parent e6ca885 commit 228bce8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions datasette/__init__.py
@@ -0,0 +1 @@
from datasette.version import __version_info__, __version__ # noqa
3 changes: 3 additions & 0 deletions datasette/app.py
Expand Up @@ -28,6 +28,7 @@
sqlite_timelimit,
validate_sql_select,
)
from .version import __version__

app_root = Path(__file__).parent.parent

Expand Down Expand Up @@ -223,6 +224,7 @@ async def view_get(self, request, name, hash, **kwargs):
'url_json': path_with_ext(request, '.json'),
'url_jsono': path_with_ext(request, '.jsono'),
'metadata': self.ds.metadata,
'datasette_version': __version__,
}}
r = self.jinja.render(
template,
Expand Down Expand Up @@ -279,6 +281,7 @@ async def get(self, request, as_json):
request,
databases=databases,
metadata=self.ds.metadata,
datasette_version=__version__,
)


Expand Down
2 changes: 1 addition & 1 deletion datasette/templates/base.html
Expand Up @@ -12,7 +12,7 @@
{% endblock %}

<div class="ft">
Powered by <a href="https://github.com/simonw/datasette">Datasette</a>
Powered by <a href="https://github.com/simonw/datasette" title="Datasette v{{ datasette_version }}">Datasette</a>
{% if query_ms %}&middot; Query took {{ query_ms|round(3) }}ms{% endif %}
{% if metadata.license %}&middot; Data license:
{% if metadata.license_url %}
Expand Down
2 changes: 2 additions & 0 deletions datasette/version.py
@@ -0,0 +1,2 @@
__version_info__ = (0, 12)
__version__ = '.'.join(map(str, __version_info__))
3 changes: 2 additions & 1 deletion setup.py
@@ -1,10 +1,11 @@
from setuptools import setup, find_packages
from datasette import __version__

setup(
name='datasette',
description='An instant JSON API for your SQLite databases',
author='Simon Willison',
version='0.11',
version=__version__,
license='Apache License, Version 2.0',
url='https://github.com/simonw/datasette',
packages=find_packages(),
Expand Down

0 comments on commit 228bce8

Please sign in to comment.