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

Update models for admin compatibility #3

Closed
wants to merge 2 commits into from

Conversation

devilicecream
Copy link
Contributor

Using as a reference the method provided in TurboGears/tgext.pluggable#13, to achieve compatibility with the admin panel all pluggables' models need to list the model classes they want to expose in the admin panel through __all__. Using inspection on the module should work as well, but this seems to me a cleaner (and more "pythonic") solution, even if it requires fixing all pluggables that don't already implement __all__ in their models

Using as a reference the method provided in TurboGears/tgext.pluggable#13, to achieve compatibility with the admin panel all pluggables' models need to list the model classes they want to expose in the admin panel through `__all__`. Using inspection on the module should work as well, but this seems to me a cleaner (and more "pythonic") solution, even if it requires fixing all pluggables that don't already implement `__all__` in their models
@coveralls
Copy link

coveralls commented Jan 5, 2018

Coverage Status

Coverage increased (+0.04%) to 82.039% when pulling 910d813 on devilicecream:patch-1 into 56f6b63 on axant:master.

@devilicecream
Copy link
Contributor Author

devilicecream commented Jan 5, 2018

Added default value for the extra field in the Ming model, cause the form filler of the admin panel complains if a document doesn't have all the fields specified in the model schema.

@coveralls
Copy link

coveralls commented Jan 5, 2018

Coverage Status

Coverage increased (+0.04%) to 82.039% when pulling 0de4fe1 on devilicecream:patch-1 into 56f6b63 on axant:master.

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