Re: [web2py] FixComputerpProblemsSite Surely Knows How to Fix Computer Problems!

2011-06-12 Thread pbreit
Can you provide mor detail about what you are trying to do and show us the code that you have written to try and do it?

[web2py] Python and Web2py dictionary behavior

2011-06-12 Thread pbreit
I am newish to Python and I think spoiled by Web2py. Is it correct that Web2py's dictionaries are enhanced to support dot notation? And the dot notation has the additional benefit of not erroring if it's referencing a non-existing key? I'm passing a dictionary to a module and am wondering how

Re: [web2py] how to use this ajax upload script with web2py?

2011-06-12 Thread danto
2011/6/11 Dr Schmulge dr.schmu...@gmail.com Take a slice ) http://web2pyslices.com/main/slices/take_slice/103 omg, ty! :)

[web2py] Re: Python and Web2py dictionary behavior

2011-06-12 Thread pbreit
I think this might be the best way to do it: my_dict.get(key, value_if_absent)

[web2py] ORing between validators

2011-06-12 Thread Neveen Adel
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

Re: [web2py] Web2py's editor abort and communication error

2011-06-12 Thread Phyo Arkar
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 phyo.arkarl...@gmail.comwrote: Is there also normal save , not ajaxed one? I think i remember having one

Re: [web2py] ORing between validators

2011-06-12 Thread Marin Pranjic
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 nevo.a...@gmail.com wrote: Hello, I have a field in database that can accepts float numbers or time. so i need to have OR-ing between

[web2py] How hard it is to do Non-WebSocket Comet (Long Polling)

2011-06-12 Thread Phyo Arkar
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

[web2py] How hard it is to do Non-WebSocket Comet (Long Polling)

2011-06-12 Thread Phyo Arkar
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

[web2py] Re: ORing between validators

2011-06-12 Thread Neveen Adel
Thanks a lot Marin :) , It worked fine with me. On Jun 12, 12:11 pm, Marin Pranjic marin.pran...@gmail.com 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 nevo.a...@gmail.com

Re: [web2py] Re: ajax is not working in components

2011-06-12 Thread Stifan Kristi
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 =

Re: [web2py] Re: ajax is not working in components

2011-06-12 Thread Anthony
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

Re: [web2py] Create tables with models in subfolders

2011-06-12 Thread contatogilson...@gmail.com
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.

[web2py] Re: My talk at ChiPy about new features

2011-06-12 Thread Luther Goh Lu Feng
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 massimo.dipie...@gmail.com wrote: I think so. WOuld you kindly app a link to the file in the mercurial repo? On Jun 11,

[web2py] When would one load a component with ajax=True as opposed to ajax_trap=True

2011-06-12 Thread apple
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?

[web2py] Re: How hard it is to do Non-WebSocket Comet (Long Polling)

2011-06-12 Thread Massimo Di Pierro
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 phyo.arkarl...@gmail.com wrote: Hello all; In my project i have to process files HUGE Gigabyte files . on

[web2py] value not displayed in custom widget

2011-06-12 Thread apple
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

[web2py] Re: value not displayed in custom widget

2011-06-12 Thread Massimo Di Pierro
try replace _value=value with value=value

Re: [web2py] Re: preview image from video file

2011-06-12 Thread Sahil Arora
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:10

[web2py] Re: When would one load a component with ajax=True as opposed to ajax_trap=True

2011-06-12 Thread pbreit
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

[web2py] Re: How to implement a fail whale for a web2py website?

2011-06-12 Thread Luis Goncalves
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

[web2py] string encode problem while returning dictionary

2011-06-12 Thread Vineet
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

[web2py] Re: How to implement a fail whale for a web2py website?

2011-06-12 Thread Massimo Di Pierro
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

[web2py] Re: When would one load a component with ajax=True as opposed to ajax_trap=True

2011-06-12 Thread Massimo Di Pierro
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.

[web2py] Re: Python and Web2py dictionary behavior

2011-06-12 Thread Anthony
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

[web2py] Re: making requests to components from outside

2011-06-12 Thread Anthony
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()

Re: [web2py] Re: preview image from video file

2011-06-12 Thread Sahil Arora
@massimo waiting for your reply On Sun, Jun 12, 2011 at 9:08 PM, Sahil Arora sahilarora...@gmail.comwrote: 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.

[web2py] Re: When would one load a component with ajax=True as opposed to ajax_trap=True

2011-06-12 Thread apple
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

[web2py] Re: My talk at ChiPy about new features

2011-06-12 Thread Anthony
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 is really

Re: [web2py] FixComputerpProblemsSite Surely Knows How to Fix Computer Problems!

2011-06-12 Thread Anthony
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

Re: [web2py] Script TDD in web2py

2011-06-12 Thread Anthony
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 anilman...@gmail.com *i want to update last row in a table in web2py how?* -- @n!l m@n!ky@m

