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: custom document model not working with wagtail grapple #153

Merged
merged 13 commits into from
Apr 1, 2021

Conversation

fabienheureux
Copy link
Contributor

@fabienheureux fabienheureux commented Feb 3, 2021

Current version of Grapple does not seem to work with custom document model.
This fixes it

  • Fix the issue
  • Add tests

Edit: I added a custom document model in the example project in order to ensure that a custom document model works with Grapple.
Sorry for all the commits, this is the first time I worked with the example project and a few things went wrong because I did not install pre-commit hooks 😅

Also: I had to port this fix in order to fix example project tests: https://github.com/wagtail/wagtail/pull/6559/files
Let me know if I should rather fix this in another PR.

@fabienheureux fabienheureux changed the title Fix custom document not working with wagtail grapple [WIP] Fix custom document not working with wagtail grapple Feb 4, 2021
@fabienheureux fabienheureux changed the title [WIP] Fix custom document not working with wagtail grapple Fix custom document not working with wagtail grapple Feb 6, 2021
@fabienheureux fabienheureux changed the title Fix custom document not working with wagtail grapple Fix custom document model not working with wagtail grapple Feb 7, 2021
@fabienheureux fabienheureux changed the title Fix custom document model not working with wagtail grapple Fix: custom document model not working with wagtail grapple Feb 7, 2021
@zerolab
Copy link
Member

zerolab commented Feb 7, 2021

@fabienheureux another omission in tests! Can you add a test to confirm your custom doc model is picked up?

@fabienheureux fabienheureux changed the title Fix: custom document model not working with wagtail grapple [WIP] Fix: custom document model not working with wagtail grapple Feb 9, 2021
@zerolab zerolab marked this pull request as draft March 9, 2021 21:57
@fabienheureux fabienheureux changed the title [WIP] Fix: custom document model not working with wagtail grapple Fix: custom document model not working with wagtail grapple Apr 1, 2021
@fabienheureux fabienheureux marked this pull request as ready for review April 1, 2021 09:40
@fabienheureux
Copy link
Contributor Author

fabienheureux commented Apr 1, 2021

@zerolab I updated the code a bit to make the document type file look closer to the image type file.
It helped me debugging and it will make the codebase more consistent, what do you think ?

And I added a test 😅 (sorry for the delay.....).

@zerolab zerolab merged commit 5b3a86c into torchbox:main Apr 1, 2021
@zerolab
Copy link
Member

zerolab commented Apr 1, 2021

Thank you @fabienheureux, merged with a tweak

@fabienheureux fabienheureux deleted the fix/custom-document-model branch April 1, 2021 16:49
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