[Cubicweb] views dont refresh

Nicolas Chauvat nicolas.chauvat at logilab.fr
Sat Aug 1 13:06:42 CEST 2009


Hello,

On Sat, Aug 01, 2009 at 08:16:27AM +0530, Dhaval Sharma wrote:
> The views dont refresh after an error and keep displaying the old error even
> though I have made changes in views.py.
> Even if I comment everything it continues to show the old error.
> Where do views store error?
> How can I flush it manually if framework is not able to to do so?
> Also the XML error shown is scrollable, I need to copy everything and put it
> in textpad and then see complete string. Where does it store the error which

The reload mechanism in CW works in a lot of cases, but unfortunately
it is not perfect. Here is how to get the most of it:

1/ make sure your start your instance with:

  cubicweb-ctl start -D <instancename>

2/ keep an eye on the messages printed in that shell

3/ if simple Ctrl-R does not work, try Shift-Ctrl-R

4/ if Shift-Ctrl-R does not help, restart your instance

Views *do*not* store errors. Then is no way for an error in the code
of a view to persist over a restart after you fixed the source code of
the view.

You may also want to use automated testing. Read about it at
http://www.cubicweb.org/doc/en/development/testing/ and have a look at
the test/ directory in the various cubes of the cw standard library.

-- 
Nicolas Chauvat

logilab.fr - services en informatique scientifique et gestion de connaissances  



More information about the Cubicweb mailing list