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

Fix docs: Cookbook form_ajax_refs definition #659

Merged
merged 1 commit into from
Oct 29, 2023

Conversation

j123b567
Copy link
Contributor

I really don't understand it deeply but the original code example for form_ajax_refs from the cookbook does not work.
It is not documented anywhere why, I just found the answer in tests/test_ajax.py.

  • There is no element child in the Parent class but there is a children relationship
  • "order_by": ("id",) just does not work (sqlalchemy.exc.ArgumentError: ORDER BY expression expected, got ('id',).) but "order_by": "id" works

It would be also fine to add __str__ method to the example implementation of the class Child to be more clear about what is used in the list.

Copy link
Owner

@aminalaee aminalaee left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution 👍

@aminalaee aminalaee merged commit 31de230 into aminalaee:main Oct 29, 2023
@aminalaee aminalaee mentioned this pull request Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants