Re: Redirection question
On Sat, Aug 11, 2007 at 04:59:33AM -, [EMAIL PROTECTED] wrote: Hello guys, is it recommended that a controller action displays various templates?, or is better redirect to the appropiate controller action for it to display the template? Depends on whether you want the URL to change. Whether you write redirect_to(...) or return render(...) is not much difference size-wise. Cheers Christoph --~--~-~--~~~---~--~~ 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: Logging
On 8/11/07, Christoph Haas [EMAIL PROTECTED] wrote: On Fri, Aug 10, 2007 at 09:31:58PM -0700, Mike Orr wrote: How do I get the Pylons logging to work in 0.9.6? I tried a few variations on import logging; logging.basicConfig(level=logging.DEBUG) in environment.py and middleware.py, but no log output. Do you like to log from your application? I mainly wanted to turn on the built-in Pylons debugging. # Logging Setup [loggers] keys = root,myapplication [logger_myapplication] level = DEBUG handlers = myapplication qualname = myapplication propagate = 0 [handlers] keys = console,myapplication [formatters] keys = generic,myapplication Most of the variable names are self-explanatory from the logging module, but what do these 'keys' variables mean? And where is this all set up? I grepped all over Paste, Pylons, and the application template and I see lots of calls to log things, but nothing to configure the logging. [logger_root] level = INFO handlers = console So if I set this one to 'level = DEBUG' I should see everything? I'd still like to see a quick way to turn on and off logging without modifying a bunch of config entries. Maybe something like paster serve --debug or paster serve --log-level=debug. I kept looking at the paster arguments thinking, Why is --log-file there but not --log-level? -- Mike Orr [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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: Logging
On Sat, Aug 11, 2007 at 02:28:31AM -0700, Mike Orr wrote: On 8/11/07, Christoph Haas [EMAIL PROTECTED] wrote: On Fri, Aug 10, 2007 at 09:31:58PM -0700, Mike Orr wrote: How do I get the Pylons logging to work in 0.9.6? I tried a few variations on import logging; logging.basicConfig(level=logging.DEBUG) in environment.py and middleware.py, but no log output. Do you like to log from your application? I mainly wanted to turn on the built-in Pylons debugging. # Logging Setup [loggers] keys = root,myapplication [logger_myapplication] level = DEBUG handlers = myapplication qualname = myapplication propagate = 0 [handlers] keys = console,myapplication [formatters] keys = generic,myapplication Most of the variable names are self-explanatory from the logging module, but what do these 'keys' variables mean? I believe every formatter/handler/logger has to be mentioned in the keys directive. And where is this all set up? I grepped all over Paste, Pylons, and the application template and I see lots of calls to log things, but nothing to configure the logging. As part of Paste. Paste includes logging and parses the development.ini as a logging configuration setup file. That's rather magical and hardly documented. :) [logger_root] level = INFO handlers = console So if I set this one to 'level = DEBUG' I should see everything? Yep. Works here with 0.9.6rc1. Christoph --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
ProxyPass and authkit
Hi all, I've been having terrible headaches with serving my Pylons app behind Apache with ProxyPass directive. Specifically, it seems I cannot get the app to work correctly in the authentication phase. I wrote this in the config file: filter-with = proxy-prefix [filter:proxy-prefix] use = egg:PasteDeploy#prefix prefix = /robur translate_forwarded_server = true But initially it wasn't working. I then figured that the problem was my apache was setting different values for HTTP_X_FORWARDED_SERVER and HTTP_X_FORWARDED_HOST. Paste's PrefixMiddleware makes use of the former, but the correct value for me was in the latter. So I tweaked PrefixMiddleware to make use of that instead. Now it seems to get it right. But it still doesn't work. I'm using the form authentication method and in the form action I get this auto-generated url: http://intra.pragma2000.com/robur/ Note the trailing slash. When I hit the login button, the url in the browser changes to http://intra.pragma2000.com/robur./ Note the dot before the trailing slash. Obviously the server refuses to work out this url. Am I getting something wrong? I even tried a different middleware for changing the url, some code I found online on a mailing list post. But I can't get it to work correctly. Somehow authkit always manages to go back to the wrong url. I just probably don't know in what part of the middle stack I should insert this new piece... Can you help me out? I'm beginning to get desperate... I can't believe there isn't a clean solution to this trivial problem. Thanks, stefano --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Pylons add-ons
Hi * Reports * Barcode * Plotting Is it possible to add Pylons 1.0 (Pylons add-ons) ? Thanks Madhu Alagu --~--~-~--~~~---~--~~ 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: using tesla_auth: table name too long?
Hi, My working solution was to define table's names myself. Here is the diff output: 10c10,12 has_and_belongs_to_many('groups', of_kind='Group', inverse='members') --- has_and_belongs_to_many('groups', of_kind='Group', inverse='members', tablename='security_users_groups') using_options(tablename = 'security_users') 37,38c39,42 has_and_belongs_to_many('members', of_kind='User', inverse='groups') has_and_belongs_to_many('permissions', of_kind='Permission', inverse='groups') --- has_and_belongs_to_many('members', of_kind='User', inverse='groups', tablename='security_users_groups') has_and_belongs_to_many('permissions', of_kind='Permission', inverse='groups', tablename='security_groups_permissions') using_options(tablename = 'security_groups') 43c47 has_and_belongs_to_many('groups', of_kind='Group', inverse='permissions') --- has_and_belongs_to_many('groups', of_kind='Group', inverse='permissions', tablename='security_groups_permissions') 44a49 using_options(tablename = 'security_permissions') Cheers, Jose F. --~--~-~--~~~---~--~~ 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: Download area
Hi, I'm sorry but doesn't works for me. My solution was to transform my pylons (or paste or wsgi?) app into a composite app (for reference, you can see 'paste deploy' documentation): [-- development.ini --] [composite:main] use = egg:Paste#urlmap / = all /download = downloads [app:all] ...the original/previous app:main content... [app:downloads] use = egg:Paste#static document_root = /var/myapp/public [-- development.ini --] Regards, Jose F. --~--~-~--~~~---~--~~ 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: page caching in mako and pylons
On Aug 10, 2007, at 5:42 PM, SamDonaldson wrote: Aside from page caching...is there fragment caching? In other words...page caching doesn't really help when you have a header on your page with logged in users etc. You can't serve that page. Is there a way, like Rails, to fragment cache parts of your template? You bet, you can cache any part of your templates (their fragments), and you can cache function calls as well. This extends not just throughout Mako, but into Pylons as well, where you can register functions in your controllers to be cached, like the example in the docs here: http://wiki.pylonshq.com/display/pylonsdocs/Caching+in+Templates+and +Controllers In the cache object example, an entire function is handed to the caching system, which can handle any object/output that can be pickled. Cheers, Ben smime.p7s Description: S/MIME cryptographic signature
Re: ProxyPass and authkit
On Aug 11, 2007, at 3:22 AM, Stefano Masini wrote: Hi all, I've been having terrible headaches with serving my Pylons app behind Apache with ProxyPass directive. Specifically, it seems I cannot get the app to work correctly in the authentication phase. I wrote this in the config file: filter-with = proxy-prefix [filter:proxy-prefix] use = egg:PasteDeploy#prefix prefix = /robur translate_forwarded_server = true But initially it wasn't working. I then figured that the problem was my apache was setting different values for HTTP_X_FORWARDED_SERVER and HTTP_X_FORWARDED_HOST. Paste's PrefixMiddleware makes use of the former, but the correct value for me was in the latter. So I tweaked PrefixMiddleware to make use of that instead. Now it seems to get it right. But it still doesn't work. I'm using the form authentication method and in the form action I get this auto-generated url: http://intra.pragma2000.com/robur/ Note the trailing slash. When I hit the login button, the url in the browser changes to http://intra.pragma2000.com/robur./ Note the dot before the trailing slash. Obviously the server refuses to work out this url. Do things act normally when authkit is disabled? It's possible the issue is on the apache side. What does your ProxyPass configuration look like? -- Philip Jenvey --~--~-~--~~~---~--~~ 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: Are my Python/Pylons concerns justified?
On Aug 9, 4:35 am, Marcin Kasperski [EMAIL PROTECTED] wrote: A lot of answers already, so just two points: a) There are plenty of cheap VPS hosting options (you get I guess it depends on what you call cheap. I can get php5 hosting for $10/year (http://dollar-hosting.net/). --~--~-~--~~~---~--~~ 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: Are my Python/Pylons concerns justified?
On Sat, 2007-08-11 at 13:51 -0700, walterbyrd wrote: On Aug 9, 4:35 am, Marcin Kasperski [EMAIL PROTECTED] wrote: A lot of answers already, so just two points: a) There are plenty of cheap VPS hosting options (you get I guess it depends on what you call cheap. I can get php5 hosting for $10/year (http://dollar-hosting.net/). And I expect you get what you pay for. To be frank someone who's only willing to pay $10/year for hosting probably isn't too picky and I'd expect this lack of...um... discrimination to extend to the development stack as well (if you pay this little, expect to use PHP). It's a bit like pointing out that you can buy a new Hyundai for $6000 and then complaining *to Dodge* that their V10 Hemi engine doesn't fit in it. 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 -~--~~~~--~~--~--~---
Re: page caching in mako and pylons
On Sat, 2007-08-11 at 11:19 -0700, Ben Bangert wrote: You bet, you can cache any part of your templates (their fragments), and you can cache function calls as well. This extends not just throughout Mako, but into Pylons as well, where you can register functions in your controllers to be cached, like the example in the docs here: http://wiki.pylonshq.com/display/pylonsdocs/Caching+in+Templates+and +Controllers In the cache object example, an entire function is handed to the caching system, which can handle any object/output that can be pickled. Is there some way to verify that caching is working (aside from turning up database logging that is)? 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 -~--~~~~--~~--~--~---
Re: page caching in mako and pylons
On Sat, 2007-08-11 at 16:25 -0700, Cliff Wells wrote: Is there some way to verify that caching is working (aside from turning up database logging that is)? Nevermind. I got it. Also, it would be useful if Memcached support were added as an option. An interesting article here: http://blog.kovyrin.net/2007/08/05/using-nginx-ssi-and-memcache-to-make-your-web-applications-faster/ It talks mostly about RoR, but the concept is generally applicable. 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 -~--~~~~--~~--~--~---
Pylons 0.9.6rc2 and AuthKit
I just started migrating my first Pylons app from 0.9.4 to 0.9.6rc2. Of course I'm running into problems with AuthKit (0.3.0pre5). I could probably hack them out, but I see right away that AuthKit 0.4presomething is kinda available and the docs for it are kinda available... should I upgrade or try to hack it out with my current version (I'm not doing anything special)? I guess the question boils down to: which version will work the best with 0.9.6? 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 -~--~~~~--~~--~--~---
Re: Themes in Pylons
Pylons is a fantastic framework, with lots of application structure built in. However, it offers no constraints, nor aid in the actual building of web sites. If you want to build in a consistent look and feel, you are going to have to build that all yourself. What I would recommend is using Mako's inheritance feature to build your base pages and build on that. Jose On 8/8/07, delilah_302 [EMAIL PROTECTED] wrote: Is there (or will there be) any concept of themes for Pylons? In the week or so I've been looking at Pylons, I've seen how to use CSS and Mako templates to give the application you are developing a consistent look and feel but I'm not sure how to extend that same look and feel to other applications I may add into Pylons. For example, let's say I've got a Pylons project that contains all the basic web pages, CSS, forms, etc. for a simple website and I wanted to add on a Wiki or a forum or some other application that someone else created and handed off to me as an egg. Can Pylons provide a consistent look and feel across my website and the add-on apps? Or maybe the better question is how do I structure my site within Pylons to allow me to have a theme that applies to all my apps? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---