pylons

Python: Redis as session backend to Beaker

Anyone had success with using Redis as Beaker backend? Can you tell me link or library how to do it? I am looking for any library which does this but could not get anything out of google search. ...

How to render HTML form from schema using formencode?

I'm using formencode for validating and submitting forms in my Pylons application. The documentation says that it can be used also for generating forms, but there is no any example. I even found the old topic which says it can be done with form = HTMLForm(form_template, FormSchema) form.render() but for the latest version of formenco...

How to get sorted results in MongoKit?

How can I perform query like: db.articles.find().sort({created_at: -1}).limit(5); in MongoKit driver? Perhaps I'm blind, but I can't find it in manual. I want to retrieve 5 last products ordered by 'created_at'. MongoKit offers to sort result list (it's more then 2000 items) and slice it. It's unaccepable, I want to sort() and limit() o...

How do I use repoze.who/repoze.what with SPNEGO?

I'm trying to do single sign-on (SSO) with an intranet web application written in Pylons and I'd like to use repoze.what for authorization. I have Apache configured with mod_sspi and it correctly authenticates the user and sets the REMOTE_USER environment variable. However, I can't figure out how to convince repoze.who that the user is,...

Pylons documentation like Ruby on Rails API?

Anyone know of documentation for Pylons that is similar to the Ruby on Rails API documentation (http://api.rubyonrails.org)? ...

Error using redirect in pylons.

Using Pylons verson 1.0: Working on the FormDemo example from the Pylons book: http://pylonsbook.com/en/1.1/working-with-forms-and-validators.html My controller has the following functions: class FormtestController(BaseController): def form(self): return render('/simpleform.html') def submit(self): # Code to ...

How can you make Pylons email you the full post parameters with an error report?

Pylons can email you errors when something goes wrong in production mode, but it truncates the post parameters so it's hard to see what the error is. Is there a way to make it email you the whole thing? ...

reddit get_comments action, can someone clarify what is going on here?

I'm trying to understand reddit's source, and I am looking at the get_comments action method of front.py This is the action that displays a story: http://code.reddit.com/browser/r2/r2/controllers/front.py#L139 Specifically, what is the top part of the method doing where there is a @Validate marker? And on the bottom near the return, ...

How to translate javascript-files in Pylons

Heya! We're making an application by using Pylons and JQuery. We have used standard way of making translations, but it doesn't quite work with javascript. The awkwardness of js-translation methods is that we should make duplicate processes for selecting languages etc. Is there a proper support in Pylons for javascript-translations? ...

Destroy session in Pylons or Python

I can't find information on how to destroy / kill a session within Pylons or Python on the interwebs. Thought it would be a good idea just to ask it here so that when I need to do it again a year from now I'll find this question :) So I'm looking for a PHP session_destroy() equivalent for Pylons or Python. Thanks, Maggi ...

Access Control in Pylons App?

Hi. Did you now some class for pylons to controll access for each view? Thanks, for the info! :) ...

Should I use Pylon's Paste to host my Pylons website? Or can I use Apache?

I'm looking into Pylons and was wondering, should I use Paste as the webserver or can I use Apache? Are there advantages to using Paste? Would you recommend against using Apache? How should I host the sites? ...

How do I use pylons (paste) webtest with multiple checkboxes with the same name?

Suppose I have a form like this: <form id='myform'> Favorite colors? <input type='checkbox' name='color' value='Green'>Green <input type='checkbox' name='color' value='Blue'>Blue <input type='checkbox' name='color' value='Red'>Red <input type='submit' value='Submit'> </form> How do I use webtest's form library to t...

Is there a python implementation to .net automapper?

Automapper is a object-object mapper where we can use to project domain model to view model in asp.net mvc. http://automapper.codeplex.com/ Is there equivalent implementation in Python for use in Django(Template)/Pylons ? Or is there necessity for this in Python world? ...

Getting started with Pylons and MVC - Need some guidance on design.

I've been getting more and more interested in using Pylons as my Python web framework and I like the idea of MVC but, coming from a background of never using 'frameworks/design patterns/ what ever it\'s called', I don't really know how to approach it. From what I've read in the Pylons Book, so far, it seems I do the following: Create ...

Pylons can't see my config dictionary

UPDATE: Figured it out. I was loading the config options into production.ini, then running config.ini. DUH! I'm setting up an existing project in Pylons and trying to tell it about my local configuration options. I've run paster make-config my_app production.ini and edited the production.ini file to include the options I need, inc...

What is the Pylons equivalent of Django's 'syncdb'?

Short and sweet question: I've inherited a Pylons site with a bunch of models. If it was Django I would simply run 'syncdb' to set up a local database. What is the equivalent in Pylons? ...

Pylons 1.0 and SQLAlchemy 0.6 - How do I Model?

I've been reading http://pylonsbook.com/en/1.1/starting-the-simplesite-tutorial.html and following along with their SimpleSite tutorial but am having some issues with creating the Model. The Model imports they use on the tutorial are: """The application's model objects""" import sqlalchemy as sa from sqlalchemy import orm from simples...

Pylons 1.0 - c.id no longer being automatically set on python v2.6.2 and 2.7

I am at a loss on this one, I intalled a SSD on my dev box today and started with a fresh development environment. In short, pylons no longer sets the c.id based on the id passed to the action. Code, error, and libs install: http://pastie.org/1064929 Very strange, because my production server is mirroring my python version (2.6.2) and...

How do I get paster serve to serve both HTTP and HTTPS requests at the same time?

For now I have the following lines in a project configuration on pylons: [server:main] ... ssl_pem = /path-to-pem/file-name.pem so paster serves only HTTPS requests but not HTTP. Any HTTP request causes the following exception in paster debug console: Traceback (most recent call last): File "/home/eigenein/Projects/Python/Pylons/li...