Skip to content

Commit

Permalink
fix: move example plugins to correct directory, dynamically set datas…
Browse files Browse the repository at this point in the history
…ette version string
  • Loading branch information
hydrosquall committed Jul 11, 2023
1 parent a134f91 commit 4b6fa80
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion datasette/static/datasette-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const DOM_SELECTORS = {
* For now, manually synced with datasette/version.py
*/
const datasetteManager = {
VERSION: '1.0a2',
VERSION: window.datasetteVersion,


// TODO: Should order of registration matter more?
Expand Down
1 change: 1 addition & 0 deletions datasette/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{% for url in extra_css_urls %}
<link rel="stylesheet" href="{{ url.url }}"{% if url.get("sri") %} integrity="{{ url.sri }}" crossorigin="anonymous"{% endif %}>
{% endfor %}
<script> window.datasetteVersion = '{{ datasette_version }}'; </script>
<script src="{{ urls.static('datasette-manager.js') }}" defer></script>
{% for url in extra_js_urls %}
<script {% if url.module %}type="module" {% endif %}src="{{ url.url }}"{% if url.get("sri") %} integrity="{{ url.sri }}" crossorigin="anonymous"{% endif %}></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# Test command:
# datasette fixtures.db --plugins-dir=demos/plugins/
# datasette fixtures.db \ --plugins-dir=demos/plugins/
# \ --static static:demos/plugins/static

# Create a set with view names that qualify for this JS, since plugins won't do anything on other pages
# Same pattern as in Nteract data explorer
Expand Down

0 comments on commit 4b6fa80

Please sign in to comment.