pylons

measuring page request timing in pylons app?

How can I test the time it takes to render a pylons page request? Where do I hook this in? (and what class/method do I use to output this information) I'm sort of new to both pylons and python. ...

Pylons - How to get the current controller and action (current route)?

I'm in a Mako template, and I want to know what the current controller and action is (of the current page). How can I do this? I tried c.controller and c.action, but it didn't work. I also listed the keys of the context object but didn't find it. As a workaround, I've been setting c.controller and c.action from within each controller me...

Why isn't my route working?

The index route works when I go to /home/index But it doesn't work why I type /home/test What is wrong here, very confused! import logging from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from helloworld.lib.base import BaseController, render log = logging.get...

How to create/modify the controller class generated by pylons?

Say I wanted to add some imports to the file generated when I run: paster controller controllern_name Is this possible? ...

How do I run a single test with Nose in Pylons

I have a Pylons 1.0 app with a bunch of tests in the test/functional directory. I'm getting weird test results and I want to just run a single test. The nose documentation says I should be able to pass in a test name at the command line but I get ImportErrors no matter what I do For example: nosetests -x -s sometestname Gives: Trac...

Pylons - Redirects will drop from HTTPS to HTTP unless I specify the protocol... Is there a way to fix this?

On my Pylons website, I have my login form sending it's data to 'https://mysite.com'. Upon a successful login, a redirect takes place to send them to their profile page. redirect(url(controller='profile')) This sends the user to http://mysite.com/profile instead of https://mysite.com/profile. The only way I've found to fix this is to ...

examples of common middleware people use in pylons?

Just trying to get a feel for what common middleware people use in pylons? Is middleware just the main pipeline for the request and response object? i.e. would it be possbile to create a very simple middleware that outputs 'hello world' to the screen? ...

can a django application be run using paster?

can a django application be run using paster? Or is it pylons specific? ...

Do I have to manually create the combined folder when using Python's Minimatic module?

Hi, I'm using the Python library Minimatic found at this site: Minimatic What this essentially does is it minifies and combines all your css and js files into one file. When deploying my Pylons web application on the server, does this mean I have to manually create the combined folders? So if I have the the directory as such: /publ...

openid in pylons (not using authkit)

Hey all, So I'm trying to authenticate users on a Pylons web application using openid. I don't want to use authkit, seeing as it is no longer maintained. I'm currently trying to use python-openid (available from git at http://github.com/openid/python-openid) and having a hard time with it. The pylons framework isn't making it easy for ...

What features does Django have that Pylons doesn't?

From what I understand, Pylons is more of a 'bare bones' framework (where you can choose your ORM and template engine), and Django is a little more rich in nature. What exactly are the features/frameworky elements that Django has that Pylons doesn't? (other than its own ORM, and its auto-admin page generation) ...

Django Pylons myths

I'm just starting with web frameworks and web development (I work only a little with PHP CI) and decided to move to python (I need language for general programing not only limited to web apps). I did research on google and found Pylons and Django as best and most popular web frameworks for python. But on some blogs, discussions people sa...

How to validate the form in pylons in the same controller action that initially rendered it?

I have the following controller: class FormtestController(BaseController): def form(self): return ender('/simpleform.html') @validate(schema=EmailForm(state=c), form='form', post_only=False, on_get=True, auto_error_formatter=custom_formatter) def submit(self): return 'Your email is: %s and th...

Learning Pylons - Where to start

I decided to take the leap in to lower level things last night. I've been working with Django for years now, and I feel after all this time that it is simply not made for software outside of the blog/news/social networking sector. Pylons seems to offer flexibility to do anything you want at the expense of being much more complicated to u...

WSGI based Python web frameworks

I keep hitting road blocks with Django and have read about Pylons. Pylons seemed to be exactly what I needed (greener grass), but then I realized that they have global variables all over the place and loads of black magic infused by dark spirits (spirits so dark that they even kill unicorns). Is there anything out there that is enterpri...

How do I migrate model changes in pylons/sqlalchemy?

I created a simple model and then mapped it to a class using sqlalchemy in pylons: tag_table = schema.Table('tag', meta.metadata, schema.Column('id', types.Integer, schema.Sequence('tag_seq_id', optional=True), primary_key=True), schema.Column('name', types.Unicode(20), nullable=False, unique=...

Why is my data not being represented properly in my SQLAchemy model?

I have a peculiar SQLAlchemy ORM problem. This is occurring in a Pylons application, against a Postgresql 8.2 database using psycopg2 as my database driver under SQLAlchemy 0.6.0 (and tried with 0.6.4 as well) I have defined a User model object that has (at minimum) the following properties: class User(Base): __tablename__ = 'users...

Using Relative Paths To Log Files In Pylons' development.ini

I am working on a Pylons app that runs on top of Apache with mod_wsgi. I would like to send logging messages that my app generates to files in my app's directory, instead of to Apache's logs. Further, I would like to specify the location of logfiles via a relative path so that it'll be easier to deploy my app on other people's servers....

Raw SQL within Pylons app that uses SQLAlchemy?

I've inherited a Pylons app that uses SQLAlchemy. I know nothing about SQLAlchemy and very little about Pylons :) I need to run some raw SQL from within the app. The SQLAlchemy currently seems to be working in the following way (example code): import myapp.model as model model.Session.query(model.KeyValue) # existing code ....

Selecting a Python Web Framework

Hello everybody. This may seem like a subjective question. But it is not (that's not the idea, at least). I'm developing an Advertising software (like AdWords, AdBrite, etc) and i've decide to use Python. And would like to use one of those well known web frameworks (Django, Cherrypy, pylons, etc). The question is: Given that it will ...