There is a new undocumented feature in web2py: ASSIGNJ
def index():
return dict(a={'whatever': ['you', 'want']})
# in view
{{=ASSIGNJS(whatever=whatever}}
now whatever is a JS variable.
On Tuesday, 30 September 2014 09:00:20 UTC-5, Luca Liberti wrote:
>
> What I was looking for was exactly
What I was looking for was exactly some hint on how to do some "javascript"
tuning from within web2py. I am aware this might be a "borderline" question
not
completely belonging to the forum.
Thank you
On Wed, Sep 24, 2014 at 9:22 PM, Niphlod wrote:
> let's break it down a bit.
> It's one th
let's break it down a bit.
It's one thing to have a field "prefilled" with a default value and it's a
totally different one to have a field empty by default but when you click
on it it "presets" the time to 00:00.
The former needs a Field(, default=something), the latter, given that
the
Thank you
I tried modifying the model as
Field('model_end_time', type='datetime',represent=lambda x, row: 'Active'
if x is None else
x.strftime("%Y-%m-%d"),default=datetime.datetime.now().replace(hour=0,minute=0,second=0,
microsecond=0))
I find that the datetime picker control still defaults to t
Put it as a placeholder?
--
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
"web2p
Thank you for the answer,
I am not sure your suggestion would work in my case. I have a datetime
field that potentially can be NULL. In the form the datetime field is
represented by default by the datetime picker widget, what I am looking for
is a way to let the user select a date and have the t
Sometimes, in web2py, it's just THAT simple
import datetime
.
Field('whatever', 'time', default=datetime.time(0,0,0))
;-)
On Tuesday, September 23, 2014 10:59:30 AM UTC+2, libe...@gmail.com wrote:
>
> Hi,
>
> I was wondering if there is an easy way to specify a default time (say
> 00:
7 matches
Mail list logo