paster

How to run included tests on deployed pylons application

I have installed pylons based application from egg, so it sits somewhere under /usr/lib/python2.5/site-packages. I see that the tests are packaged too and I would like to run them (to catch a problem that shows up on deployed application but not on development version). So how do I run them? Doing "nosetests" from directory containing ...

Is it possible to launch a Paster shell with some modules pre-imported?

Is it possible to run "paster shell blah.ini" (or a variant thereof) and have it automatically load certain libraries? I hate having to always type "from foo.bar import mystuff" as the first command in every paster shell, and would like the computer to do it for me. ...

Pylons: address already in use when trying to serve

I'm running pylons and I did this: paster server development.ini It's running on :5000 But when I try to run the command again: paster serve development.ini I get this message: socket.error: [Errno 98] Address already in use Any ideas? ...

Deploying Pylons with Nginx reverse proxy?

Is there a tutorial on how to deploy Pylons with Nginx? I've been able to start nginx and then serve pylons to :8080 with paster serve development.ini However, I can't seem to do other stuff as pylons locks me into that serve mode. If I try to CTRL+Z out of pylons serving to do other stuff on my server, pylons goes down. There must b...

Paste (Python) Web Server - Autoreload Problem

When I start the `Paste' web server in daemon mode, it seems to kill off it's ability to reload when the timestamp of a source file is updated. Here is how I start the daemon... cd ${project} && ../bin/paster serve --reload --daemon development.ini; cd ..; ...which defeats one of the main points of using Paste (for me). Has anyone c...

Paster cannot stop daemon

I'm using the following command in my pylons app in an attempt to stop the daemon on the server: paster serve --daemon dev.ini stop This is the error I get: No PID file exists in paster.pid Could not stop daemon; aborting Wondering how I can stop this daemon so I can reload dev.ini. Thanks! ...

pylons/paste config files in fastcgi (deployment)

I'm running a pylons app using fastcgi and apache2. There are two versions (different revisions from my svn repo), one for staging and one for production. I'd like them to use different paste config files. Right now, my dispatch.fcgi inside htdocs in the pylons app just uses one config file (so both stage and live use the same confi...

How do I profile `paster serve`'s startup time?

Python's paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I would like it to not fork a thread pool and quit as soon as it is ready to serve so the time after it's ready doesn't show up in the profile....

python paste using global egg instead of local one

I'm using Paste to run a Pylons application. Is there a way to specify in my paste config file to use the egg from the current directory (the same dir as the config file) instead of looking in global site-packages? For example, right now the config file has: [app:main] use = egg:example This definitely looks to site-packages. This ...

What is paste script ?

I'm trying to understand what paste script and paster are. The website is far from clear. I used paster to generate pre-made layouts for projects, but I don't get the big picture. As far as I understand, and from the wikipedia entry, it says it's a framework for web frameworks, but that seems reductive. paster create seems to be able t...

paster errors after installing distribute 0.6.10

Been working on a Plone site for the last few weeks, it's the first time I've worked on one using buildout for recipes and paster for template generation, and it's been a learning curve. two days ago, everything was working fine. Yesterday, I started working from my known good source and used paster to generate boilerplate for a new...

Pylons Custom Middleware return 404

Hey all I have the following code as a middleware in an pylons application: import testing.model as model import re from pylons.controllers.util import abort class SubdomainCheckMiddleware(object): def __init__(self, app): self.app = app def __call__(self, environ, start_response): if 'subdomaincheck' in envir...

Pylons Uploading Distorted Images on Windows

I'm creating an web app in Pylons, and am working on an image upload action. This is currently running using egg:paste#http on my windows machine, in the basic development configuration described in the pylons documentation quickstart. When I POST an image to my application, then move the image to the web root directory, then pull the ...

How do I use Flickzeug to get interactive tracebacks from a paste deploy WSGI pipeline?

I'd like to use Flickzeug to see interactive tracebacks by adding it to my paste deploy file's pipeline. The following doesn't work. What will? [pipeline] pipeline = flickzeug myapp ...

How to run a clone of reddit.com website. Reddit.com source code gives error while implementing on Ubuntu 9.10 (karmic)

Hello Everybody!! I am implementing the reddit.com source code on ubuntu karmic 9.10. I have followed all the steps and in one step where i am using paster command it throws an error. $paster shell example.ini File "/usr/local/lib/python2.6/dist-packages/Pylons-0.9.6.2- py2.6.egg/pylons/middleware.py", line 11, in from webhelper...

What is the paste deploy uri syntax?

Paste Deploy can reference code with uris such as [section] use = egg:FooBar#baz What is the full syntax for these uris? ...

How to get "paster request" to use config host value instead of localhost?

I'm trying to access my pylons application via cron job to send notifications to my users. The way I'm doing this is by running the application using something like: paster request myconfig.ini /maintenance/do In the actual controller I check for the "paste.command_request" to block public access. Everything works but the only problem...

Losing 'post' requests sent to Pylons paster server

I'm sending post requests to a Pylons server (served by paster serve), and if I send them with any frequency many don't arrive at the server. One at a time is ok, but if I fire off a few (or more) within seconds, only a small number get dealt with. If I send with no post data, or with get, it works fine, but putting just one character of...

Where did Pylons beautiful error handling go? Using Nginx + Paster + Flup#fcgi_thread

I need to run my development through nginx due to some complicated subdomain routing rules in my pylons app that wouldn't be handled otherwise. I had been using lighttpd + paster + Flup#scgi_thread and the nice error reporting by Pylons had been working fine in that environment. Yesterday I recompiled Python and MySQL for 64bit, and al...

Pylons: doubt about websetup.py use

Hi, reading pylons documentations I did understand that websetup:setup_app is only called when the application is setup at first time by paster script. But, I found now, setup_app is call every time that application starts. Debugging the code, this behaviour seems right beacuse in appinstall.setup_config the module is loaded (as PRJ.web...