Re: How to change path to static files (./public/) dynamically
Great, it works!!! On Dec 13, 11:09 pm, Ian Bicking [EMAIL PROTECTED] wrote: I haven't followed any of this, but I thought I'd mention that you can do: def action(self): file_path = (calculate) app = paste.fileapp.FileApp(file_path) return app(self.environ, self.start_response) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Templatizing javascripts
Hello all. What's the best way to templatize my javascripts? To enable the use of _() function and helpers. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
AuthKit with CAS
Hi, Does anyone know how to configure AuthKit 0.4 to use CAS authentication? Does it even work? Thanks, Bob D. --~--~-~--~~~---~--~~ 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: Templatizing javascripts
On Dec 14, 2007 1:36 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello all. What's the best way to templatize my javascripts? To enable the use of _() function and helpers. Mako can make any kind of text document; not just html. I use it to make CSS, JS too. --~--~-~--~~~---~--~~ 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: Templatizing javascripts
On Dec 14, 2007 2:16 PM, Matt Feifarek [EMAIL PROTECTED] wrote: On Dec 14, 2007 1:36 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello all. What's the best way to templatize my javascripts? To enable the use of _() function and helpers. Mako can make any kind of text document; not just html. I use it to make CSS, JS too. The tradeoff is you can't put the template in your public directory or have Apache serve it. I've kept my CSS Javascript static for that reason. But given that IE requires redundant font specifications, and it's sometimes useful to base things on config values, I may go to template-driven CSS JS someday. -- 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: Upgrading existing project to newer Pylons
On Dec 13, 2007, at 8:06 AM, Christoph Haas wrote: This is. Although I'd prefer if I could launch vimdiff or kompare during the upgrade. It's pretty good that it exists already anyway. It does no 3-way-diff/merge though. So if you changed something in the files then the paster create upgrade will suggest to throw away your changes unless you carefully include them. :( In the future we would like to do 3 way merging during the upgrade process. We need to store the original paster template somewhere in the project and utilize it later. This would mostly be an addition to PasteScript, anyone up for the task? =] -- 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: apache/fcgi deployment question
Hi again, I'm still stuck here, and haven't been able to find anything else that clears it up. I've read everything I can find, and rewritten my mod_rewrite rules and conditions repeatedly, and while they work just as I would expect, the URLs don't work correctly, inasmuch as the pylons application does not respond to root urls like /login, etc. the homepage will show up correctly, so / is being correctly rewritten by the rules and served by pylons, but no other url works. It simply redirects itself circularly, trying to find /dispatch.fcgi/. I've added rewrite conditions that check to see if the file exists, in order to try to forestall this redirection, but it doesn't seem to work. I'm sorry to functionally repost the same question, but I've tried to follow the instructions on pylonshq as closely as possible, and I can't figure out what's going wrong. If anyone has a working solution that I could look over, that would be excellent. It doesn't seem to be a problem with fcgi, or flup, as both of them do return content, just not at the correct root urls. it does display content if I browse the url's at /dispatch.fcgi/login et al. Thanks again, Pete On Dec 13, 10:27 am, Pete Taylor [EMAIL PROTECTED] wrote: Hi all... I've searched through the pylons discuss archives, and am still a bit stuck. I've read through the deployment guide for pylons/apache/fcgi/mod_rewrite at pylonshq, as well as most of the documents linked from it in reference. I'm pretty used to deploying rails applications in similar ways, so most of it was familiar... But I've run into a snag that I'm hoping you might be able to help me pin down. I saw a few references to what seems to be a similar issue on the lists. Since the pylonshq guide to deployment seems to be out of date as of .8, it may just be something I'm missing? I'm using flup, and the application works, other than some unfortunately hard-coded absolute paths to images, behind dispatch.fcgi. However, when I put in the override for SCRIPT_NAME = '' in config.environ, and make my .htaccess rewrite rules match those on the write up (which are pretty close to the ones rails uses as well), I sit in an infinite (up to 10, of course, at which point apache kills it anyway) redirection loop, where dispatch.fcgi keeps getting post-pended to the redirect url, making it look like /dispatch.fcgi/dispatch.fcgi/ (etc) in the rewrite.log. My current rewrite rules look like this: RewriteEngine On RewriteRule ^$ /dispatch.fcgi/ RewriteRule ^(\[-_a-zA-Z0-9/\.]+)$ /dispatch.fcgi/$1 I've tried a number of permutations of the modifications to lib/base.py as described in the Fixing Broken Routes part of the document (overriding SCRIPT_NAME in config.environ), but I can't seem to make it play nicely with mod_rewrite. I'm using Pylons 0.9.5, apache2.2, on ubuntu. Any help would be great. Thanks! Pete --~--~-~--~~~---~--~~ 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: apache/fcgi deployment question
and, I figured it out. Wanted to post what I came up with, both for comment, and for anyone else who runs into it. If i've done something wrong or just plain silly here, feel free to let me know, I'm all for another, better solution, but at the moment this seems to have worked. my .htaccess file now looks like this: # AddHandler fastcgi-script .fcgi AddHandler cgi-script .cgi Options +FollowSymLinks +ExecCGI RewriteEngine On RewriteCond %{REQUEST_FILENAME} dispatch.fcgi RewriteRule ^(.*)$ - [L,PT] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^$ /dispatch.fcgi/ [L,PT] RewriteRule ^(.*)$ /dispatch.fcgi/$1 [L,PT] # And I did this in lib/base.py, in __before__: # code def __before__(self): env = {} for k,v in request.environ.items(): env[k] = v # should import routes somewhere above config = routes.request_config() new_env = r_conf.environ new_env['SCRIPT_NAME'] = '' new_env['SCRIPT_FILENAME'] = '' new_env.update(env) r_conf.environ = new_env /code # this has made it so that mod_rewrite, fcgi, and pylons all work for me at nice clean / 'root' urls. Pete On Dec 14, 7:26 pm, baldtrol [EMAIL PROTECTED] wrote: Hi again, I'm still stuck here, and haven't been able to find anything else that clears it up. I've read everything I can find, and rewritten my mod_rewrite rules and conditions repeatedly, and while they work just as I would expect, the URLs don't work correctly, inasmuch as the pylons application does not respond to root urls like /login, etc. the homepage will show up correctly, so / is being correctly rewritten by the rules and served by pylons, but no other url works. It simply redirects itself circularly, trying to find /dispatch.fcgi/. I've added rewrite conditions that check to see if the file exists, in order to try to forestall this redirection, but it doesn't seem to work. I'm sorry to functionally repost the same question, but I've tried to follow the instructions on pylonshq as closely as possible, and I can't figure out what's going wrong. If anyone has a working solution that I could look over, that would be excellent. It doesn't seem to be a problem with fcgi, or flup, as both of them do return content, just not at the correct root urls. it does display content if I browse the url's at /dispatch.fcgi/login et al. Thanks again, Pete On Dec 13, 10:27 am, Pete Taylor [EMAIL PROTECTED] wrote: Hi all... I've searched through the pylons discuss archives, and am still a bit stuck. I've read through the deployment guide for pylons/apache/fcgi/mod_rewrite at pylonshq, as well as most of the documents linked from it in reference. I'm pretty used to deploying rails applications in similar ways, so most of it was familiar... But I've run into a snag that I'm hoping you might be able to help me pin down. I saw a few references to what seems to be a similar issue on the lists. Since the pylonshq guide to deployment seems to be out of date as of .8, it may just be something I'm missing? I'm using flup, and the application works, other than some unfortunately hard-coded absolute paths to images, behind dispatch.fcgi. However, when I put in the override for SCRIPT_NAME = '' in config.environ, and make my .htaccess rewrite rules match those on the write up (which are pretty close to the ones rails uses as well), I sit in an infinite (up to 10, of course, at which point apache kills it anyway) redirection loop, where dispatch.fcgi keeps getting post-pended to the redirect url, making it look like /dispatch.fcgi/dispatch.fcgi/ (etc) in the rewrite.log. My current rewrite rules look like this: RewriteEngine On RewriteRule ^$ /dispatch.fcgi/ RewriteRule ^(\[-_a-zA-Z0-9/\.]+)$ /dispatch.fcgi/$1 I've tried a number of permutations of the modifications to lib/base.py as described in the Fixing Broken Routes part of the document (overriding SCRIPT_NAME in config.environ), but I can't seem to make it play nicely with mod_rewrite. I'm using Pylons 0.9.5, apache2.2, on ubuntu. Any help would be great. Thanks! Pete --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---