Hi I have a site that has the following model declarations:
So when a user registers they select a number of categories and if they
want they can also select sub categories for more fine grained
interests. When a new item is added to the site, part of the item
registration process is to select the categories and sub-categories to
which the item belongs.
The bit that i would like advice/help/suggestions on is one a day i want
to run a cron job to go through the items added that day and to find all
the user-registered categories and sub-categories and find where they
intersect with the items categories and sub-cats and then produce a user
specific email telling that user about items they may be interested in.
Basically is it possible to iterate through the list of items and write
item.categories.users and get a list of the users who registered
interest in this items categories?
Am i asking too much here? Will i just have to write some big iterative
function or is there an easier smarter approach?
Any help gratefully received.