dojo folder location

2008-06-17 Thread kdamacy
Hello, there. I'm just wondering where I should place the dojo folder on my project. I have created a project called myapp. And one of its sub-folders is also called myapp where you can find things like templates, controllers, etc. I'm pretty new to both pylons and dojo. Any help would be

Re: WSGI Fails ImportError: No module named deploy

2008-06-17 Thread Mike Orr
On Mon, Jun 16, 2008 at 3:48 PM, Chris Spencer [EMAIL PROTECTED] wrote: Turns out easy_install PasteDeploy installs to site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deploy instead of site-package/paste/deploy. Not sure why that's the default behavior... It's installing it as an egg. It

Re: best practices for static resources

2008-06-17 Thread Wichert Akkerman
Previously Cliff Wells wrote: On Mon, 2008-06-16 at 13:03 +0200, Wichert Akkerman wrote: I am trying to figure out what the best practices for dealing with static resources such as CSS, Javascript and images are. With a default pylons setup every request goes through two StaticURLParser

Re: Plyons WSGI on Apache2.2

2008-06-17 Thread Wichert Akkerman
Previously Graham Dumpleton wrote: Read: http://code.google.com/p/modwsgi/wiki/ConfigurationIssues Not sure why you want run a single thread. From memory would only want to do that if trying to attach gdb to daemon process and debug at C code level. I tried to run with a single thread

Re: Plyons WSGI on Apache2.2

2008-06-17 Thread Graham Dumpleton
On Jun 17, 6:55 pm, Wichert Akkerman [EMAIL PROTECTED] wrote: Previously Graham Dumpleton wrote: Read:  http://code.google.com/p/modwsgi/wiki/ConfigurationIssues Not sure why you want run a single thread. From memory would only want to do that if trying to attach gdb to daemon

Re: Plyons WSGI on Apache2.2

2008-06-17 Thread Wichert Akkerman
Previously Graham Dumpleton wrote: Is Paste#evalerror the same as EvalException or something different? It's an entry point which maps to paste.evalexception.middleware.make_eval_exception which indeed sets up EvalException. Looking at the code I must have misremembered: it does not support a

Re: Plyons WSGI on Apache2.2

2008-06-17 Thread Graham Dumpleton
On Jun 17, 7:24 pm, Wichert Akkerman [EMAIL PROTECTED] wrote: Previously Graham Dumpleton wrote: Is Paste#evalerror the same as EvalException or something different? It's an entry point which maps to paste.evalexception.middleware.make_eval_exception which indeed sets up EvalException.

Re: best practices for static resources

2008-06-17 Thread Cliff Wells
On Tue, 2008-06-17 at 10:36 +0200, Wichert Akkerman wrote: Previously Cliff Wells wrote: I usually just setup Nginx to handle whatever location my static content is at. It doesn't matter if Routes is setup to handle that location as the request never reaches Pylons. How do you do

Re: best practices for static resources

2008-06-17 Thread Antonio Beamud Montero
El mar, 17-06-2008 a las 04:33 -0700, Cliff Wells escribió: On Tue, 2008-06-17 at 10:36 +0200, Wichert Akkerman wrote: Previously Cliff Wells wrote: I usually just setup Nginx to handle whatever location my static content is at. It doesn't matter if Routes is setup to handle that

Re: best practices for static resources

2008-06-17 Thread Wichert Akkerman
Previously Antonio Beamud Montero wrote: El mar, 17-06-2008 a las 04:33 -0700, Cliff Wells escribió: On Tue, 2008-06-17 at 10:36 +0200, Wichert Akkerman wrote: Previously Cliff Wells wrote: I usually just setup Nginx to handle whatever location my static content is at. It

Re: best practices for static resources

2008-06-17 Thread Brandon Singer
On Tue, 2008-06-17 at 14:23 +0200, Antonio Beamud Montero wrote: I use the url_for for all static content, and with mod_wsgi all is transparent (thanks G. Dumpleton :), doesn't matter where you put your web root. I have all my static content urls hardcoded, I was not able to figure out how

Pylons Empty Query Error Handling

2008-06-17 Thread Joe Chiang
Sorry I am a completely newbie to Pylons, Python, and I'm trying to built a web page with pylons.. so i got a page setup and have it query to my database for searching.. query is fine when user enter the correct arguments but when they are not below is a pylons pages with error log class

Best possible webserver setup

2008-06-17 Thread Geoff
Just trying to figure out the best combination for pylons: - Apache / Lighttpd - FCGI / Proxy / WSGI All the information I've found about relative performance seems to be rather outdated. I've played with Apache + FCGI and mod_wsgi quite a bit and it seems that FCGI is quite a lot faster. Is

custom domain mapping to a controller/id path?

2008-06-17 Thread eleith
i have this routing set up /user/id /user/id/project if you went to www.myhost.com/user/id, you'll see a page with a link on it generated by h.url_for() containing user/id/project thus bringing you to www.myhost.com/user/id/project i now want to map a custom domain that my webserver would

Re: custom domain mapping to a controller/id path?

2008-06-17 Thread Jonathan Vanasco
create your own url_for function in helpers, and just wrap url_for with it. ie: lib/helpers def custom_url_for( name ): domain = getDomain if domain == 'a': return '%s/%s' % ( url_for(name) , 'a' ) elif domain == 'b': return '%s/%s' % ( url_for(name) , 'b' )

