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

Provide widgets in a defaultdict with fallback handlers for fields with permission constraints #7

Open
do3cc opened this issue May 20, 2014 · 0 comments

Comments

@do3cc
Copy link
Member

do3cc commented May 20, 2014

Currently, if I have a field only visible for admins, and write a heavily customized form where I need to render each widget seperately instead of just iterating over all widgets, I have to check, if the widget actually exists, else I get location errors.
This is only possible with python expressions.
It would be nicer, if w would be a defaultdict which would have advanced logic:

  1. If there is no field with given name, throw the key error
  2. If there is a field, return a mocked content provider that returns an empty string on render.

This way, I can avoid writing python expressions in page templates

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

No branches or pull requests

1 participant