Thanks for spotting that, Roger! ;-)

Yes, you're right. I just fixed the HOWTO accordingly.

Cheers.

On Wednesday February 11, 2009 12:54:20 Roger Demetrescu wrote:
> On Tue, Feb 10, 2009 at 17:51, Gustavo Narea <[email protected]> wrote:
> > Hello, everybody.
> >
> > I'm pleased to announce that I have:
> >  1.- Finished the guide on how to use repoze.what in Pylons:
> > http://wiki.pylonshq.com/display/pylonscookbook/Authorization+with+repoze
> >.what 2.- Created a plugin to integrate repoze.what in Pylons
> > applications: http://code.gustavonarea.net/repoze.what-pylons/
> >
> > So hopefully now using repoze.what in Pylons-based applications will be
> > much easier. :)
> >
> > Cheers!
>
> Hi Gustavo,
>
>
> I found 2 lines of code in your tutorial that says:
>
>           came_from = str(request.params.get('came_from')) or url_for('/')
>
>
> If request doesn't have a 'came_from' param, the get() method should
> return None, right ?
> But doing a "str(None) or failsafe_value"  would never reach the
> failsafe_value, because "None" is evaluated as a True value in this
> boolean expression.
>
> Maybe you meant:
>
>           came_from = str(request.params.get('came_from') or url_for('/'))
>
>
>
> Since I'm on a machine that doesn't have python installed, I didn't
> test your code, so I may be missing something here.
>
>
> Best regards,
>
> Roger
>
> 
-- 
Gustavo Narea <http://gustavonarea.net/>.

Get rid of unethical constraints! Get freedomware:
http://www.getgnulinux.org/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to