You have a typo in there. funciton  should be function.

That's why it always returns None.


Marin


On Sat, May 3, 2014 at 5:15 PM, john smith <lukaszbur...@gmail.com> wrote:

> Hello!
> I have a problem with 'reddit-clone' app from this tutorial. I'm stuck at
> moment in 2:28:00. My problem is with if statement that is supposed to
> change the button responsible for changing the view.
> For me the condition is always false, even though when printed, the
> request.function shows 'list_posts_by_votes' which is the condition.
> Here is the code:
> {{if request.funciton=='list_posts_by_votes':}}
> {{=A('sort by datetime', _class='btn', _href=URL('list_posts_by_datetime',args
> =category.name))}}
> <h3>this part never works for me</h3>
> {{else:}}
> {{=A('sort by votes', _class='btn', _href=URL('list_posts_by_votes', args=
> category.name))}}
> <h3>{{=request.function}}</h3>
> {{pass}}
>
>
> You can find the whole code 
> here:link<https://bitbucket.org/badn3wz/reddit_clone/src/8adf342f8683fb7d1f15c073bfee1a13e5d24e21/views/default/list_posts_by_votes.html?at=default>
>
>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to