I have a remote database (at the moment sqlite, but eventually mysql) that I want to be able to call from a webpage dynamically. Basically to query for data that will populate goog viz charts etc on the page (and possibly images).
I have a small, slow server that i can basically run anything on. I've also located the python lib that let...
I'm writing a couple of Jinja2 templates that basically implement some common grid layouts. I'd like to be able to share this 'library' of templates between a Pylons app and Django app.
I've hit a minor stumbling block in that Django's template context is accessible from the "top-level" of the template, whereas Pylons wraps your conte...
in pylons, is it possible to loop through all the controllers and their actions?
I want to create a javascript object that has all the controllers and their actions
...
The validate and authenticate_form decorators don't seem to play nice together. This is my template:
<html>
<title>Test</title>
<body>
${h.secure_form('/meow/do_post')}
<input type="text" name="dummy">
<form:error name="dummy"><br>
<input type="submit" name="doit" value="Do It">
${h.end_form()}
</body>
</html>
And this is the controll...
I've noticed three main ways Python web frameworks deal request handing: decorators, controller classes with methods for individual requests, and request classes with methods for GET/POST.
I'm curious about the virtues of these three approaches. Are there major advantages or disadvantages to any of these approaches? To fix ideas, her...
Python noob trying to learn Pylons. I'm using the QuickWiki tutorial (http://pylonshq.com/docs/en/1.0/tutorials/quickwiki_tutorial/) from the 1.0 documentation, but this alleged "1.0" doc seems to just be "0.9.7"; I suspect that this has something to do with the error I'm getting.
When I execute "paster setup-app development.ini", I get...
My Pylons app uses local MySQL server via SQLAlchemy and python-MySQLdb. When the server is restarted, open pooled connections are apparently closed, but the application doesn't know about this and apparently when it tries to use such connection it receives "MySQL server has gone away":
File '/usr/lib/pymodules/python2.6/sqlalchemy/engi...
Good day!
I'm learning Pylons web framework to create web UI for my database.
Currently I'm exploring ways to declare my model. The most sexy way seems to be declarative with reflection.
Can I use it with Pylons?
(Because model/init.py states that I need to define reflection related staff inside init_model)
Thanks!
...
Currently, I'm using request.params["filename"] to access uploaded files.
In Pylons, what is the syntax to access a file if you don't know the filename, something like request.files[0]?
...
I have a connection to an external resource that I need to make for my Pylons app (think along the lines of a database connection.) There is a modest amount of overhead involved in establishing the connection.
I could setup a piece of middleware that opens and closes the connection with every request but that seems wasteful. I'd like to...
Hi all,
I'm building Pylons web applications that use a lot of jQuery and AJAX/JSON to make these apps more Web 2.0'ie. I've been looking at the server push technologies and have questions about how to do this with Pylons. I've looked at Comet and NodeJS (though I don't know much about NodeJS yet) and am confused about what would be a g...
Hi to all,
For my site need some "widgets" that elaborate output from various data models, because this widgets are visible in any page is possible with mako to retrieve the data without pass (and elaborate) every time with render() in controllers?
...
I want to use a custom base controller for my wep application that has a User object as a property, and a boolean IsLoggedIn property.
In the constructor of the base controller (or whatever event I need to do this in??) I want to look for a session cookie, if present, load the user and set the User object and set the IsLoggedIn property...
I recently jumped on a project using Pylons. I'm not familiar with either Python or Pylons, but I haven't had very much trouble getting the hang of things.
Pylon projects seem to cache templates indefinitely by default and I can't figure out a way to clear the cached templates (stored by default in /data/templates) except by manually de...
paster serve --reload development.ini
..for debug = true
THis is what I do to load a development server for Pylons.
However, when I do:
print "hello world"
THis message doesn't print out in the console. In Django, it does.
...
We're trying to setup controller tests for our Pylons app. I made a very simple controller and a very simple test. The tests looks like:
class TestMainController(TestController):
def test_index(self):
response = self.app.get(url(controller='main', action='index', var1 = '1'), params={'var2':'2'})
print response.req
...
How do you debug (trace execution) of a pylons web application?
(using a mac with textmate)
...
I have a problem with Pylons + SQLAlchemy.
When something goes wrong (in my case it is integrity error, due to a race condition) and the database error is raised, all following requestы result in the error being raised:
InvalidRequestError: The transaction is inactive due to a rollback in a subtransaction. Issue rollback() to cancel t...
Heya!
I've a case where I'm using one table to store user and group related datas. This column is called profile. So, basically this table is many-to-many table for the cases where one user is belonging in to many groups or there are many users in one group.
I'm a bit confused how it should be described...
Here's a simplified presenta...
I am looking for a TextMate Bundle for Pylons development. Does anyone know of an existing bundle for Mako and/or SQLAlchemy.
I found these two existing articles but the links are no longer valid
If someone knows of a currently active link please let me know
Thanks
...