-
Notifications
You must be signed in to change notification settings - Fork 2k
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
toolkit: add h, StopOnError, DefaultOrganizationForm #2835
Conversation
sadly, this doesn't let me |
ed74b50
to
cc0bb58
Compare
This now has proper AttributeErrors for missing helpers on As a bonus we can now use |
''' This function is returned if no helper is found. The idea is | ||
to try to allow templates to be rendered even if helpers are | ||
missing. Returning the empty string seems to work well.''' | ||
return '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brew I moved this out because there's no reason for it to be a classmethod
(it never uses cls
), and because as a normal function I can do the is _null_function
check below
These changes will let me remove all deep ckan imports from ckanext-scheming.
For
h
I've chosen to export the same object that the templates see (with all the same side-effects) I think that's better than just exportingckan.lib.helpers
but I would kind of like to have proper AttributeErrors when I mistype a helper name.