Hi Stackoverflow!
I ran up against a few problems with Pylons/Formencode today when it came to validating multiple checkboxes. As a bit of background I have something like this in my Mako template:
<input type="checkbox" name="Project" value="1">Project 1</input>
<input type="checkbox" name="Project" value="2">Project 2</input>
<input ...
I have a website that right now, runs by creating static html pages from a cron job that runs nightly.
I'd like to add some search and filtering features using a CGI type script, but my script will have enough of a startup time (maybe a few seconds?) that I'd like it to stay resident and serve multiple requests.
This is a side-project...
I'm writing a web application using pylons and paste. I have some work I want to do after an HTTP request is finished (send some emails, write some stuff to the db, etc) that I don't want to block the HTTP request on.
If I start a thread to do this work, is that OK? I always see this stuff about paste killing off hung threads, etc. Will...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.6/site-packages/psycopg2/__init__.py", line 60, in <module>
from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: dlopen(/Library/Python/2.6/site-packages/psycopg2/_psycopg.so, 2): Symbol not found: _PQbackendPID
R...
How does one set the date on the CalendarDatePicker. i.e. it defaults to current date and I want to display it with another date which I will set from my controller.
I am displaying the CalendarDatePicker widget in a TableForm from tw.form. I have looked at this for a few hours and can't work out how to do this so any pointers greatly a...
I have a number of mappers that look like this:
mapper(Photo,photo_table, properties = { "locale": relation(PhotoContent, uselist=False, primaryjoin=and_(photo_content_table.c.photoId == photo_table.c.id, photo_content_table.c.locale == get_lang()), foreign_keys=[photo_content_table.c.photoId, photo_content_table.c.locale])
I have dep...
I have a Python 2.6 web app built on Pylons 0.9.7. The code in my controller only runs the first time a client requests it, which is fair enough, but is there any way I can run some code as soon as the server starts and is ready to accept requests, without waiting until a request is actually received?
...
I was playing around making a simple haiku site using sqlalchemy and pylons. It basically takes a haiku, writes it to a database, and displays the haiku. The problem appears when I get the data from the form and try and write it to a database, Pylons give me this error: AttributeError: 'tuple' object has no attribute 'insert' after I run...
I'm running a pylons app using fastcgi and apache2. There are two versions (different revisions from my svn repo), one for staging and one for production. I'd like them to use different paste config files.
Right now, my dispatch.fcgi inside htdocs in the pylons app just uses one config file (so both stage and live use the same confi...
It seems like threading.local is more straightforward and more robust.
...
I'm a beginner with Pylons and I've mostly developed on my localhost using the built-in web server. I think it's time to start deployment for my personal blog, I have a Debian Lenny server with apache2-mpm-prefork module and mod_wsgi - I've never really used mod_wsgi or fastcgi and I hear either of these are the way to go.
My questions:...
Let's say you've setup your site using Pylons, Django and most of the site runs fine and according to the framework used. However, what if you had a custom section that was entirely say, composed of flat html files and its own set of images, which you didn't have time to actually incorporate using the framework and were forced to basical...
I'm new to both Pylons and AuthKit. I have basic authentication via AuthKit working in my application, but I don't know how to customize the template for the login page. The one included with AuthKit is very generic.
I found Pylons: Mako Templates in AuthKit, but I thought there might be a more up-to-date solution.
...
Anyone happen to use this combination in their web application? I'm having a bit of trouble finding some sort of tutorial or guideline for configuring this. Also seeing as how I started using Pylons recently I'm not familiar so please keep the advice very newbie friendly ( I haven't even used modules like Beaker all that much ).
I'm usi...
Hello,
I am working on my first pylons + SQLAlchemy app (I'm new to both).
As I change my mind on the table structure, I wish there was a similar function to metadata.create_all(), that checks if there are new columns definitions and create theme in the database.
Does such a function exist ?
...
I expect to run Pylons on a Windows Server 2003 and IIS 6 on a Virtual Private Server (VPS). Most work with the VPS is done through the Plesk 8.6 panel. The Plesk panel has a lot of maintenance advantages for us. However, this Plesk configuration installs ActiveState Python 2.5.0. The Parallels Plesk documents for 8.6 and version 9 insis...
I'm using Paste to run a Pylons application. Is there a way to specify in my paste config file to use the egg from the current directory (the same dir as the config file) instead of looking in global site-packages?
For example, right now the config file has:
[app:main]
use = egg:example
This definitely looks to site-packages. This ...
I currently have a Pylons application running with a basic user system set-up. I want to try and create a widget that shows the users that are currently logged on to the website. I'm not sure how I should handle this though; I'm not sure if pylons sessions being active are based on whether or not a user is actually on the web apps page o...
Is it possible to get the current windows user from with in pylons?
I am starting a pylons app that is going to be used from within a controlled Windows domain.
Is it possible to get the logged on user?
Much like I would do in ASP.NET with Page.User.Identity.Name.
...
from decorator import decorator
from pylons.decorators.util import get_pylons
def allowed_roles(roles):
def wrapper(func, *args, **kwargs):
session = get_pylons(args).session
# edit pylons session here.
return func(*args, **kwargs)
return decorator(wrapper)
Can anyone explain how it works?
...