SQLAlchemy and Pylons

2007-05-23 Thread voltron
What is the recommend usage of SQLAlchemy and Pylons? I found these links, what is preffered? http://www.rexx.com/~dkuhlman/pylons_quick_site.html#database-access-using-a-data-model http://docs.pythonweb.org/display/pylonscookbook/SQLAlchemy+for+people+in+a+hurry Thanks

Re: SQLAlchemy and Pylons

2007-05-23 Thread voltron
Now my head is spinning, I read the SQLAlchemy docs: http://www.sqlalchemy.org/docs/tutorial.html#tutorial_orm And its approach is also different --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss

Re: SQLAlchemy and Pylons

2007-05-23 Thread Christoph Haas
On Wed, May 23, 2007 at 12:14:34AM -0700, voltron wrote: What is the recommend usage of SQLAlchemy and Pylons? I found these links, what is preffered? http://docs.pythonweb.org/display/pylonscookbook/SQLAlchemy+for+people+in+a+hurry I'm using this (^^^) approach. The only drawback is that

Re: SQLAlchemy and Pylons

2007-05-23 Thread Mike Orr
On 5/23/07, voltron [EMAIL PROTECTED] wrote: What is the recommend usage of SQLAlchemy and Pylons? I found these links, what is preffered? See my message yesterday, subject SQLAlchemy model. The steps are clear: you need an engine, metadata, and tables (explicitly defined or autoloaded), and

Rendering page components in genshi

2007-05-23 Thread Graham Stratton
Hi, I have a controller which renders page components (fragments in Myghty). But Genshi renders the fragments to UTF-8, which I then have to map back to unicode in order to use them with Markup() in another template. Whilst Genshi supports stream.render(encoding=None), I can't see a way to

Re: where to put application init code?

2007-05-23 Thread Shannon -jj Behrens
On 5/22/07, Max Ischenko [EMAIL PROTECTED] wrote: On 5/23/07, Shannon -jj Behrens [EMAIL PROTECTED] wrote: So, any ideas how to detect changes in template files to re-generate them or at least generate everything at Pylons' application startup? Perhaps there's something more

Re: SQLAlchemy and Pylons

2007-05-23 Thread voltron
Thank you both for the heads up --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email

mako template speed question

2007-05-23 Thread voltron
I discovered that I could reduce the number of templates in use by using conditionals. Based on the link or the user input, I have a list of mako functions that generate HTML Divs of content. My question is, is it faster to create a separate template using inheritance for each condition or the

Re: SQLAlchemy and Pylons

2007-05-23 Thread baus
One thing that is not mentioned in any of the tutorials that I needed get sqlalchemy to work is the following in base.py from pylons.database import make_session from pylons.database import session_context class BaseController(WSGIController): def __call__(self, environ, start_response):

Re: mako template speed question

2007-05-23 Thread voltron
I meant render a template using inheritance... On May 23, 10:05 pm, voltron [EMAIL PROTECTED] wrote: I discovered that I could reduce the number of templates in use by using conditionals. Based on the link or the user input, I have a list of mako functions that generate HTML Divs of content.

Re: Packaging a Pylons app

2007-05-23 Thread Ian Bicking
voltron wrote: I have tested packaging my app according to the documentation. I tested the egg on another machine and I noticed that it did not package the public and template folders. Another thing is that it installed my app under site-packages. Does anyone have any experience doing this

Re: mako template speed question

2007-05-23 Thread Shannon -jj Behrens
On 5/23/07, voltron [EMAIL PROTECTED] wrote: I discovered that I could reduce the number of templates in use by using conditionals. Based on the link or the user input, I have a list of mako functions that generate HTML Divs of content. My question is, is it faster to create a separate

Re: SQLAlchemy and Pylons

2007-05-23 Thread baus
I found the need to this a bit disconcerting in that I really don't understand why it is necessary. I wish somebody could explain it to me. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To

Re: SQLAlchemy and Pylons

2007-05-23 Thread Qiangning Hong
On May 23, 9:58 pm, Mike Orr [EMAIL PROTECTED] wrote: http://docs.pythonweb.org/display/pylonscookbook/SQLAlchemy+for+peopl... Use this one. The way to set up the model is still evolving, but this is the closest to the emerging standard. Could you please give some talk or resources about

Re: using buffet

2007-05-23 Thread Max Ischenko
On 5/23/07, Shannon -jj Behrens [EMAIL PROTECTED] wrote: /usr/lib/python2.4/site-packages/Paste-1.3-py2.4.egg /paste/registry.py, line 177, in _current_obj raise TypeError( TypeError: No object (name: Buffet) has been registered for this thread Same kind of error I got if I

Re: SQLAlchemy and Pylons

2007-05-23 Thread Ben Bangert
baus wrote: I found the need to this a bit disconcerting in that I really don't understand why it is necessary. I wish somebody could explain it to me. SQLAlchemy has a session context, which tracks objects that have been loaded from the database, modifications to them, and pending changes.