Re: Where in the reference docs is h.url_for (and other 'globals')?
On Tue, 2008-01-08 at 21:46 -0500, Yannick Gingras wrote: John_Nowlan [EMAIL PROTECTED] writes: Aren't docs supposed to help alleviate the need to go to the source? In `paster shell`, in a template, or in a controller action, you can do: print h.url_for.__module__ So you're agreeing with him? Cliff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Where in the reference docs is h.url_for (and other 'globals')?
On Jan 10, 2008 11:50 AM, Cliff Wells [EMAIL PROTECTED] wrote: On Tue, 2008-01-08 at 21:46 -0500, Yannick Gingras wrote: John_Nowlan [EMAIL PROTECTED] writes: Aren't docs supposed to help alleviate the need to go to the source? Yes, the docs need to be improved, especially in the areas of Request/Response attributes, utility functions like abort() and WebHelpers, the decorators, etc. All this work is ongoing. A lot of stuff in the Cookbook belongs in the official docs and will eventually be organized and put there. -- Mike Orr [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~--~~~~--~~--~--~---
RE: Where in the reference docs is h.url_for (and other 'globals')?
It's a good tip. Docs can always be better. Now I owe Yannick some sweat equity on the docs, to try and help make it so. (He says commandingly. Nothing happens. Must be out of lighter fluid.) In `paster shell`, in a template, or in a controller action, you can do: print h.url_for.__module__ So you're agreeing with him? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~--~~~~--~~--~--~---
Where in the reference docs is h.url_for (and other 'globals')?
O.k. I know where it is, but I want to make the point. Here is my search: Where in the reference docs is h.url_for? ..\appname\appname\lib\base.py -- import appname.lib.helpers as h -- o.k. found h, goto helpers ..\appname\appname\lib\helpers.py -- from webhelpers import * -- no, goto webhelpers \python\Lib\site-packages\webhelpers.egg.\webhelpers\__init__.py --from webhelpers.rails import * -- no, goto rails \python\Lib\site-packages\webhelpers.egg.\webhelpers\rails\__init__.py --from routes import url_for-- FINALLY! FINALLY! I found it. h.url_for() really comes from the routes module which is in the reference docs and is documented there, but how am I supposed to know this without going through this tortuous path? Aren't docs supposed to help alleviate the need to go to the source? (If there is a better way to do this then please let me know. Seriously, I'm new to python and like to learn.) I had to go backwards through the source to find it. Makes the docs pointless if you can't find things, imho. This may seem trivial but it is my biggest complaint with the docs and 'webhelpers' and by extension the 'approachability' of pylons. As Max says, there are a lot of useful functions there that I'm not sure people are aware of, and I've only used functions mentioned in tutorials, primarily url_for(), but am much more aware of some goodies tucked away there now. It would be a great improvement to the docs to have 'globals' and other reference points linked off of the module reference http://pylonshq.com/docs/module-index.html. I.e. make reference docs complete. I.e. have 'h.' as a link to a page that might mention the indirection but then goes directly to the relevant docs. (This would be the first improvement, secondarily would be to question why all the indirection, but perhaps a discussion for another time and I'm no expert, just a grateful, if complaining, user) I suppose I should shut my mouth now and create a page on confluence/pythonweb, whatever its called, that tries to do this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Where in the reference docs is h.url_for (and other 'globals')?
John_Nowlan [EMAIL PROTECTED] writes: FINALLY! I found it. h.url_for() really comes from the routes module which is in the reference docs and is documented there, but how am I supposed to know this without going through this tortuous path? Aren't docs supposed to help alleviate the need to go to the source? In `paster shell`, in a template, or in a controller action, you can do: print h.url_for.__module__ The best thing is to install ipython and to do: h.url_for? and if it's not enough, do h.url_for?? -- Yannick Gingras --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~--~~~~--~~--~--~---