Yes it seems usual referring to the blog post. So if the serveur
restart, that's not a problem that the init are executed several times...

With the mod_wsgi and apache where can I see the results of my "print" ?

On 14-12-10 15:41, Brian Bouterse wrote:
> Why do things get started twice in django sometimes?  I see the
> framework being started twice here.  Also if you overload the
> __init__(self): of models, that too gets called twice.  I've never
> understood this, but the singleton pattern seems to provide a nice
> workaround.
>
> Brian
>
> On Mon, Dec 13, 2010 at 5:19 PM, Mike Dewhirst <[email protected]
> <mailto:[email protected]>> wrote:
>
>
>     Here is some research by Graham Dumpleton earlier this year and which
>     explains the process in detail ...
>
>     http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html
>
>     If you decide to use a singleton to monitor state you might have to
>     look for somewhere safe to start it.
>
>     >
>     > And anyway I just realised another problem : I'll need to have
>     access to
>     > the objects I created from views.
>
>     I think it would work from anywhere you can call the code but you need
>     to test it.
>
>     Mike
>
>     > The idea is to send a message to the thread when a certain action is
>     > done (like user registration, validate choices...) but to do
>     that I need
>     > an access to this object (I cannot create another one because of
>     > concurrency safety)
>     >
>     > Any idea ?
>
>     --
>     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]
>     <mailto:[email protected]>.
>     To unsubscribe from this group, send email to
>     [email protected]
>     <mailto:django-users%[email protected]>.
>     For more options, visit this group at
>     http://groups.google.com/group/django-users?hl=en.
>
>
>
>
> -- 
> Brian Bouterse
> ITng Services
> -- 
> 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.

-- 
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.

Reply via email to