On 6/27/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> On Mon, 2006-06-26 at 13:28 -0700, Tyson Tate wrote:
> > I've found a better solution with signals and the dispatcher. The
> > essence is that you raise a signal every time someone views the
> > relevant page, for instance, a "Recent Flickr Photos" page. In the
> > relevant models.py file, you'll have attached a function call to be
> > called on the raising of that signal. That function should check when
> > the last time it was run, if it was run more than X minutes ago, have
> > it call the relevant Flickr synchronization code, or whatever else
> > you want it to do.
>
> Not a good idea if the process takes any significant amount of time to
> run (such as, for example, retrieving things of the Internet). It will
> block the response back to the user.


You could though have a page that sends an XMLHTTPRequest to a
different view, which can do the processing. Then the user won't
experience any blocking at all.

Jay P.

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to