Can you post the class model that you use to store the category entity?

On Sat, May 22, 2010 at 10:21 PM, ProfessionalIT <[email protected]>wrote:

> Hi Justin,
>
>   above all, thank you, thank you very much.
>
>   Well, my main question is this:
>
> http://groups.google.com/group/webpy/browse_thread/thread/7d690349fa255500
>
>   The problems related in this thread are:
>     1. First, I need populate a form that has a dropdown based in a
> another Entity(in this case, in the Category Entity). To help you
> understand... a Entity is as a table but, it' s a table in the Google
> big table format.
>     2. After, I put the values in the rendered form and select a
> category(in the Category dropdown) ... I submit it to save a new
> record in your Post Entity, in this moment I receive a error because I
> need load a Entity Category first and after associate this loaded
> Category with the Post Entity. OK, this alternative solution I
> implemented and it's work's fine, but when I load the form again (in a
> edit method) you receive another error in the form.fill method.
>
>   I think that the root of all my problems is: How to map/associate
> this Category Entity in a Dropdown.control, I say this because I think
> that how did I can (and probably was) not have been more correct.
>
>   If you look in my code, you see:
>
> result = data.all_categories() # this method return all records of
> table category in GAE/big table format.
> args = [(row.key().id(), row.title) for row in result]  # I did not
> know how to map here on Dropdown Entity Category, so I made this way.
>
> new_post = form.Form(
>    form.Dropdown('category', args),
>
> Any idea ?
>
> -- Leandro.
>
> --
> You received this message because you are subscribed to the Google Groups
> "web.py" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected] <webpy%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/webpy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en.

Reply via email to