I'm not sure if it is or isn't a good way... I was just trying to understand
what you were trying to accomplish, so I could think about it a bit....

So you have facilities (locations...)
... and you have ... mmm....  resources (it could be a swimming pool - with
open hours; it could be when a masseuse or perhaps a coach-by-name is in...)

and the resources have schedules;  and those schedules have availability....

and the resources have a relationship with a facility - in the case of
something fixed (e.g. swimming pool) it's probably a single relationship for
that resource;  for other things,  (e.g. trainer, masseuse) it may be many
relationships with facilities....

and there is some relationship between schedules: e.g., a trainer's schedule
involves several facilities (so the trainer's view of the trainging schedule
for tennis is different than a facilites view of scedule for tennis).

so that sounds like a schedule event has an association with a
facility-resource, a professional, and an attendee.

How am I doing so far?

And you are trying to do something with widgets to manage the complexity ---
e.g. tennis courts might be 5, 3 for open play, two for trainer use on
certain hours...

.... the reason I am doing all this - I like to see how much can be solved
with structure, and thus minimize code (need for widget)...

... so first I'm trying to understand the kind of strucuture that is
"natural" in what you are dealing with...



On Tue, Jun 30, 2009 at 12:05 PM, annet <[email protected]> wrote:

>
> Not quite
>
> I have a table which contains facilities (an amenity or resource, esp.
> one connected with leisure or hygiene) : swimming pool, lounge, spa,
> sport shop etc. Some of them have opening hours most of them don't. I
> also have a combination table which relates companies to facilities in
> this case I use IS_IN_DB(...). When the user inserts records into the
> facility time table the options should only display the facilities
> that do have opening hours. I thought using a widget would be a good
> idea, from your post I understand it is not. Is there a better way to
> implement this?
>
>
> Kind regards,
>
> Annet.
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to