[web2py] Re: My talk at ChiPy about new features

2011-06-12 Thread Luther Goh Lu Feng
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 abasta...@gmail.com wrote: On Sunday, June 12, 2011 9:45:04 AM UTC-4, Luther Goh Lu Feng

[web2py] Re: My talk at ChiPy about new features

2011-06-12 Thread Anthony
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 it

Re: [web2py] Re: My talk at ChiPy about new features

2011-06-12 Thread Bruno Rocha
Would be called DAL2py Em 12/06/2011 16:20, Anthony abasta...@gmail.com 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

Re: [web2py] How to access facebook graph of logged in user

2011-06-12 Thread Michele Comitini
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 lgoncal...@gmail.com: I've been trying to use OAuth2.0 and the facebook module to allow a user to

[web2py] Discussion: Thoughts about including jQuery UI in core web2py?

2011-06-12 Thread Ross Peoples
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

Re: [web2py] Discussion: Thoughts about including jQuery UI in core web2py?

2011-06-12 Thread joseph simpson
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 ross.peop...@gmail.comwrote: The more I get in to working with web2py and writing applications, I always seem to end up including jQuery UI in my

[web2py] postgresql - define tables that reference other tables not yet defined

2011-06-12 Thread Carlos
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'))

Re: [web2py] Re: ajax is not working in components

2011-06-12 Thread Stifan Kristi
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 abasta...@gmail.com

Re: [web2py] Re: When would one load a component with ajax=True as opposed to ajax_trap=True

2011-06-12 Thread Stifan Kristi
pardon me, btw, what is the function of ajax_trap = True? what can do by ajax_trap = True? thank you so much.

Re: [web2py] Re: preview image from video file

2011-06-12 Thread Stifan Kristi
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.

Re: [web2py] Re: When would one load a component with ajax=True as opposed to ajax_trap=True

2011-06-12 Thread villas
Traps the result in a div, there is some info in the book: http://web2py.com/book/default/chapter/13

[web2py] Re: postgresql - define tables that reference other tables not yet defined

2011-06-12 Thread villas
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...

[web2py] Re: My talk at ChiPy about new features

2011-06-12 Thread mart
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 rochacbr...@gmail.com wrote: Would be called DAL2py Em 12/06/2011 16:20, Anthony abasta...@gmail.com escreveu: On Sunday, June 12, 2011 2:59:38 PM

Re: [web2py] Re: ajax is not working in components

2011-06-12 Thread Anthony
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.

Re: [web2py] Discussion: Thoughts about including jQuery UI in core web2py?

2011-06-12 Thread pbreit
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.

[web2py] Re: preview image from video file

2011-06-12 Thread Massimo Di Pierro
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

[web2py] Re: When would one load a component with ajax=True as opposed to ajax_trap=True

2011-06-12 Thread Massimo Di Pierro
ajax = True does the same as ajax_trap = True. They both trap forms. On Jun 12, 6:11 pm, Stifan Kristi steve.van.chris...@gmail.com wrote: pardon me, btw, what is the function of ajax_trap = True? what can do by ajax_trap = True? thank you so much.

[web2py] Re: Discussion: Thoughts about including jQuery UI in core web2py?

2011-06-12 Thread Massimo Di Pierro
You get jquery ui when you install pugin_wiki On Jun 12, 7:32 pm, pbreit pbreitenb...@gmail.com 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

[web2py] Re: My talk at ChiPy about new features

2011-06-12 Thread Massimo Di Pierro
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

[web2py] Re: postgresql - define tables that reference other tables not yet defined

2011-06-12 Thread Carlos
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

Re: [web2py] Re: When would one load a component with ajax=True as opposed to ajax_trap=True

2011-06-12 Thread Anthony
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

Re: [web2py] Re: When would one load a component with ajax=True as opposed to ajax_trap=True

2011-06-12 Thread Stifan Kristi
a, i understand, right now, thank you so much for your explaination, massimo

Re: [web2py] Re: ajax is not working in components

2011-06-12 Thread Stifan Kristi
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

[web2py] Re: ATTENTION trunk users!!!!

2011-06-12 Thread Carlos
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

Re: [web2py] Re: When would one load a component with ajax=True as opposed to ajax_trap=True

2011-06-12 Thread Stifan Kristi
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 abasta...@gmail.com wrote:

[web2py] Re: How to implement a fail whale for a web2py website?

2011-06-12 Thread Massimo Di Pierro
I cannot reproduce your second problem. The one described in the ticket. Can others reproduce it?

Re: [web2py] Re: ajax is not working in components

2011-06-12 Thread pbreit
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.

Re: [web2py] Re: ajax is not working in components

2011-06-12 Thread Anthony
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, select

[web2py] generating free domain validated ssl certificates

2011-06-12 Thread Stefaan Himpe
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/