Skip to content

Commit

Permalink
fixed: build assets path
Browse files Browse the repository at this point in the history
  • Loading branch information
moogoo78 committed Apr 30, 2024
1 parent 33200bd commit f03b841
Show file tree
Hide file tree
Showing 16 changed files with 10 additions and 1,956 deletions.
3 changes: 3 additions & 0 deletions app/blueprints/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ def robots_txt():
return send_from_directory(os.path.join(current_app.static_folder), 'robots.txt')


@base.route('/assets/<path:filename>')
def assets(filename):
return send_from_directory('/build/data-search', filename)

def get_image(hast_id, short_name):
import urllib.request
Expand Down
5 changes: 1 addition & 4 deletions app/blueprints/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,4 @@ def specimen_image(locale, entity_key):
@frontend.route('/<lang_code>/data')
def data_search(lang_code):
#print(mimetypes.knownfiles, flush=True)
options = {
'type_status': Unit.TYPE_STATUS_CHOICES,
}
return render_template('data-search.html', options=options)
return render_template('data-search.html')
1 change: 1 addition & 0 deletions app/helpers_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def make_specimen_query(filtr):
value1 = vs[0]
value2 = vs[1]
stmt = stmt.where(cast(Record.field_number.regexp_replace('[^0-9]+', '', flags='g'), BigInteger)>=int(value1), cast(Record.field_number.regexp_replace('[^0-9]+', '', flags='g'), BigInteger)<=int(value2), Record.field_number.regexp_replace('[^0-9]+', '', flags='g') != '')
print(stmt, '---', flush=True)
else:
stmt = stmt.where(Record.field_number==value)
#stmt = stmt.where(cast(Record.field_number.regexp_replace('[^0-9]+', '', flags='g'), Integer)==value)
Expand Down
1 change: 1 addition & 0 deletions app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ <h3>Title</h3>
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat.</p>
#}
</ul>
</div>
</div>
<!-- /OFFCANVAS -->
Expand Down
4 changes: 2 additions & 2 deletions app/templates/data-search.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
{#<script src="{{ url_for('admin.static_build', filename='record.min.js') }}"></script>#}
{% endif %}

<script type="module" crossorigin src="{{ url_for('static', filename='data-search-svelte/index.js') }}"></script>
<script type="module" crossorigin src="{{ url_for('base.assets', filename='index.js') }}"></script>
{% endblock %}

{% block style %}
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha256-kLaT2GOSpHechhsozzB+flnD+zUyjE2LlfWPgU04xyI=" crossorigin=""/>
<link rel="stylesheet" href="{{ url_for('static', filename='css/data-search.css') }}">

<link rel="stylesheet" href="{{ url_for('static', filename='data-search-svelte/index.css') }}">
<link rel="stylesheet" href="{{ url_for('base.assets', filename='index.css') }}">
{% endblock %}

{% block main %}
Expand Down
3 changes: 0 additions & 3 deletions client/client-tmp/admin-react/.babelrc

This file was deleted.

1 change: 0 additions & 1 deletion client/client-tmp/admin-react/build/record.min.js

This file was deleted.

23 changes: 0 additions & 23 deletions client/client-tmp/admin-react/package.json

This file was deleted.

101 changes: 0 additions & 101 deletions client/client-tmp/admin-react/src/components/DataSearch.js

This file was deleted.

Loading

0 comments on commit f03b841

Please sign in to comment.