[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

how django discovers changed sources

Dave

1/17/2008 7:25:00 PM

hi,

I started playing with django and accidentally discovered that it
restarts the server once a source file is touched.

does it use some python's feature or just scans for changs on its one?
sources?

any idea?

A.
5 Answers

Jeff

1/17/2008 7:27:00 PM

0

That is the behavior of the development server. When you are writing
your application, you don't want to have to manually restart the
server every time you change a file. On apache it obviously doesn't
do that.

Dave

1/17/2008 7:30:00 PM

0

Jeff wrote:
> That is the behavior of the development server. When you are writing
> your application, you don't want to have to manually restart the
> server every time you change a file. On apache it obviously doesn't
> do that.

thx for clarification, but still I am curious how it is done under the
hood. it really impressed me ...

Guilherme Polo

1/17/2008 7:52:00 PM

0

2008/1/17, alf <ask@me.xs4all.nl>:
> Jeff wrote:
> > That is the behavior of the development server. When you are writing
> > your application, you don't want to have to manually restart the
> > server every time you change a file. On apache it obviously doesn't
> > do that.
>
> thx for clarification, but still I am curious how it is done under the
> hood. it really impressed me ...
> --
> http://mail.python.org/mailman/listinfo/p...
>
It checks if modification time on registered files have changed since last check

--
-- Guilherme H. Polo Goncalves

Jeff

1/17/2008 8:00:00 PM

0

On Jan 17, 2:51 pm, "Guilherme Polo" <ggp...@gmail.com> wrote:
> 2008/1/17, alf <a...@me.xs4all.nl>:> Jeff wrote:
> > > That is the behavior of the development server. When you are writing
> > > your application, you don't want to have to manually restart the
> > > server every time you change a file. On apache it obviously doesn't
> > > do that.
>
> > thx for clarification, but still I am curious how it is done under the
> > hood. it really impressed me ...
> > --
> >http://mail.python.org/mailman/listinfo/p...
>
> It checks if modification time on registered files have changed since last check
>
> --
> -- Guilherme H. Polo Goncalves

django.utils.autoreload provides the functionality.

Dave

1/17/2008 8:36:00 PM

0

Jeff wrote:
> On Jan 17, 2:51 pm, "Guilherme Polo" <ggp...@gmail.com> wrote:
>> 2008/1/17, alf <a...@me.xs4all.nl>:> Jeff wrote:
>>>> That is the behavior of the development server. When you are writing
>>>> your application, you don't want to have to manually restart the
>>>> server every time you change a file. On apache it obviously doesn't
>>>> do that.
>>> thx for clarification, but still I am curious how it is done under the
>>> hood. it really impressed me ...
>>> --
>>> http://mail.python.org/mailman/listinfo/p...
>> It checks if modification time on registered files have changed since last check
>>
>> --
>> -- Guilherme H. Polo Goncalves
>
> django.utils.autoreload provides the functionality.

thx for the reference,

Andy