Wouldn't it be easier to create a 'lock-file'? Have your middelware check for the lock file, if it's present, block access, if not, do nothing.
This is at least how some programs do their locks (Adobe Creative suite for example) and quite easy to implement. Tino On Wed, Jul 1, 2009 at 16:34, Michel Thadeu Sabchuk <[email protected]>wrote: > > Hi guys, > > I need to block access to my site during a time period, when a script > is running and do some calculations. I want to avoid user interaction > during this calculations, this is why I want to block access to the > site when the script starts and liberate when the script ends. > > First of all, I think on change the apache configuration and restart > it when start the script, but I want to simple it and just check a > parameter on the settings.py, direct on django. > > I created a middleware that make this thing and it works if the > settings parameter changes. The problem now is: how to change the > settings parameter through the script outside of django? > > I try to import the settings and change the parameter but the site > don't see the change. Is this possible or I need to find another way? > > Thanks in advance, > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

