Re: Pylons 2 users guide, first draft

2010-09-15 Thread Mike Orr
On Mon, Sep 13, 2010 at 10:45 AM, Ben Bangert wrote: >> Where is pylons.url now? request.url? > > from pylons.url import route_url > > Then just, route_url(request, 'route_name', **extra_args). It works largely > like the BFG route_url, except honors an additional URL generator option that >

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Chris McDonough
On Mon, 2010-09-13 at 10:45 -0700, Ben Bangert wrote: > On Sep 13, 2010, at 12:09 AM, Mike Orr wrote: > >> I'll move some of the background paragraphs into separate pages. But >> this page will focus on the minimal app. >> >> Do you have any sample applications in both Pylons 1 and Pylons 2 that

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Mike Orr
On Mon, Sep 13, 2010 at 12:33 AM, Chris McDonough wrote: >> I guess that means myapp/__init__.py will have to initialize the >> logging. Because who else will? > > I figured it would just go in the .ini file as before, and PasteDeploy > would initialize it as always. Oh, duh, I didn't realize it

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Chris McDonough
On Sun, 2010-09-12 at 23:40 -0700, Mike Orr wrote: >> >> Probably should still live in INI file. > >>> I suppose a logging configuration may not belong in the minimal >>> application, but in that case I'd have to provide the code to paste >>> in. (Maybe using paste.translogger as a sample middlew

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Chris McDonough
On Mon, 2010-09-13 at 00:09 -0700, Mike Orr wrote: > I notice that ``request[foo]`` shadows ``request.environ[foo]``. Has > WebOb always done that? This is a behavior of the repoze.bfg subclass of WebOb (in repoze.bfg.request.Request). It's only for backwards compatibility with applications wri

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Mike Orr
On Sun, Sep 12, 2010 at 3:29 PM, Ben Bangert wrote: > Also, not sure what type of license Ian has his Paste docs under, but I want > to pull in the necessary information about how to configure INI files, such > that a user doesn't have to go to the PasteDeploy docs to look-up how to set > a fil

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Ben Bangert
On Sep 13, 2010, at 11:49 AM, Mike Orr wrote: > Can it be made into a request method so you don't have to pass the > request object? That would be more OO. Sure, request.url though makes it ambiguous if its the request URL vs a url function. Ian called it request.link in his example app using R

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Ben Bangert
On Sep 13, 2010, at 12:09 AM, Mike Orr wrote: > I'll move some of the background paragraphs into separate pages. But > this page will focus on the minimal app. > > Do you have any sample applications in both Pylons 1 and Pylons 2 that > I can include? The more sophistocated one with multiple acti

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Mike Orr
On Sun, Sep 12, 2010 at 1:10 PM, Ben Bangert wrote: > Mike, this is a great first step! :) :) > I think your "hello, world" in Pylons 2 should probably be adapted into a > "Learning Pylons 2 for the Pylons 1 User" type document. As it does a great > job explaining differences in terminology, w

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Mike Orr
On Sun, Sep 12, 2010 at 3:13 PM, Chris McDonough wrote: >>> CM: the ability to use a common "main template" for theming >> >> That's good. the more we can describe the practical benefits, the >> better. There are several things like theming and a grandparent site >> template for subapplications t

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Mike Orr
"Hello" (capitalized) is working now, and the interactive traceback. I adjusted the guide for those and for the new location of the static files. I adjusted the text for describing Routes and CM's other points. -- Mike Orr -- You received this message because you are subscribed to the Google G

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Ben Bangert
On Sep 12, 2010, at 3:39 PM, Chris McDonough wrote: > Most of this is already handled via "paster points", e.g. do > "env/bin/paster points paste.filter_app_factory" in a virtualenv that > has Pylons installed. What that doesn't do is give you the "egg name", > although you don't really need the

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Ben Bangert
On Sep 12, 2010, at 3:13 PM, Chris McDonough wrote: >> What's the best way to figure out the entry point name to use and the >> right syntax, for any arbitrary entry point? > > It's egg:#entrypointname > > The entry point names for a given package are in > EGG-INFO/entrypoints.txt . > > Paste d

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Chris McDonough
On Sun, 2010-09-12 at 15:29 -0700, Ben Bangert wrote: > On Sep 12, 2010, at 3:13 PM, Chris McDonough wrote: > >>> What's the best way to figure out the entry point name to use and the >>> right syntax, for any arbitrary entry point? >> >> It's egg:#entrypointname >> >> The entry point names for

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Ian Bicking
On Sun, Sep 12, 2010 at 5:13 PM, Chris McDonough wrote: > I saw that pipeline in an example INI Ben showed me, but I didn't > realize he wanted to do it across the board. I have never liked IN I > pipelines; they're hard to understand and non-Python syntax (which > means it could be hard to trace

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Chris McDonough
On Sun, 2010-09-12 at 13:00 -0700, Mike Orr wrote: > Comments to Chris' comments. > >> MO: The static files are moved; they’re in the templates directory rather >> than in “hello/static”. > >> CM: I think we'll want to move the static files out of the > templates directory and up into a peer of

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Mike Orr
Comments to Chris' comments. > MO: The static files are moved; they’re in the templates directory rather > than in “hello/static”. > CM: I think we'll want to move the static files out of the templates directory and up into a peer of the templates directory. I made a mistake here. The tradition

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Chris McDonough
Whoops, I meant to respond to your inline questions too. I responded to the ones I knew the answers to. On Sun, 2010-09-12 at 04:24 -0700, Mike Orr wrote: > I've got a first draft of the Pylons 2 Users Guide done. The "hello > world" page is the only page that's completed; it goes through > insta

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Chris McDonough
Hi Mike, Looks good, thanks a lot! I added some comments via a fork at: http://bitbucket.org/chrism/pylons-execution I changed some paster template code as a result of your investigation; the details are in the fork's comments. - C On Sun, 2010-09-12 at 04:24 -0700, Mike Orr wrote: > I've go

Re: Pylons 2 users guide, first draft

2010-09-15 Thread Ben Bangert
On Sep 12, 2010, at 4:24 AM, Mike Orr wrote: > I've got a first draft of the Pylons 2 Users Guide done. The "hello > world" page is the only page that's completed; it goes through > installing a default application and looking through the application > code. I haven't gone through the Pylons code

Pylons 2 users guide, first draft

2010-09-15 Thread Mike Orr
(Originally from Mike Orr) I've got a first draft of the Pylons 2 Users Guide done. The "hello world" page is the only page that's completed; it goes through installing a default application and looking through the application code. I haven't gone through the Pylons code or BFG code or BFG manual