Am 29.09.2010 18:55 schrieb Luke D:
Yeah, I think those SQLAlchemy examples are exactly how I would setup
my model, but I guess I wasn't sure how that would affect the rest of
the Turbogears application and coding it. It just seems like such a
different paradigm than most of the TG stuff I've looked at. For
example, one of the things I can't wrap my head around is how the user
membership setup page would be coded to allow someone to create
profile attributes for their membership requirements.
Any thoughts?
In the example, the "Animal" class corresponds to the Group class. You
need to add another Column group_attributes to the Group class that
holds the allowed keys (profile attributes) for this group.
Alternatively, you can create a separate class GroupAttributes with the
group id as foreign key and the allowed key as Column (1:n).
Your setup page should allow the group owner to add, delete and rename
attributes. There are many ways to do this, it's a very common pattern.
-- Christoph
--
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en.