There are many ways to deploy Pylons apps.
- Proxying through apache or nginx to paste
- Embedding the app with mod_wsgi
- using some edgy nginx+uwsgi combo
- and probably more...
I've read a lot about the various approaches but failed to really decide which one to choose.
Proxying to paste through nginx seems to be the easiest method...
I'm using pylons, and some of my urls contains non-English characters, such as:
http://localhost:5000/article/111/文章标题
At most cases, it won't be a problem, but in my login module, after a user has logging out, I try to get the referer from the request.headers, and redirect to that url.
if user_logout:
referer = request.headers.g...
I'm using the Mako template system in my Pylons website and am having some issues with stripping whitespace.
My reasoning for stripping whitespace is the generated HTML file comes out as 12363 lines of code. This, I assume, is why Internet Explorer is hanging when it tries to load it.
I want to be able to have my HTML file look nice an...
I want to use cookie-only sessions in pylons. I have found some documents for this problem, but unfortunately, they said a lot, but where and how to config it.
http://pylonshq.com/docs/en/0.9.7/sessions/
http://wiki.pylonshq.com/display/beaker/Cookie-Only+Sessions
I'm new to pylons, and I don't know how to config. Somebody can help me...
I'm using pylons to build websites. I want to write some files to a directory under the root of the project, but I don't konw how can I get the root path(project path) in the controller?
...
Im trying to use port 80.
So when i use the command "sudo paster serve development.ini --reload"
I get this error
pkg_resources.VersionConflict: (Pylons 0.9.7 (/usr/lib/pymodules/python2.6), Requirement.parse('Pylons>=1.0'))
I tried to do "easy_install pylons"
but I get
"Pylons 1.0 is already the active version in easy-install.pth...
Normally, we set the cookie with a single max_age as following:
response.set_cookie('name1', 'value1', max_age=3600*24*365)
response.set_cookie('name2', 'value2', max_age=3600*24*365)
response.set_cookie('name3', 'value3', max_age=3600*24*365)
Note, we set the max_age again and again. How to set a default max_age to all cookies that d...
I'm building a website with pylons. When I develop it, I use paster serve to start the built-in web server.
But now, I want to publish it to a standalone server, which web server I should use? I hope it robust and has hign performance.
...
Normally, we start a pylons web application via command line:
pastser serve --reload development.ini
I wanna know can we start it programmaticly? In a python script file?
I want this because I can start it in IDE, and use the debugger
...
I followed the application to run the tests of pylons project:
http://pylonshq.com/docs/en/0.9.7/i18n/#testing-the-application
But when I run:
nosetests --with-pylons test.ini
It reports an error:
E:\pylons\helloworld>nosetests --with-pylons test.ini
Usage: nosetests-script.py [options]
nosetests-script.py: error: no such option:...
I'm trying to setup my Routes and enable an optional 'format' extension to specify whether the page should load as a standard HTML page or within a lightbox.
Following this http://routes.groovie.org/setting_up.html#format-extensions, I've come up with:
map.connect('/info/test{.format:lightbox}', controller='front', action='test')
clas...
Hey.
I created a new Pylons project, and would like to use Cassandra as my database server. I plan on using Pycassa to be able to use cassandra 0.7beta.
Unfortunately, I don't know where to instantiate the connection to make it available in my application.
The goal would be to :
Create a pool when the application is launched
Get a c...
I have textmate, but honestly the only thing I can do with it is simply edit a file.
The handy little file browser is aslo useful. (how can I show/hide that file browser anyhow!)
But I have no other knowledge/tricks up my sleeve, care to help me out?
...
I have a macbookpro.
I downloaded virtualenv.py from pylonsbook.com/virutalenv.py
when I type:
python virtualenv.py --no-site-packages env
it outputs:
New python executable in env/bin/python
then it just hangs, I don't get the prompt in terminal.
I've restarted the computer and I get the same result, what's wrong?
...
About a month ago I setup Pylons on my VPS in a virtual environment using the go-pylons.py script they provide. I've, since then, been working on my website and have it all up and running. It works great.
Recently though I discovered that I created my virtual python environment using Python2.5. I now want to change this to Python2.7
I'...
I've written a very rudimentary attempt to integrate Arecibo reporting with Pylons, but the sad fact of the matter is that it basically doesn't work.
I've conceived of this as middleware, but I'm not sure A) where to put it in the middleware stack without interfering with other aspects of the middleware, B) how to get at various bits of...
I'm using pylons, and my action of controller is:
class UserController(BaseController):
def create(self):
name = request.POST['name']
email = request.POST['email']
password = request.POST['password']
...
But I found in turbogears, I can do like this:
class UserController:
de...
I've met the same problem as this page:
http://www.mail-archive.com/[email protected]/msg14292.html
This is the main content from there:
I am using formencode to validate my
forms, and I've stumbled upon a
problem. When using tha validator
inside the controller action, I call
to_python() and I can pass the sta...
I've developed a website in Pylons (Python web framework) and have it running, on my production server, under Apache + mod_wsgi.
I've been hearing a lot of good things about nginx recently and wanted to give it a try. Currently, it's running as a forwarding proxy to create a front end to Paste. It seems to be running pretty damn fast.....
I want to log the controller and action when a request comes, so I write a __before__ in the base controller:
class BaseController:
__before__(self):
controller = get_controller(request)
action = get_action(request)
logger.log('%s - %s'%(controller, action))
But I don't know how to get the controlle...