managing user query sets / lists

0 views
Skip to first unread message

James Tauber

unread,
Aug 8, 2007, 1:35:44 PM8/8/07
to django...@googlegroups.com

The 'bulk' part of django-mailer, as I've mentioned elsewhere,
involves the combination of a user query set (or more generally, as
Kai has pointed out, an iterable over users) plus a template (or two:
one for subject and one for message body)

So imagine a function

bulk(iterable_over_users, subject_template, body_template)

One could easily imagine a Campaign model (yes, I was thinking of
using the same term Jökull suggested) that stores these parameters
and this 'bulk' function is then called on each entry in the Campaign
model.

The big question I have is how best to manage that first parameter.

Should the field contain the name of a function that returns the
iterable? Should there then be a separate model where such functions
are registered (with the Campaign model containing a foreign key to
this registry) so a UI can be built to select user query set / lists?

Thoughts?

James
--
James Tauber http://jtauber.com/
journeyman of some http://jtauber.com/blog/


Reply all
Reply to author
Forward
0 new messages