I need to access the rfile and wfile properties of a request handler instance. AFAIK, such a handler is instantiated by the framework during request lifetime.
Update: I found that rfile is accessible through request.environ['wsgi.input']. To access wfile I've do a hack with the additional line in Paste sources, httpserver.py:210:
,'wsg...
Hi.
I have a dynamic form, i must bulid some post array to field witch some id.
For example:
<input type="checkbox" name="field[124][]" value="1">
<input type="checkbox" name="field[124][]" value="2">
In php i can simply get value and key.
foreach($_POST as $key => $value){
if(is_array($value){
foreach($value as $key2 => $value2...
Am going around the houses trying to find a way to implement a simple filter.
I want to create the equivalent of some Smarty "tags" to make porting easier, notably
{mail_to} http://www.smarty.net/manual/en/language.function.mailto.php
I seem to be going around in circles between the jinga2 docs
http://jinja.pocoo.org/2/documentation/...
I've been reading the Pylons Book and, having got to the part about Models, realise it's out of date. So I then switched over to the official Pylons documentation for creating Models in Pylons 1.0 - http://pylonshq.com/docs/en/1.0/tutorials/quickwiki_tutorial/
I've followed what they've got and it's still failing.
./blog/model/init.py
...
I'm developing under Pylons using Mako templates. The problem is that I need to assign a string from some attribute of tmpl_context to a JavaScript variable in a page body. The additional problem is that this string can be quite arbitrary, ie can contain such characters like ", ', <, >, etc... Is there a common way to do such assignment?...
I've been getting into Pylons lately and was wondering how I could go about easily integrating AJAX functionality into my websites.
Basically, lets say I had a login form that usually gets accessed via site.com/user/login. Now, generally, this will be handled via something like:
class UserController(BaseController):
def login(self):...
Aight ya'll, I gotta lay a Python question on you...
I've been doing some work with Pylons recently and quite like the SQLAlchemy model for database interaction. There's one section of my website though which I think could benefit from an EAV schema.
Using this as my table example:
id | userid | type | value
---+--------+--------|--...
I've read "Multiple database connections with Python + Pylons + SQLAlchemy" and I get how to create multiple engines using that technique, but now I'm looking for advice on how to handle the creation of Sessions for these engines. Right now, the Session in my project is defined as per Pylons convention: myapp.model.meta.Session = scoped_...
Hi everyone!
I'm building a web frontend to a server-side application, using Pylons 1.0.
Right now I'm writing the first form, and I'm facing a problem concerning validation.. Using FormEncode and the @validate decorator I can easily validate the user input from a client-side perspective, but when I submit the data to the server, it may...
I'm using Pylons/Genshi, and trying to show 'all recent comments' on my site with a Disqus javascript widget (Disqus is installed on the site, and I can post comments OK).
However, the code below produces a nasty 500 error:
TemplateSyntaxError: not well-formed (invalid token): line 25, column 121 (line 25 is the <script> line).
<d...
I've been working on a Pylons site and just now started to create my database. I made my User model class and then issued paster setup-app development.ini. Worked great.
However, now when I try to paster serve --reload development.ini, I get the following error:
ConfigParser.MissingSectionHeaderError: File contains no section headers.
...
By default the RESTful controller in Pylons supports single-part IDs for objects. This works for some kinds of objects, but my domain model has a set of objects that have composite identifiers, and I'd like to be able to build good URLs for those as well.
This is what is currently supported:
GET /advanis/saas/projects/id: Show a specif...
I have successfully deployed a Django app with uWSGI + Cherokee.
However, I want to experiment with Pylons before I go decide on Django.
So far I have followed the instructions/recommendations here:
http://stackoverflow.com/questions/2217679/deploying-pylons-with-uwsgi
Paster serve works without a hitch. But when I try to serve via uWS...
Hello,
I am just starting to use a web framework. I have decided I really like python and started looking at web frameworks. I don't really like django for a few reasons, but from what I have tried so far I found I really like pylons.
The problem I have is that I can't find that many articles/tutorials about pylons, especially 1.0 art...
I have a form that is similar to the following:
Enter Name:
Enter Age:
[add more]
That add more field copies the Name and Age inputs and can be clicked as many times as the user wants. Potentially, they could end up submitting 50 sets of Name and Age data.
How can I handle this received data when it's posted to my Pylons application?...
Hi,
I am a current web2py user, but find I still go back to Django once in a while (where I started). Specifically when working on projects where I want to make use of some specific django apps/plugins/extensions that don't yet exist in web2py.
One thing that I can't live without in web2py, which I am looking for a solution for in Dja...
I had no issue with Django + uWSGI + Cherokee. BUt I would like to try pylons before committing to either framework.
I followed the tutorial from pylonshq.com - 1.0/gettingstarted
I ran into no problems when running pylons with paste.
So I used instructions to run pylons with uWSGI from projects.unbit.it - uwsgi/wiki/UsePaste
This is...
I'm trying to setup Pylons (1.0) with Apache mod_wsgi. Everything works fine with mod_wsgi and I can run a simple python wsgi app just fine.
I've got the quickwiki example from the Pylons site working when running it with paster, but obviously I would never deploy in such a manner - so I'm trying to get the Quickwiki example working w...
Aight, basically, I have a database that looks like this:
id | parentid | type | name
---------------------------------------------
1 | 0 | heading | this is my heading
---------------------------------------------
2 | 1 | child | this is one of many child elements
I'm using Mako to go through that list of data an...
This is rather a general question about MVC.
I have a set of templates for multiple controllers and their actions. All of them inherit from a overall template that contains footer/header.
I want header to render email of currently logged in user. Common task.
All tutorials are too simple to have basic example of how and where do I pa...