I think this might be the best way to do it:
my_dict.get(key, value_if_absent)
Hello,
I have a field in database that can accepts float numbers or time.
so i need to have OR-ing between the following expression:
db.WO.cost_time.requires = [IS_MATCH(r'^\d*\.{0,1}\d+$') or
IS_TIME()]
How can i do this?
Thanks in Advance
Does anyone have such problem?
Massimo can you let me know where to look into (Changing timeout value of
appadmin ajax save function)
Please?
On Sat, Jun 11, 2011 at 2:10 PM, Phyo Arkar wrote:
> Is there also normal save , not ajaxed one? I think i remember having one
> long before.
>
> doClickS
You can leave it empty and use onvalidation function:
http://web2py.com/book/default/chapter/07#onvalidation
On Sun, Jun 12, 2011 at 9:54 AM, Neveen Adel wrote:
> Hello,
>
> I have a field in database that can accepts float numbers or time.
>
> so i need to have OR-ing between the following ex
Hello all;
In my project i have to process files HUGE Gigabyte files . on the server. I
look into websocket but it is still very Experimental Draft , Only
supporting a few browser , and needed Tornado Web Server to do so .. Which
needs to open up another port which is not cool at all (Coz the offi
Hello all;
In my project i have to process files HUGE Gigabyte files . on the server. I
look into websocket but it is still very Experimental Draft , Only
supporting a few browser , and needed Tornado Web Server to do so .. Which
needs to open up another port which is not cool at all (Coz the offi
Thanks a lot Marin :) , It worked fine with me.
On Jun 12, 12:11 pm, Marin Pranjic wrote:
> You can leave it empty and use onvalidation
> function:http://web2py.com/book/default/chapter/07#onvalidation
>
> On Sun, Jun 12, 2011 at 9:54 AM, Neveen Adel wrote:
> > Hello,
>
> > I have a field in
your example is work fine on me, anthony, thank you so much, but when i
tried to implement on my application it returns an error.
e.g. 1.
def __add_2(table_0, index_link, table_1, field):
page = table_0(request.args(0)) or redirect(URL(index_link))
response.js = 'web2py_component(action =
What error are you getting? Note, the onaccept argument has to be a function
(respons.js is just a string). Is that the source of your error?
On Sunday, June 12, 2011 7:28:18 AM UTC-4, 黄祥 wrote:
> your example is work fine on me, anthony, thank you so much, but when i
> tried to implement on my
Yes, I put them in a folder with the name of the driver, and ran from their
URL. Only itis: the URL is overwritten on routes.py:
(...)
> (r'/suppliers', r'/app/suppliers/list'),
But even so, he created the tables, only when played in the root of models.
__
Hi I have created the entry under ORM
http://wiki.python.org/moin/HigherLevelDatabaseProgramming
Pls advise if it is too verbose.
On Jun 12, 7:10 am, Massimo Di Pierro
wrote:
> I think so. WOuld you kindly app a link to the file in the mercurial
> repo?
>
> On Jun 11, 5:40 pm, Luther Goh Lu Fen
As I understand it I can load, say, a comments box as a component with
ajax=False and ajax_trap=True.
So when would it be useful to load a component with ajax=True?
If you want to do long-polling you need an async server, not rocket
because wsgi does not support async. Look into web2py/gluon/contrib/
comet_messaging.py
On Jun 12, 5:18 am, Phyo Arkar wrote:
> Hello all;
>
> In my project i have to process files HUGE Gigabyte files . on the server. I
> look in
I want to show a notes field as a text box using a custom widget. In
my edit form I can see the notes field, type in a value, click submit
and the database is updated correctly with the new value. However when
I reopen the edit form the text box shows as empty.
Am I missing something or is this a
try replace _value=value with value=value
Sorry for the late repply...
@massimo ...the videos are on my hard disk.I just add them to database by
upload option so these videos are saved in the 'uploads' folder.
@Stifanwhen a user upload the video ...i call the command ffmpeg as
import os
os.system("ffmpeg -i "+video+" -r 1 -ss 0:00:
I think ajax_trap only pertains to form processing. My LOADs don't have any
forms and are all ajax=True. It's just a way to componentize pages. Example,
the categories and items on http://pricetack.com
Thanks, Massimo!
I thought that (redundantly)
routes_onerror = [
(r'sandbox_luis/*', r'/sandbox_luis/static/fail.html')
(r'*/*', r'/sandbox_luis/static/fail.html')
]
would catch all errors, but
https://domain.net/sandbox_luis/default/contact_person?
results in
Bad Reques
Hi !
(re-posting this, since my earlier post was unsuccessful).
Database back-end is MySQL
=
Controller:--
=
def do_something():
result = db.executesql('select acnm,acgrp,accd from ac',
as_dict=True)
return dict(result=result)
=
View:--
=
do_something.html
{{extend 'la
The first case must be handled by the web server, not web2py.
The second case should be handled by web2py. Please open a google code
ticket. I will test it and fix it.
Massimo
I stronly suggest always using ajax=True and not using ajax_trap=True.
Both trap forms. ajax_trap=True performs an extra optimization: it avoids
the first ajax call by serving the original content within the outer page.
people have reported some problems with this and I am working to fix it.
f
It's the gluon.storage.Storage class -- explained here:
http://web2py.com/book/default/chapter/04#request. You can probably use it
in a module by importing it.
On Sunday, June 12, 2011 2:41:44 AM UTC-4, pbreit wrote:
> I am newish to Python and I think spoiled by Web2py. Is it correct that
> W
On Sunday, June 12, 2011 9:08:10 AM UTC-4, blackthorne wrote:
>
> My point remains on that even if that is working correctly you are
> defining the id for a table so you are not free to replace that
> component for something else not being a table.
Can't you just use the jQuery replaceWith()
@massimo waiting for your reply
On Sun, Jun 12, 2011 at 9:08 PM, Sahil Arora wrote:
> Sorry for the late repply...
> @massimo ...the videos are on my hard disk.I just add them to database by
> upload option so these videos are saved in the 'uploads' folder.
> @Stifanwhen a user upload th
Right now there is a bug that means the request.vars don't get passed
correctly. I assume that will be fixed fairly quickly so ignoring that
for the moment:
As I understand it ajax=False means that the page is compiled on the
first request; but the components all have their own request object.
So
On Sunday, June 12, 2011 9:45:04 AM UTC-4, Luther Goh Lu Feng wrote:
> Hi I have created the entry under ORM
> http://wiki.python.org/moin/HigherLevelDatabaseProgramming
>
> Pls advise if it is too verbose.
Should it perhaps be labeled "web2py DAL" instead of just "DAL" (I don't
think "DAL"
Also, please do not post new questions by replying to existing threads (in
this case, it's a spam thread). Instead, please start a new topic when you
have a new question. Thanks.
On Sunday, June 12, 2011 12:17:28 AM UTC-4, anil manikyam wrote:
>
> *i want to update last row in a table in web2py
Also, kindly please stop posting the same question multiple times -- just
ask once. Thank you.
On Sunday, June 12, 2011 1:28:17 AM UTC-4, Pierre Thibault wrote:
> 2011/6/12 anil manikyam
>
>>
>>
>>
>>> *i want to update last row in a table in web2py how?*
>>
>>
>> --
>> @n!l m@n!ky@m
>>
>
>
The reason I did not include explicit association with web2py is
because I worry that people may mistaken that DAL is not standalone
outside of web2py. Is it a valid concern?
On Jun 13, 2:38 am, Anthony wrote:
> On Sunday, June 12, 2011 9:45:04 AM UTC-4, Luther Goh Lu Feng wrote:
>
> > Hi I have
On Sunday, June 12, 2011 2:59:38 PM UTC-4, Luther Goh Lu Feng wrote:
>
> The reason I did not include explicit association with web2py is
> because I worry that people may mistaken that DAL is not standalone
> outside of web2py. Is it a valid concern?
I see your point. I suppose it's fine as
Would be called DAL2py
Em 12/06/2011 16:20, "Anthony" escreveu:
> On Sunday, June 12, 2011 2:59:38 PM UTC-4, Luther Goh Lu Feng wrote:
>>
>> The reason I did not include explicit association with web2py is
>> because I worry that people may mistaken that DAL is not standalone
>> outside of web2py.
Hi Luis,
Copy the code from here:
http://code.google.com/r/michelecomitini-facebookaccess/source/browse/#hg%2Fapplications%2FhelloFacebook
and let me know if it works
mic
2011/6/12 Luis Goncalves :
> I've been trying to use OAuth2.0 and the facebook module to allow a user to
> login to my site,
The more I get in to working with web2py and writing applications, I always
seem to end up including jQuery UI in my applications, if for no other
reason than it's easy to theme elements of my application using ThemeRoller.
For example, the menu is usually the first thing I change by using the
Great idea.
It would be good to create some standard examples of jQuery UI integration.
On Sun, Jun 12, 2011 at 2:22 PM, Ross Peoples wrote:
> The more I get in to working with web2py and writing applications, I always
> seem to end up including jQuery UI in my applications, if for no othe
Hi,
I need to be able to define tables that reference other tables not yet
defined (because of the order in which define_table is called).
Something like the following (simplified for this discussion):
db.define_table(x'table1', Field('xtest'), Field('xref2', 'reference
table2'))
db.de
thank you so much for your explaination about onaccept argument,
anthony, yeah, i admit my failure code on the e.g. 2 but in e.g.1. the
result is same no error appears just never ending loading... on the list
view comments component.
On Sun, Jun 12, 2011 at 7:15 PM, Anthony wrote:
> What error a
pardon me, btw, what is the function of ajax_trap = True? what can do by
ajax_trap = True?
thank you so much.
a, i c, thank you so much for your explaination and example code, sahil. did
you mind if i want to store the video file and image in the database as
blob? how to do it?
thank you very much before.
Traps the result in a div, there is some info in the book:
http://web2py.com/book/default/chapter/13
I recollect that when this was previously discussed the concensus was to
avoid the overhead of including a JS UI framework because developers may
wish to choose something else.
Even with jQueryUI, there are many different configurations available and
it doesn't make sense to start to add too
I guess you meant: reference xtable2
Well the easy way is to make sure your tables are created in the right
order, but with circular references that isn't possible.
I thought that Massimo had addressed this by turning off the checking for
other tables, but maybe it isn't working...
https://
where I work, DAL is short for "Device Abstraction Layer"... same idea
but for mobile devices :)
Mart :)
On Jun 12, 3:51 pm, Bruno Rocha wrote:
> Would be called DAL2py
> Em 12/06/2011 16:20, "Anthony" escreveu:
>
>
>
>
>
>
>
> > On Sunday, June 12, 2011 2:59:38 PM UTC-4, Luther Goh Lu Feng wro
On Sunday, June 12, 2011 7:07:28 PM UTC-4, 黄祥 wrote:
>
> thank you so much for your explaination about onaccept argument,
> anthony, yeah, i admit my failure code on the e.g. 2 but in e.g.1. the
> result is same no error appears just never ending loading... on the list
> view comments component
I agree with Villas. I think Jquery UI needs to earn its way in. I haven't
really seen much that makes it a "must-have" at this point and I appreciate
Web2py remaining relatively lean. But I'd love to be proven wrong.
I am not sure what you need. If you upload videos as 'upload' fiels
and you download them via the provided 'download' action than you get
http streaming out of the box. download supports partial content/range
requests.
All you need is to embed a flash video player and link the video. Look
into the
ajax = True does the same as ajax_trap = True. They both trap forms.
On Jun 12, 6:11 pm, Stifan Kristi
wrote:
> pardon me, btw, what is the function of ajax_trap = True? what can do by
> ajax_trap = True?
> thank you so much.
You get jquery ui when you install pugin_wiki
On Jun 12, 7:32 pm, pbreit wrote:
> I agree with Villas. I think Jquery UI needs to earn its way in. I haven't
> really seen much that makes it a "must-have" at this point and I appreciate
> Web2py remaining relatively lean. But I'd love to be proven
Just call it dal.py since it is going to remain single file The
description should include a notice that says (this module di normally
distributed as part of web2py but it does not depend on web2py, except
for few some web2py specific functionalities).
On Jun 12, 1:38 pm, Anthony wrote:
> On Sund
Hi villas,
Yes, I meant 'reference xtable2', I just forgot to update the pasted code.
Massimo (or others), should this be supported by web2py for postgresql?.
Thanks,
Carlos
On Sunday, June 12, 2011 7:11:10 PM UTC-4, 黄祥 wrote:
>
> pardon me, btw, what is the function of ajax_trap = True? what can do by
> ajax_trap = True?
> thank you so much.
>
ajax=True means the entire component is always loaded via Ajax (by calling
the web2py_component() function in /static/js
a, i understand, right now, thank you so much for your explaination, massimo
honestly, i'm newbie in programming both in python and web2py, actually i'm
using chrome and use developer tools, but, i don't know how to trace back my
error component elements, any suggestion? i will redevelop my code from
scratch again, as your suggested to start from simple. if you want to take
Hi Massimo,
I believe this new feature for circular references is not working properly
for postgresql.
Please check my message posted here:
https://groups.google.com/d/topic/web2py/ueuWy7XbvD8/discussion
Thanks,
Carlos
a, it's clear for me know, thank you very much for your detail explaination
and reference, anthony, i think this is the answer about my ajax component
problems question, sorry, oot in the wrong room. again, thank you so much.
On Mon, Jun 13, 2011 at 7:53 AM, Anthony wrote:
> On Sunday, June 12,
I cannot reproduce your second problem. The one described in the ticket. Can
others reproduce it?
One thing you can do is tha tif you have LOAD('comp', 'mod.load') you can view
it directly in the browser http://127.0.0.1:8000/myapp/comp/mod.load which may
give you better visibility not the error messages.
On Sunday, June 12, 2011 9:02:20 PM UTC-4, 黄祥 wrote:
>
> honestly, i'm newbie in programming both in python and web2py, actually i'm
> using chrome and use developer tools, but, i don't know how to trace back my
> error component elements, any suggestion?
>
In Chrome, open developer tools, sel
I found this blog post and it seems interesting:
http://www.mattb.net.nz/blog/2011/06/13/using-startcom-free-ssl-certificates-with-cyrus-imapd/
58 matches
Mail list logo