Re: Setting content type of Response() in 0.9.6

2008-03-31 Thread Dalius Dobravolskas
johnnyice wrote: > James Gardner already posted how to set the content type when using > the render object in the forum. > > response.headers['Content-type'] = "application/atom+xml" > return render("template_file", "atom-feed") > > src: > http://groups.google.com/group/pylons-discuss/browse_thr

Setting content type of Response() in 0.9.6

2008-03-31 Thread johnnyice
James Gardner already posted how to set the content type when using the render object in the forum. response.headers['Content-type'] = "application/atom+xml" return render("template_file", "atom-feed") src: http://groups.google.com/group/pylons-discuss/browse_thread/thread/2e0a6cb533ddd0a6/e2ce7

Re: tiny error in index.html (generate when create a new project)

2008-03-31 Thread Ben Bangert
On Mar 31, 2008, at 1:37 AM, 张沈鹏(电子科大 毕/就业倒计 时...) wrote: but with pylons 0.97beta3 and webhelpers0.6 if I use ${h.url_for()} it apper error as below ⇝ AttributeError: 'module' object has no attribute 'url_for' Changing your apps lib/helpers.py, so that instead of: from webhelpers

Re: I18n doesn't work outside Pylons Controller

2008-03-31 Thread Philip Jenvey
On Mar 31, 2008, at 12:48 AM, Olli Wang wrote: > > Thanks, Dalius. It works. But I happened into another encoding issue: > > global_test = lazy_gettext(_('Global Test')) > > class HelloController(BaseController): > def test(self): > return str(global_test) # Works fine, returns the

Re: Auth and Auth

2008-03-31 Thread Mike Orr
Opened ticket #403 for the outstanding AuthKit issues. http://pylonshq.com/project/pylonshq/ticket/403 If I failed to list any issues, please add a comment to the ticket so it doesn't get forgotten. -- Mike Orr <[EMAIL PROTECTED]> --~--~-~--~~~---~--~~ You rece

Re: tiny error in index.html (generate when create a new project)

2008-03-31 Thread Mike Orr
2008/3/31 张沈鹏(电子科大 毕/就业倒计时...) <[EMAIL PROTECTED]>: > but with pylons 0.97beta3 and webhelpers0.6 > > if I use ${h.url_for()} > it apper error as below > ⇝ AttributeError: 'module' object has no attribute 'url_for' There is some rearrangement happening in WebHelpers right now; that is

Re: tiny error in index.html (generate when create a new project)

2008-03-31 Thread 张沈鹏(电子科大 毕/就业倒计时...)
but with pylons 0.97beta3 and webhelpers0.6 if I use ${h.url_for()} it apper error as below ⇝ AttributeError: 'module' object has no attribute 'url_for' On Mon, Mar 31, 2008 at 1:26 AM, Alec <[EMAIL PROTECTED]> wrote: > > 张沈鹏(电子科大 毕/就业倒计时...) 写道: > > > in develop version > > > > whe

Re: Auth and Auth

2008-03-31 Thread Chris Shenton
"Mike Orr" <[EMAIL PROTECTED]> writes: > We need somebody who has used AuthKit to write the simple HOWTOs that > people are asking for. I did and did, but it was a while back and I suspect AuthKit's changed since I wrote it: http://pylonshq.com/project/pylonshq/wiki/PylonsWithAuthKitForward I'

logging POST data

2008-03-31 Thread Dunk Fordyce
Hello, Has anyone ever written some middleware to log POST requests Secondly, if Im doing it myself, is it safe to read wsgi.input and then seek it back to 0? Thanks Dunk --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: I18n doesn't work outside Pylons Controller

2008-03-31 Thread Olli Wang
Oh, thanks a lot. Everything works fine now. :) On Mar 31, 4:51 pm, Dalius Dobravolskas <[EMAIL PROTECTED]> wrote: > Olli Wang wrote: > > Thanks, Dalius. It works. But I happened into another encoding issue: > > > global_test = lazy_gettext(_('Global Test')) > > > class HelloController(BaseContro

Re: Auth and Auth

2008-03-31 Thread Dalius Dobravolskas
Mike Orr wrote: > OpenID is a new and different kind of authentication system, so I > don't know if we've figured out the best way to integrate it yet. > Feedback from those who use OpenID would be helpful. You should use it to figure out. I accept any way where you can login and are not asked to

Re: I18n doesn't work outside Pylons Controller

2008-03-31 Thread Dalius Dobravolskas
Olli Wang wrote: > Thanks, Dalius. It works. But I happened into another encoding issue: > > global_test = lazy_gettext(_('Global Test')) > > class HelloController(BaseController): > def test(self): > return str(global_test) # Works fine, returns the translated > string > > de

Re: I18n doesn't work outside Pylons Controller

2008-03-31 Thread Olli Wang
Thanks, Dalius. It works. But I happened into another encoding issue: global_test = lazy_gettext(_('Global Test')) class HelloController(BaseController): def test(self): return str(global_test) # Works fine, returns the translated string def test2(self): return unicode

Re: I18n doesn't work outside Pylons Controller

2008-03-31 Thread Dalius Dobravolskas
Olli Wang wrote: > Hi, Dalius. I had tried lazy_gettext, but don't know why the > lazy_gettext strings won't be collected after I run "python setup.py > extract_messages", therefore, I couldn't translate the string. :( If you are lazier than lazy_gettext do following: lazy_gettext(_('your string')