Re: SQLAlchemy + URL Dispatch Wiki Tutorial

2012-05-09 Thread Feng Wang
It's not a bug. If you use sqlite or Postgresql, it's OK. But for others ,you must provide a length to String, Integer, Numeric

Re: SQLAlchemy + URL Dispatch Wiki Tutorial

2012-05-08 Thread Ian McLoughlin
Thanks Feng, I changed this line in models.py: name = Column(Text, unique=True) to: name = Column(String(255), unique=True) I was just wondering if I was doing something wrong, or if it was a bug. I'll change the model in any case. Thanks for the help, Ian On Tuesday, 8 May 2012 06:05:56 UTC+

Re: SQLAlchemy + URL Dispatch Wiki Tutorial

2012-05-07 Thread Feng Wang
what ORM do you use? SqlAlchemy? It seems that you should give a length property to the "name" column. 在 2012年5月2日星期三UTC+8下午7时45分58秒,Ian McLoughlin写道: > > Thanks Chris, > > I found that script. > Now I'm getting an error on running it: > > $ initialize_pyramid-skeleton_db development.ini > ... >

Re: SQLAlchemy + URL Dispatch Wiki Tutorial

2012-05-02 Thread Ian McLoughlin
Thanks Chris, I found that script. Now I'm getting an error on running it: $ initialize_pyramid-skeleton_db development.ini ... sqlalchemy.exc.OperationalError: (OperationalError) (1170, "BLOB/TEXT column 'name' used in key specification without a key length") '\nCREATE TABLE models (\n\tid INT

Re: SQLAlchemy + URL Dispatch Wiki Tutorial

2012-04-19 Thread Chris McDonough
On 04/19/2012 07:41 AM, Ian McLoughlin wrote: I've tried simply to create an alchemy scaffold app, only changing the development.ini file to use a MySQL database. I've created the database already, but it's empty - no tables. Running pserve then i get an error because the database hasn't been se

SQLAlchemy + URL Dispatch Wiki Tutorial

2012-04-19 Thread Ian McLoughlin
I've tried simply to create an alchemy scaffold app, only changing the development.ini file to use a MySQL database. I've created the database already, but it's empty - no tables. Running pserve then i get an error because the database hasn't been setup. I looked at the Pyramid tutorial here: ht

Re: Closing SQLAlchemy session in SQLAlchemy + URL Dispatch Wiki Tutorial

2012-01-20 Thread Brian Brinegar
Thanks Michael, You were correct, the pyramid_tm was not listed as an includes in my configuration file. I appreciate your help, and I'll be sure to send future such queries to the -discuss group, Brian On Fri, Jan 20, 2012 at 10:22 AM, Michael Merickel wrote: > First of all, this should be po

Re: Closing SQLAlchemy session in SQLAlchemy + URL Dispatch Wiki Tutorial

2012-01-20 Thread Michael Merickel
First of all, this should be posted to pylons-discuss, not pylons-dev. The tutorial is configured to use the pyramid_tm package which is a transaction manager that effectively wraps the request in a transaction and will call session.close() on any sessions that were configured with extension=[Zope

Closing SQLAlchemy session in SQLAlchemy + URL Dispatch Wiki Tutorial

2012-01-20 Thread Brian
I'm running a simple Pyramid app using SQLAlchemy with a MySQL backend. Pool recycle is set to 3600. The application is similar to the SQLAlchemy + URL Dispatch Tutorial in the documentation. After some number of hours of running application I receive timeout errors indicating that the QueuePool

SQLAlchemy + URL Dispatch Wiki Tutorial

2011-12-03 Thread rihad
Hi, all. http://docs.pylonsproject.org/projects/pyramid/en/1.2-branch/tutorials/wiki2/authorization.html I think there's an error in the "Adding Authorization" authorization part. In login.py, login() should return in the dict: url = request.url, instead of: url = request.appl