seeker
Good question. The current "spec" proposes that the Resource approach
will sit alongside the existing web2py core and there will be NO
backward-compatibility problems.
If the developer chooses to use the Resource approach then there are a
couple of consequences:
1) The constructs in the controller and view are different - see
examples
2) Certain current attributes will be ignored.
For example, e.g. labels and comments in the model. These are
considered view-related and are passed to the as() method from the
view. There is a helper method to assist using current models which
creates a dict from the model and that dict can be passed to as().
For example:
{{=resource.as(labels=_get_field_attributes(db.person,'label'))}}
Keep the question coming :-)
On Nov 13, 6:45 am, seeker <[EMAIL PROTECTED]> wrote:
> Hi Bill,
>
> Getting back to the original topic:
> Is there no possible way of having Resources peacefully co-existing
> with the rest of Web2Py and still be part of the core without breaking
> backward compatibility?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---