Right, I wondered why.
I also found this code in layout to be a 'challenge':
middle_columns = {0:'span12',1:'span9',2:'span6'}[
(left_sidebar_enabled and 1 or 0)+(right_sidebar_enabled and 1 or 0)]
}}
It took me a while to figure out what was going on there -- it seems very
clever and c
gt;>> > {{extend 'layout.html'}}
>>>> > {{=A(news.title, _href=news.link)}}
>>>> > {{if auth.user:}}
>>>> > {{=news.votes}}
>>>> > plus
>>>> > minus
>>>> > {{=form}}
>>>&g
On 24 Jul 2012, at 2:57 PM, villas wrote:
> But why not this which seems much more readble?
>
> value = +1 if mode == 'plus' else -1
Originally for compatibility with Python 2.4. Not sure how much of a priority
that is these days...
>
>
>
> On Tuesday, July 24, 2012 10:20:51 PM UTC+1, pjryan
gt; Sent from my Verizon Wireless BlackBerry
>>>
>>> -Original Message-
>>> From: Alan Etkin
>>> Sender: web2py@googlegroups.com
>>> Date: Fri, 23 Mar 2012 15:22:25
>>> To: web2py-users>
>>> Reply-To: web2py@googlegroups
Verizon Wireless BlackBerry
>>>
>>> -Original Message-
>>> From: Alan Etkin
>>> Sender: web2py@googlegroups.com
>>> Date: Fri, 23 Mar 2012 15:22:25
>>> To: web2py-users>
>>> Reply-To: web2py@googlegroups.com
>>
>>
>>
>> Sent from my Verizon Wireless BlackBerry
>>
>> -Original Message-
>> From: Alan Etkin
>> Sender: web2py@googlegroups.com
>> Date: Fri, 23 Mar 2012 15:22:25
>> To: web2py-users>
>> Reply-To: web2py@googlegroups.co
n Wireless BlackBerry
>
> -Original Message-
> From: Alan Etkin
> Sender: web2py@googlegroups.com
> Date: Fri, 23 Mar 2012 15:22:25
> To: web2py-users>
> Reply-To: web2py@googlegroups.com
> Subject: [web2py] Re: Cookbook Chapter 2 - Reddit clone Ajax problem
>
> I
Chapter 2 - Reddit clone Ajax problem
I tested the example app with the book support files and it worked
(with Firefox 10 and web2py trunk). Maybe there is a bug fixed in the
app code that was not updated in the book's text.
On 23 mar, 18:11, Omi Chiba wrote:
> I was following cookbook and
I tested the example app with the book support files and it worked
(with Firefox 10 and web2py trunk). Maybe there is a bug fixed in the
app code that was not updated in the book's text.
On 23 mar, 18:11, Omi Chiba wrote:
> I was following cookbook and having a problem for the ajax part. I can
>
9 matches
Mail list logo