Hello all- I'm working of a site that will store various business listings (restaurants, bars, clubs etc) and then I'd like to also track the hours each business is open... The ultimate goal being something like lawrence.com's "open now" feature and other time-related queries of that type. I'm trying to figure out the best way to store the hours data and was wondering if anyone had any suggestions...
Because the open and close times vary by day of the week, storing them directly in the business model (or the models inheriting from it in this case) isn't possible. My instinct is to use a separate model for the hours and then tie it to the business model using generic relations to span various models. I know that would work, but I can't shake the feeling that there's a better way and I'm just not seeing it, so I thought I'd throw it out there and see what others think. I also should note that I'm not terribly concerned with the admin interface aspect (I don't plan to enter most of this data through the admin, it's already in a spreadsheet so I'll likely just load it all at once using a script and make the occasional update via the admin). My primary concern is optimizing for speed, i.e. the less joins, multi- table and other expensive database queries the better. If anyone has any suggestions or tips I'd love to hear them. cheers Scott Gilbertson luxag...@gmail --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---