depends on what you ask for the kind of functionality you need. Generally
smartgrid is smart, but can't figure out all the business logic required by
your (and everyones) app.
are you in the need of a wrapper to see what table/form is shown ?
Just write a general one and apply it instead of repeating the "ugly" code.
Something that allows you to write
if is_form('new', 'classes', 'classes.subject_id'):
db.classes.class_name.default = get_class_name()
is not hard to build.
On Wednesday, March 27, 2013 3:55:40 PM UTC+1, Cliff Kachinske wrote:
>
> Using smartgrid I find myself writing some very ugly code, tedious to
> write and hard to read or maintain.
>
> Here is an example
>
> if len(request.args) > 3 and request.args[-1]=='classes' and\
> request.args[-2]=='new' and
> request.args[-4]=='classes.subject_id':
> db.classes.class_name.default = get_class_name()
>
> Is there a better way to do this?
>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.