On Dec 21, 2009, at 1:34 AM, NMarcu wrote:
> Everything is OK, if the view is finished, but if after this line I
> add an infinite loop, and in this time I check that table from console
> for the new record, that is not there.

This sounds like a transaction issue.  In the standard Django  
transaction handling model, the transaction is not committed until the  
view function returns; this means that if you check immediately after  
the data modification statement, but before the view function has  
completed, you won't see the new data from a different database  
connection.

It's probably not a great idea to idle in a view function, waiting for  
a daemon to complete some background process, since the process isn't  
really "background" then; the user at the browser is going to be  
waiting until the daemon process completes.  If you *must* handle it  
this way, you can switch to doing manual transaction control instead  
of using Django's transaction management.
--
-- Christophe Pettus
    x...@thebuild.com

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to