Re: How to correctly include javascript code in chameleon/zpt template on pyramid?

2011-03-04 Thread Brennan Todd
Same thing happens in Genshi, I have to put all javascript in comments... On Thu, Mar 3, 2011 at 2:25 PM, soulcheck wrote: > Ok i tried the example on w3c valitador with doctype set to xhtml > transitional, and it returned error, so it's normal in xhtml. I should > have

Re: Referencing SQLAlchemy engine from tests/__init__.py

2010-08-04 Thread Brennan Todd
On Wed, Aug 4, 2010 at 1:38 AM, Ryan wrote: > I followed this how-to (http://farmdev.com/projects/fixture/using- > fixture-with-pylons.html) on using fixtures with Pylons, which was > written for 0.9.7. In the `tests/__init__.py` file, an > `SQLAlchemyFixture` object needs to be instantiated, whi

Re: Form libraries (again)

2010-06-23 Thread Brennan Todd
Client side validation is all well and good for reducing unnecessary round trips, etc... but the fact is you cannot depend on it working. There's nothing wrong with using it (I use it all the time), but it cannot be the only thing you use. At some point you have to make as sure as possible that the

Re: Confused about routes.py

2010-03-30 Thread Brennan Todd
Try deleting the index.html file that is in your public directory. Files in "public" are served before the middleware stack (your controllers) is consulted. On Tue, Mar 30, 2010 at 4:26 PM, writeson wrote: > Hi all, > > I've built a Pylons application, added some controllers and have pages > wor

Re: Finding sqlalchemy's engine

2010-03-09 Thread Brennan Todd
> > > I have an engine and things work. I'm trying to get to the engine > object from my accounts.py file so that I can instantiate a table > object using sqlalchemy's reflection "autoload_with=engine". I guess > the better way to have phrased my question would have been "what do I > need to imp

Re: Writing a web app as a series of plugins

2010-02-16 Thread Brennan Todd
On Tue, Feb 16, 2010 at 5:28 AM, mk wrote: > Hello everyone, > > I need to write a rather large web app using Pylons. > > I'm trying to work out if it could be written as a series of plugins, some > of them realizing "core" functions, and some being addons, e.g. Email > Management or FTP Manageme

Re: Common entry and exit point for pylons app

2010-02-05 Thread Brennan Todd
> > For shutdown, I AM BAFFLED. > > Have you looked at the atexit module? http://docs.python.org/library/atexit.html -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsu

Re: Webfaction

2009-07-07 Thread Brennan Todd
> > Has anyone put a pylons application on webfaction. Did you use their > pylons install or did you use virtualenv. Any step step by step > directions would be appreciated. I used the built-in install, then upgraded it using easy_install. --~--~-~--~~~---~--~~ Yo

Re: Plugin architecture

2009-04-29 Thread Brennan Todd
I've been having some luck using Trac's component architecture to create plugins for my pylons project. Each plugin is installed using easy_install, and registers itself with a certain entry point name, which is discovered by the pylons app during startup. I have - a Component which adds new d

Re: Last inserted row

2009-03-26 Thread Brennan Todd
> > t_accounts = Table("accounts", meta.metadata, autoload=True, > autoload_with=engine) > t_persons = Table("persons", meta.metadata, autoload=True, > autoload_with=engine) > > I tried this syntax instead: > orm.mapper(Account, t_accounts, properties={'persons': >> >> relation(Person, >> primary

Re: Response hangs when using SQLAlchemy

2009-03-03 Thread Brennan Todd
> > > My Code > == > try: >orm.flush() >orm.commit() > except Exception, e : >orm.rollback() # Rollback transaction ># Release all connections and expunge objects ># Don't allow any other code to use session, f

Re: Sqlalchemy: querying table in different functions gives different results

2009-02-17 Thread Brennan Todd
Which database are we talking about here? On Tue, Feb 17, 2009 at 2:13 PM, Bryan wrote: > > It is called in a separate web request. I am using scoped_session, so > if the 2 requests were on the same thread, they should use the same > session. I don't think the 2 requests are on the same thread