Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove bootstrap 2 and 3 #2477

Merged
merged 4 commits into from
Jul 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix failing tests for bootstrap4
  • Loading branch information
samuelhwilliams committed Jul 23, 2024
commit cbedb228f5d66755c82388e42c47bff25f917191
3 changes: 3 additions & 0 deletions flask_admin/templates/bootstrap4/admin/model/layout.html
Original file line number Diff line number Diff line change
@@ -30,6 +30,9 @@

{% macro filter_form() %}
<form id="filter_form" method="GET" action="{{ return_url }}">
{% for arg_name, arg_value in extra_args.items() %}
<input type="hidden" name="{{ arg_name }}" value="{{ arg_value }}">
{% endfor %}
{% if sort_column is not none %}
<input type="hidden" name="sort" value="{{ sort_column }}">
{% endif %}
4 changes: 2 additions & 2 deletions flask_admin/tests/test_base.py
Original file line number Diff line number Diff line change
@@ -164,7 +164,7 @@ def test_admin_customizations(app, babel):

# test custom static_url_path
with app.test_request_context('/'):
rv = client.get(url_for('admin.static', filename='bootstrap/bootstrap4/css/bootstrap.css'))
rv = client.get(url_for('admin.static', filename='bootstrap/bootstrap4/css/bootstrap.min.css'))
assert rv.status_code == 200


@@ -400,7 +400,7 @@ def test_root_mount(app, babel):

# test static files when url='/'
with app.test_request_context('/'):
rv = client.get(url_for('admin.static', filename='bootstrap/bootstrap4/css/bootstrap.css'))
rv = client.get(url_for('admin.static', filename='bootstrap/bootstrap4/css/bootstrap.min.css'))
rv.close()
assert rv.status_code == 200

5 changes: 2 additions & 3 deletions flask_admin/tests/test_host_matching.py
Original file line number Diff line number Diff line change
@@ -132,7 +132,7 @@ def test_mounting_on_host(app, babel, initialise_using_init_app):
# Check that static assets are embedded with the expected (relative) URLs
assert (
b'<link href="/static/admin/bootstrap/bootstrap4/swatch'
b'/default/bootstrap.min.css?v=2.3.2" rel="stylesheet">'
b'/default/bootstrap.min.css?v=4.2.1"'
in rv.data
)
assert (
@@ -186,8 +186,7 @@ def test_mounting_on_wildcard_host(app, babel, initialise_using_init_app):
# Check that static assets are embedded with the expected (relative) URLs
assert (
b'<link href="/static/admin/bootstrap/bootstrap4/swatch'
b'/default/bootstrap.min.css?v=2.3.2" '
b'rel="stylesheet">'
b'/default/bootstrap.min.css?v=4.2.1"'
in rv.data
)
assert (
Loading