[web2py] slices and generic.load

52 views
Skip to first unread message

Richard Vézina

unread,
Jun 29, 2011, 3:43:42 PM6/29/11
to web...@googlegroups.com
Hello,

With the last update I presume that many slice (app) are not working anymore for example : http://www.web2pyslices.com/main/slices/take_slice/121

The app coming from here not working before I create "product/create.load" view :

Richard

Bruno Rocha

unread,
Jun 29, 2011, 4:29:06 PM6/29/11
to web...@googlegroups.com

I think in web2pyslices2 will need to have some editors.

By now we can use the comments for this.

http://zerp.ly/rochacbruno

Anthony

unread,
Jun 29, 2011, 4:53:49 PM6/29/11
to web...@googlegroups.com
Changes to web2py are supposed to be backward compatible (at least changes to the documented API) -- what specifically isn't working? Was it working in 1.96 (or previous), but not in 1.97?

Richard Vézina

unread,
Jun 29, 2011, 5:08:26 PM6/29/11
to web...@googlegroups.com
It the app associate to the slice... I made a comment. If the product/create.load view was not created the page at app/product/create will be blank... Create the product/create.load view fix it and may be it requires to create product/create.html too since I create both... But didn't test if only one of both is enought....

Richard

Anthony

unread,
Jun 29, 2011, 6:15:46 PM6/29/11
to web...@googlegroups.com
On Wednesday, June 29, 2011 5:08:26 PM UTC-4, Richard wrote:
It the app associate to the slice... I made a comment. If the product/create.load view was not created the page at app/product/create will be blank... Create the product/create.load view fix it and may be it requires to create product/create.html too since I create both... But didn't test if only one of both is enought....
 
Yes, that's the same issue as has been discussed before regarding generic views and is not unique to that slice. Due to a potential security issue, generic views are now disabled by default and can be enabled by specifying response.generic_patterns. The 'welcome' app includes a statement in db.py that enables all generic views, but only for local requests.
 
Also, response.generic_patterns is not getting passed to non-ajax components, so generic views aren't working at all for non-ajax components, unless you explicitly set response.view='generic.[extension]'. This problem will be fixed soon.
 
Anthony
 

Brian M

unread,
Jun 30, 2011, 4:58:20 PM6/30/11
to web...@googlegroups.com
Thanks for pointing this out Anthony - I'll try to find time to update my slice & demo app soon.

~Brian

Brian M

unread,
Jun 30, 2011, 9:25:57 PM6/30/11
to web...@googlegroups.com
Both slice & bitbucket repo should be fixed to work with web2py 1.97.1 now - Thanks Richard for pointing this out and Anthony for helping to explain the problem.  Let me know if there are more issues.

~Brian

Massimo Di Pierro

unread,
Jun 30, 2011, 10:28:06 PM6/30/11
to web2py-users
about the slices... some of us are writing a book on recipes and I we
are using some ideas from the slices. I am finding a lot of good ideas
but some of the slices are old and can be improved a lot using new
syntax. I cannot share the text of the book for copyright issue but I
will share the code examples when done so the slices can be improved
and new code checked for errors.

Massimo

pbreit

unread,
Jun 30, 2011, 10:46:36 PM6/30/11
to web...@googlegroups.com
Does that mean anything that goes in the book cannot be posted and modified elsewhere? I'd much rather see a more permissive resource. The copyright and licensing issues in this community are unfortunate to say the least.

Bruno Rocha

unread,
Jun 30, 2011, 11:15:41 PM6/30/11
to web...@googlegroups.com


On Thu, Jun 30, 2011 at 11:46 PM, pbreit <pbreit...@gmail.com> wrote:
Does that mean anything that goes in the book cannot be posted and modified elsewhere? I'd much rather see a more permissive resource. The copyright and licensing issues in this community are unfortunate to say the least.

Massimo is not referring the "web2py official book" , he is talking about another book.

--



--
Bruno Rocha
[ Aprenda a programar: http://CursoDePython.com.br ]
[ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ]
[ Consultoria em desenvolvimento web: http://www.blouweb.com ]

pbreit

unread,
Jul 1, 2011, 1:48:35 AM7/1/11
to web...@googlegroups.com
Yes, I was concerned with the other book. But it'd also be nice if the Book content could be used in different ways, too.
Reply all
Reply to author
Forward
0 new messages