-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 28 Sep 2009, at 20:23, Krishnakant wrote: > Just a quick curious question. > Very sorry to take this off track a bit, but Can't we do validations > using toscawidgets? Yes we can. That's what I assumed the OP to be using, based on the reference to the toscawidgets tutorial ... >> With this, and the code taken from toscawidget's tutorial which has explicitly: """ In myapp/controllers/movie.py, add the following line: from tw.mods.pylonshf import validate Inside the RootController class, add the following: @validate(form=movie_form, error_handler=index) def save(self, **kw): return str(kw) """ And that's why I referenced the Shabti template, it also uses the validate in tw.mods.pylonshf I double-checked the operation of the Shabti template and, with the required libs/packages, it works as expected (under Python2.6): nosetests all pass and a new page can be added and saved via the microCMS. It does seem that this particular problem is localised to the OP's setup. Cheers, Graham http://www.linkedin.com/in/ghiggins -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkrBS44ACgkQOsmLt1Nhivz1rwCfcmVhh0as/e+tY65uOjaDhh0+ 4/MAoNmsgmq991H4MbClUmThQOTVGIgKiQCVAgUBSsFLjlnrWVZ7aXD1AQLvMgP8 DLDsJmJtLKHmsOGSnE461VQO8AfDfjAcSqEVN3fdCgIc8liMPqVwNRYT9F7KQ2eS X384wsaK7KnNGPZ99j20+rfX1kzrbfcl7Cq8FIvaFK3M1hhaYfkYSftLTKhPetG2 JdZ2ZJ6erWOMbp1dny+ssDlE/dRjvVqjbzDQ8f+bXwg= =5PA8 -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