Re: custom domain mapping to a controller/id path?

2008-06-17 Thread eleith
thanks. the disadvantage to your approach is that it requires my webapp to have knowledge about the domain pointing to it. however, i think i can modify it a bit, such that my custom_url_for() strips off the paths that are hidden during the url.rewrite done by the webserver. that way i can

Re: jsonp support

2008-06-17 Thread Ian Bicking
Shannon -jj Behrens wrote: I'm using the jsonify decorator. It'd be nice if that decorator were updated to *automatically* support the jsonp parameter http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/. Hence, if I request a URL like http://localhost:5000/api/service?jsonp=foo,

Re: jsonp support

2008-06-17 Thread Shannon -jj Behrens
On Tue, Jun 17, 2008 at 2:55 PM, Ian Bicking [EMAIL PROTECTED] wrote: Shannon -jj Behrens wrote: I'm using the jsonify decorator. It'd be nice if that decorator were updated to *automatically* support the jsonp parameter http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/.

Re: jsonp support

2008-06-17 Thread Shannon -jj Behrens
On Tue, Jun 17, 2008 at 3:21 PM, Shannon -jj Behrens [EMAIL PROTECTED] wrote: On Tue, Jun 17, 2008 at 2:55 PM, Ian Bicking [EMAIL PROTECTED] wrote: Shannon -jj Behrens wrote: I'm using the jsonify decorator. It'd be nice if that decorator were updated to *automatically* support the jsonp

Re: jsonp support

2008-06-17 Thread Ian Bicking
Shannon -jj Behrens wrote: On Tue, Jun 17, 2008 at 2:55 PM, Ian Bicking [EMAIL PROTECTED] wrote: Shannon -jj Behrens wrote: I'm using the jsonify decorator. It'd be nice if that decorator were updated to *automatically* support the jsonp parameter

Re: custom domain mapping to a controller/id path?

2008-06-17 Thread eleith
i've included my custom url_for() function below. since the point of the custom domain mappings is to 'hide' a controller from the URL, the function exploits this when rewriting urls returned by h.url_for(). if the request_uri string contains a reference to the controller, then we are not using

Re: jsonp support

2008-06-17 Thread Shannon -jj Behrens
On Tue, Jun 17, 2008 at 3:25 PM, Ian Bicking [EMAIL PROTECTED] wrote: Shannon -jj Behrens wrote: On Tue, Jun 17, 2008 at 2:55 PM, Ian Bicking [EMAIL PROTECTED] wrote: Shannon -jj Behrens wrote: I'm using the jsonify decorator. It'd be nice if that decorator were updated to *automatically*

Re: WebHelpers-dev change: select() option order

2008-06-17 Thread Shannon -jj Behrens
On Tue, Jun 17, 2008 at 2:52 PM, Mike Orr [EMAIL PROTECTED] wrote: The option order in webhelpers.html.tags.select() has changed from [(label, value)] to [(value, label)]. This matches most real-world lists including dict.items() where the dict is {id : label}. It's the opposite of the old

Re: WebHelpers-dev change: select() option order

2008-06-17 Thread Shannon -jj Behrens
On Tue, Jun 17, 2008 at 7:48 PM, Shannon -jj Behrens [EMAIL PROTECTED] wrote: On Tue, Jun 17, 2008 at 2:52 PM, Mike Orr [EMAIL PROTECTED] wrote: The option order in webhelpers.html.tags.select() has changed from [(label, value)] to [(value, label)]. This matches most real-world lists

Re: best practices for static resources

2008-06-17 Thread Shannon -jj Behrens
On Mon, Jun 16, 2008 at 2:37 PM, Cliff Wells [EMAIL PROTECTED] wrote: On Mon, 2008-06-16 at 14:26 -0700, Cliff Wells wrote: On Mon, 2008-06-16 at 13:03 +0200, Wichert Akkerman wrote: I am trying to figure out what the best practices for dealing with static resources such as CSS, Javascript

Re: Adding content-length in all responses

2008-06-17 Thread Shannon -jj Behrens
On Mon, Jun 16, 2008 at 4:11 PM, Agustín (Cucho) Villena [EMAIL PROTECTED] wrote: Hi! At work we need to add the content-length header in all our responses, but we don't want to hack any method in our controllers to do that. Is there any way to factor out this behaviour in a single place?

Re: Pylons-based JSON-RPC service?

2008-06-17 Thread Shannon -jj Behrens
On Sun, Jun 15, 2008 at 1:12 PM, KJ [EMAIL PROTECTED] wrote: Would Pylons be a good choice for implementing a JSON-RPC-based web service? If yes, can someone point me to a good example? (Actually, I'd be interested in seeing examples of any Pylons-based web service, even if it doesn't use

Re: WebHelpers-dev change: select() option order

2008-06-17 Thread Mike Orr
On Tue, Jun 17, 2008 at 7:49 PM, Shannon -jj Behrens [EMAIL PROTECTED] wrote: On Tue, Jun 17, 2008 at 7:48 PM, Shannon -jj Behrens [EMAIL PROTECTED] wrote: On Tue, Jun 17, 2008 at 2:52 PM, Mike Orr [EMAIL PROTECTED] wrote: The option order in webhelpers.html.tags.select() has changed from