Skip to content

Onclick fix6#2785

Open
samialfattani wants to merge 29 commits intopallets-eco:masterfrom
samialfattani:onclick-fix6
Open

Onclick fix6#2785
samialfattani wants to merge 29 commits intopallets-eco:masterfrom
samialfattani:onclick-fix6

Conversation

@samialfattani
Copy link
Copy Markdown

@samialfattani samialfattani commented Feb 7, 2026

Fixes #2556

This PR has been rebased many times. I hope this time it will be easier to review and merge.

  • All onclick= codes are removed.
  • All javascript:void(0) codes are removed.
  • The optimal CSP policy is mentioned in the Docs.

Comment thread flask_admin/templates/bootstrap4/admin/model/modals/create.html Outdated
Comment thread flask_admin/templates/bootstrap4/admin/model/modals/create.html Outdated
Comment thread flask_admin/templates/bootstrap4/admin/model/inline_field_list.html Outdated
Comment thread flask_admin/templates/bootstrap4/admin/model/inline_form.html Outdated
Comment thread flask_admin/templates/bootstrap4/admin/model/inline_list_base.html
@ElLorans
Copy link
Copy Markdown
Contributor

ElLorans commented Mar 6, 2026

Does this impact the csp example? Why the .mo file?

Sami A. Alfattani and others added 4 commits March 7, 2026 13:57
77 is just added by mistake

Co-authored-by: Lorenzo <lorenzo.cerreta@gmail.com>
noted

Co-authored-by: Lorenzo <lorenzo.cerreta@gmail.com>
….html


sorry for annoying

Co-authored-by: Lorenzo <lorenzo.cerreta@gmail.com>
ok

Co-authored-by: Lorenzo <lorenzo.cerreta@gmail.com>
@samialfattani
Copy link
Copy Markdown
Author

Does this impact the csp example? Why the .mo file?

what do you mean ?? i never change any .mo file in this PR !

@hasansezertasan
Copy link
Copy Markdown
Member

what do you mean ?? i never change any .mo file in this PR !

There seem to be a change in "flask_admin/translations/en/LC_MESSAGES/admin.mo" file.

@samialfattani
Copy link
Copy Markdown
Author

what do you mean ?? i never change any .mo file in this PR !

There seem to be a change in "flask_admin/translations/en/LC_MESSAGES/admin.mo" file.

it was a mistake, now the admin.mo is reverted from previouse commit

Comment thread doc/advanced.rst
Comment thread flask_admin/templates/bootstrap4/admin/model/layout.html Outdated
Comment thread flask_admin/tests/csp/files/dir1/dum.txt Outdated
Comment thread flask_admin/tests/csp/conftest.py Outdated
Comment thread flask_admin/tests/csp/test_csp.py Outdated
bool_field = db.Column(db.Boolean)

def __unicode__(self):
return self.test1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return self.test1

Comment thread flask_admin/tests/csp/test_csp.py Outdated
Comment thread flask_admin/tests/csp/test_csp.py Outdated
Comment thread flask_admin/tests/csp/test_csp.py Outdated
@samialfattani
Copy link
Copy Markdown
Author

could anyone please help me with this??? why it is failing test with py310+. knowing that it's succeeding when i run them locally on docker:

docker compose -f .devcontainer/tests/docker-compose.yaml run --remove-orphans app uv run tox run -e py311

@ElLorans
Copy link
Copy Markdown
Contributor

I can fix it this week

@ElLorans
Copy link
Copy Markdown
Contributor

Sorry, crazy week. I just need to find the time to use skip_or_return_session_or_db from tests/conftest.py. You can refer to other tests using it so that you can skip tests when the matrix is combining db.session and flask-sqla-lite, which raises an error to prevent bugs since flask-sqla-lite.session, unlike flask-sqla.session, is not scoped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Convert onclick scripts event listeners

3 participants