Re: how to build a portlet style site?
Thanks for the feedback. All three approaches (special template engine, components, sub-requests) look very usefull. I've got some studying and experimentation to do. Ian Bicking wrote: Paul J Stevens wrote: All the example code uses a single controller per page, which is all good and fine for crud operations on a database, but seems rather limited for what we do. I'd like to build a website (read a typical portal site) that brings together several controllers/views into a single page (i.e. /doc/view/123, /news/latest, /user/list, /user/view/myid) I'd use subrequests, and then wrap that up in some object. I don't believe Pylons exposes subrequests in a particularly friendly way, but if you look at paste.recursive it will show you a not-as-friendly way to do subrequests that you could pretty up on your own. -- Paul Stevens paul at nfg.nl NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlandshttp://www.nfg.nl --~--~-~--~~~---~--~~ 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 to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: session_context and multiple SA databases
On Jan 17, 2007, at 6:19 AM, Max Ischenko wrote: TypeError: No configuration has been registered for this process or thread Your CONFIG object is automatically setup for you in paster shell, it won't be when running it from your own script. Can you please explain how should I setup CONFIG then? I have tried to add the following to my tests/__init__.py: from paste.deploy import loadapp, appconfig, CONFIG import paste.fixture app_conf = appconfig('config:development.ini', relative_to=conf_dir) CONFIG.push_thread_config({'app_conf':app_conf}) assert CONFIG['app_conf']['sqlalchemy.dburi'] But it looks like doupy.lib.database imported earlier than this is executed so I still have the same error. Another issue. If I use DynamicMetadata, as recommended in QuickWiki tutorial, how am I supposed to connect it to correct session_context? Do I need to create engine explicitly (via create_engine) and then call meta.connect(engine)? If so, when this should happen? Yes, you do need to connect the engine explicitly if you want to use metadata functions, such as create_all. Take a look at the QuickWiki's websetup.py. It has examples of both setting up the CONFIG object and using metadata.create_all. I have seen websetup.py. But where I have to put this code inside my application? Thanks, Max. --~--~-~--~~~---~--~~ 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 to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: how to build a portlet style site?
We're waiting for the art templating system... --~--~-~--~~~---~--~~ 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 to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: development.ini access from .../lib/whatever.py ?
Ian Bicking [EMAIL PROTECTED] writes: Chris Is there a good way to get access to the development.ini Chris configuration variables from those files? Ian Try using paste.deploy.appconfig('/full/path/to/development.ini') No joy using PasteDeploy-1.1-py24.egg, Paste-1.1.1-py2.4.egg. Tried it, and it wants a scheme: pda = paste.deploy.appconfig(/Users/chris/Projects/client/customer/er/dev-sqlite.ini) LookupError: URI has no scheme: '/Users/chris/Projects/client/customer/er/dev-sqlite.ini' If I prefix with file: it doesn't recognize 'file': pda = paste.deploy.appconfig(file:/Users/chris/Projects/client/customer/er/dev-sqlite.ini) LookupError: URI scheme not known: 'file' (from egg, config) Looks like it wants a scheme of 'config' and I try that but it looks like it can't find it tho the path is right: pda = paste.deploy.appconfig(config:/Users/chris/Projects/client/customer/er/dev-sqlite.ini) --- pkg_resources.DistributionNotFound Traceback (most recent call last) [...] DistributionNotFound: er ls -l /Users/chris/Projects/client/customer/er/dev-sqlite.ini -rw-r--r-- 1 chris chris 1436 Jan 17 23:27 /Users/chris/Projects/client/customer/er/dev-sqlite.ini Perhaps I'm being stupid and using it wrong. :-( Thanks for any suggestions. --~--~-~--~~~---~--~~ 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 to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Response content as generator while debug = true? (Sending intermediate content)
On Jan 17, 2007, at 5:26 PM, Chas Emerick wrote: I'd be perfectly satisfied if pylons/paste/etc were to simply abort the response if an error occurs, and leave me to figure out that I need to copy and paste the debug URL from the console to a new browser window. (Maybe also outputting some reasonable final content indicating that something went awry.) This behaviour would certainly need to be an .ini file option so as to not disturb expectations elsewhere (or, even better, add an attribute to the Response object so that each action could determine the appropriate behaviour, rather than having the setting apply application-wide). I believe this solution could work, can you file a ticket for it on the PythonPaste trac? Thanks, Ben --~--~-~--~~~---~--~~ 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 to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: how to build a portlet style site?
On Wed, 2007-01-17 at 12:55 +, James Gardner wrote: Hi Paul, I'm developing a new templating system called art which handles this particular case. Instead of using a controller to call a template and display the result, the template effectively defines which content it requires and calls the different controllers (called plugins in art) automatically. The individual plugins can run on multiple servers so that content can be pulled in from remote locations and all the fetching is done in parallel with threads so performance is pretty good. I was looking at the W3C docs on XInclude (which, like most W3C docs, aren't terribly enlightening) and this sounds a bit like that (Genshi supports that particular feature, BTW). Any particular differences with XInclude? I've been planning on adding a similar feature to Breve, but am interested in other people's ideas on particulars. Also, since you can pull plugins from different servers, have you considered the implications with regard to Javascript? It seems there might be some security implications (or more likely, security restrictions) that would affect Javascript that is pulled from different servers (although I expect simply documenting such restrictions would be adequate). Regards, Cliff --~--~-~--~~~---~--~~ 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 to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---