[web2py] Re: dataTables with serverside json

2012-02-10 Thread Vineet
Richard, Here is my minimal code for returning json data in dataTables via web2py's ajax function. ---View--- ABC Category Name Code // this I keep in js folder function dtbl_show(hash_div, sAjaxSource, aoColumns) { $(document).ready(function() { $(hash_div).d

Re: [web2py] uwsgi configuration: why many lines in /root/var/log/uwsgi-python/web2py log : routing 0 routes 0 ?

2012-02-10 Thread Roberto De Ioris
> strange, really :D > > I don't mind if that turns out in the logging, but I have the same > behaviour > > niphlod@platypus:~$ uwsgi-python --version > uWSGI 0.9.6.8 > > I use uwsgi-python in production /usr/bin/uwsgi-python . If I recall > correctly that is a symbolic link to `/etc/alternatives/

[web2py] Re: Significant overhead with each define_table()

2012-02-10 Thread James M.
I have a significantly more performant solution that I am trying. I moved my db.define_table() out of models folder and into a class defined in modules. The class has properties for each table. The properties(tables) are lazy loaded as needed. The way I implemented it, the dal syntax is almost

[web2py] Re: debugging

2012-02-10 Thread Vineet
Forgot to mention that Full version of Eclipse is Not required. Only the runtime. You need to google for the runtime binary version download link. -- V On Feb 11, 9:28 am, Vineet wrote: > I am using eclipse + pydev for debugging. > It rocks. > > Miguel Lopes has shared a excellent write-up on "h

[web2py] Re: debugging

2012-02-10 Thread Vineet
I am using eclipse + pydev for debugging. It rocks. Miguel Lopes has shared a excellent write-up on "how-to". You might be interested in this thread (see the 4th from last post) http://groups.google.com/group/web2py/browse_thread/thread/b6c0cf5d61d0c565/55eed4b5c8cd8234?lnk=gst&q=debug+eclipse#55e

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-10 Thread Bruno Rocha
Thank you Anthony, I am going to talk about it with Michele. On Fri, Feb 10, 2012 at 7:44 PM, Anthony wrote: > Only question I have is: >> >> I am using MIchelle's code to facebook and google Oauth. [ >> http://code.google.com/r/**michelecomitini-**facebookaccess/

Re: [web2py] Re: Modules: how to access db

2012-02-10 Thread Sathvik Ponangi
Thanks for that! I've never tested it in a multi-threaded environment. On Sat, Feb 11, 2012 at 4:41 AM, nick name wrote: > This solution will lead to a race condition. Do not use it! > > If you have multiple threads, they might update your commons at the same > time and you'll get request from o

[web2py] Re: Scheduler json string for vars parm

2012-02-10 Thread blackthorne
Never mind, just did it! args=[] vars={"plugin_title":"http","targets":["http://www.google.pt"]} On Feb 11, 2:08 am, blackthorne wrote: > Sorry, to reopen this thread, I have a question close to this one. > I want to invoke a method called "plugin_run" from a scheduler task. > > def plugin_run(p

[web2py] Re: Scheduler json string for vars parm

2012-02-10 Thread blackthorne
Sorry, to reopen this thread, I have a question close to this one. I want to invoke a method called "plugin_run" from a scheduler task. def plugin_run(plugin_title, **kw): <- this is the signature plugin_run('http',targets=['https://www.google.pt']) <- valid example considering this, how should

[web2py] Re: One issues (I guess) with auth form login+janrain

2012-02-10 Thread Alan Etkin
> Does it makes sense to popup the password field if it's None from the dict? I think it does, as doing otherwise would limit the authentication feature. If you don't want to ask for password in an authentication form, you could customize the form validation to set/get a password automatically. A

Re: [web2py] Re: The web2py version

2012-02-10 Thread Bruce Wade
Yeah the None error is because we need to add an error message for IS_STRONG for some reason that validator doesn't return any message, possibly a bug?? I agree the fonts are oversized however that is what the CEO wants because most of our members are older people who are not very good with comput

[web2py] Re: Search menu

2012-02-10 Thread Alan Etkin
I belive there's no info about this case in the book, perhaps you could use form helpers and other tags into the link placeholders after the menu object creation, modifying the MENU output, so the effect would be similar to what you described. However, there could be some issues with the display of

[web2py] Re: Chain/Multiple condition on select

2012-02-10 Thread gbs
Yes, thanks, you'r right. With you'r method, it's simple ;) And you can make AND condition : query &= db.mytable.tag == tag OR condition : query |= db.mytable.tag == tag It's exactly what i'm seeking! You'r solution, and Bruno's one, are perfect, I hope that can help someone else, Have a nice

[web2py] Re: markmin and image width

2012-02-10 Thread Alan Etkin
If you mean having markmin to give the image a given width, this migth help: "... This paragraph has an image aligned to the right with a width of 200px. Its is placed using the code [[some image http://www.web2py.com/examples/static/web2py_logo.png right 200px]]. ..." from here: http://web2py.c

[web2py] Re: The web2py version

2012-02-10 Thread Alan Etkin
It looks nice. The registration validation returns a "None" error at the first section. I think that the text font is oversized (seen with Firefox 3.6.24 and a 16" LCD) Regards On 9 feb, 22:29, Bruce Wade wrote: > Hi, > > I know I have been posting a lot of questions in this group, here is > w

[web2py] Re: Chain/Multiple condition on select

2012-02-10 Thread Anthony
On Friday, February 10, 2012 6:19:09 PM UTC-5, gbs wrote: > > I have try the solution of anthony, but i don't have the skill in > python to success.. > (some error with 'Rows' object has no attribute 'select', etc ;) > Once the query has been built, this should work: rows = db(query).select()

[web2py] Re: Chain/Multiple condition on select

2012-02-10 Thread gbs
I have try the solution of anthony, but i don't have the skill in python to success.. (some error with 'Rows' object has no attribute 'select', etc ;) But it's my fault, Thanks again On 10 fév, 23:43, gbs wrote: > Thanks to all. > > I have test the first answer, from Bruno.. > > It's work! > >

[web2py] Re: debugging

2012-02-10 Thread Alan Etkin
There's very useful information about debugging web2py here: http://groups.google.com/group/web2py/browse_thread/thread/7ea4aadbd2676e3/c714f62f47db2968 On 10 feb, 03:53, shartha wrote: > I found some older posts on how to debug using web2py.py. Such file > doesn't exist in newer versions. How ca

[web2py] Re: security check in web2py

2012-02-10 Thread nick name
I usually run it with -i 0.0.0.0 , which means it listens simultaneously on 127.x.y.z and on any other address the computer might have. The admin pages are accessible only when coming through localhost (127.0.0.1) or ssl, no need for different processes/ports.

[web2py] Re: Modules: how to access db

2012-02-10 Thread nick name
This solution will lead to a race condition. Do not use it! If you have multiple threads, they might update your commons at the same time and you'll get request from one session, and session from another, and db from a third. "current" is a thread-local thing, guaranteed not to be touched by an

Re: [web2py] DAL speed - an idea

2012-02-10 Thread nick name
There's a tree structure among the record, upon which the aggregation is computed. Some dbs (e.g. oracle) have extensions for tree-like structures (CONNECT BY etc), but it is not standard, and I need to support both sqlite and postgres in this app.

Re: [web2py] Re: keep shared objects permanently in RAM: Is it possible ?

2012-02-10 Thread Michele Comitini
I wrote: > The problem with MAP_ANONYMOUS is that you cannot share after fork. I should have written: you cannot share *a mmap created* after fork. > > http://www.kernel.org/doc/man-pages/online/pages/man2/mmap.2.html > > If you are on Linux here you find some quick explanation how mmap, > tmpfs

Re: [web2py] Re: keep shared objects permanently in RAM: Is it possible ?

2012-02-10 Thread Michele Comitini
2012/2/9 Sebastian E. Ovide : > That is a nice trick for sharing information with different processes > reducing to the minimum the FS IO... It still has the IO bottleneck of > read/write from/to file compare with real data permanent in memory... but > still a valid approach... On a generic posix

Re: [web2py] Re: Chain/Multiple condition on select

2012-02-10 Thread Anthony
On Friday, February 10, 2012 5:35:50 PM UTC-5, Detectedstealth wrote: > > sql = db > -- if tag : > sql = sql(db.mytable.tag = "xxx") > -- if status: > sql = sql(db.mytable.status = "xxx") > > result = sql.select() Yes, that's nice too. It works because the Set object is callable, and calling

[web2py] Re: Chain/Multiple condition on select

2012-02-10 Thread gbs
Thanks to all. I have test the first answer, from Bruno.. It's work! Thanks a lot, i'm searching/reading during a long time! I will test the others solutions, why i think they are more simple/ comprehensible for me :$ Best regards ps : sorry for the language On 10 fév, 23:18, Bruno Rocha wr

Re: [web2py] Re: Chain/Multiple condition on select

2012-02-10 Thread Bruce Wade
sql = db -- if tag : sql = sql(db.mytable.tag = "xxx") -- if status: sql = sql(db.mytable.status = "xxx") result = sql.select() On Fri, Feb 10, 2012 at 2:25 PM, Anthony wrote: > You could do something like: > > query = db.mytable.id > 0 > if tag: > query &= db.mytable.tag == tag > if st

Re: [web2py] Re: keep shared objects permanently in RAM: Is it possible ?

2012-02-10 Thread Michele Comitini
>>  You can reach a very high level of >> parallelism with lower dead-locking probability than with java >> threads. > > > any source about that ? (any paper, benchmarks etc...) > Search for something like "Guido van Rossum threading vs forking" or read some recent Bruce Eckel books. The summary

[web2py] Re: Chain/Multiple condition on select

2012-02-10 Thread Anthony
You could do something like: query = db.mytable.id > 0 if tag: query &= db.mytable.tag == tag if status: query &= db.mytable.status == status Anthony On Friday, February 10, 2012 5:10:01 PM UTC-5, gbs wrote: > > Hi, > > i have search posts on this group, but i don't have found the solut

[web2py] Re: Chain/Multiple condition on select

2012-02-10 Thread gbs
Oh? you think? Ok i will test, thanks a lot! On 10 fév, 23:18, Bruno Rocha wrote: > > *queries=[]* > > *if arg1 == "x": queries.append(db.table.field == x)* > > *if arg2 == "y": queries.append(db.table.otherfield == y)* > > *# many conditions here* > > *query = reduce(lambda a,b:(a&b),querie

[web2py] Re: Chain/Multiple condition on select

2012-02-10 Thread gbs
I know that you can do : result = db((db.xxx.tag==tag) & (db.xxx.status==status)).select() But i don't know how to generate the condition, one by one... On 10 fév, 23:10, gbs wrote: > Hi, > > i have search posts on this group, but i don't have found the solution > of my question :$ > > I ha

Re: [web2py] Chain/Multiple condition on select

2012-02-10 Thread Bruno Rocha
> > *queries=[]* > *if arg1 == "x": queries.append(db.table.field == x)* > *if arg2 == "y": queries.append(db.table.otherfield == y)* > *# many conditions here* > *query = reduce(lambda a,b:(a&b),queries)* > *db(query).select()* > On Fri, Feb 10, 2012 at 8:10 PM, gbs wrote: > Hi, > > i have

[web2py] Re: maybe minor bug or just documentation

2012-02-10 Thread Anthony
> > jodb.define_table('category', > Field('name', 'string', length=100, unique = True, requires = > IS_NOT_EMPTY()), > Here, by explicitly specifying "requires", you are preventing web2py from automatically adding the IS_NOT_IN_DB validator, so you have to add that one explicitly as well.

[web2py] Chain/Multiple condition on select

2012-02-10 Thread gbs
Hi, i have search posts on this group, but i don't have found the solution of my question :$ I have a table, wich display record of a database, nothing weird.. I have made a form, so you can "filter" the result. You can check "Tag" of the record, "Status" of the record, so on... How can i crea

[web2py] Re: how to deploy web2py not in the apache root (help with url rewriting)

2012-02-10 Thread giovanni allegri
Thanks for your tips. I'm out of office in these days so I cannot test it now. I was just thinking to the solution suggested by tom. I will try it because I will have to serve various applications. I will need to remove the w2p prefix too to obtain (e.g.): http://server2/cpa4 and http://server/mast

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-10 Thread Ross Peoples
CKEditor is licensed under LGPL, so you're good there. As for plugin_ckeditor. I wrote it, but I haven't given it a license yet (on my todo list). However, I will probably go with LGPL as well. It only makes sense as web2py and CKEditor are both LGPL. So you are all set with the CKEditor stuff.

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-10 Thread Anthony
> > Only question I have is: > > I am using MIchelle's code to facebook and google Oauth. [ > http://code.google.com/r/michelecomitini-facebookaccess/] > Oauth is GPLv2, which is not compatible with LGPL. Maybe you can get Michelle to switch to LGPL or make an exception for this one case. > I

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-10 Thread Bruno Rocha
well, I did it, LGPLv3 https://github.com/rochacbruno/Movuca/blob/master/LICENSE I needed to choose today because I will start a big project for one client using Movuca as base, and I read too much (do not understand everything) but I think LPGP will fits it. Only question I have is: I am using

Re: [web2py] Re: Need assistance with executesql

2012-02-10 Thread Niphlod
it's actually not web2py, but the db adapter . Also, it would be a lot easier without having to taking into account the first interpolation (payback_types = ('s','p')) . In that case you can use the simple %(name)s notation with dict as placeholders parameter, or the positional one with sim

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-10 Thread Anthony
On Friday, February 10, 2012 3:09:56 PM UTC-5, rochacbruno wrote: > > > > On Fri, Feb 10, 2012 at 1:00 PM, Wikus van de Merwe < > dupakrop...@googlemail.com> wrote: > >> GPLv3 > > > Whats the key differences between GPLv3 and LGPLv3 ? > I think basically LGPL allows "linking" of proprietary softwa

[web2py] Markmin Output Questions

2012-02-10 Thread Ross Peoples
I am looking into writing lots of documentation and have been looking around at the different solutions. I know that the web2py book was written with Markin, and seeing as how it is able to output to multiple different formats and supports things like tables and image alignment, I figure it's p

[web2py] Re: web2py shell not executing db.define_table() but does record it in SQL log.

2012-02-10 Thread Massimo Di Pierro
You did not db.commit() it On Feb 10, 2:04 pm, Bill Thayer wrote: > In summary, creating a person table from the web2py shell creates an entry > in the SQL log but does not create the table. > > I'm using the images example webapp for working the examples in Chapter > 26

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-10 Thread Bruce Wade
Here is why openoffice moved from GPL to LGPL: http://blogs.oracle.com/webmink/entry/openoffice_org_goes_to_lgplv3 On Fri, Feb 10, 2012 at 12:09 PM, Bruno Rocha wrote: > > > On Fri, Feb 10, 2012 at 1:00 PM, Wikus van de Merwe < > dupakrop...@googlemail.com> wrote: > >> GPLv3 > > > Whats the key

Re: [web2py] Re: Need assistance with executesql

2012-02-10 Thread Bruce Wade
Yeah the DAL didn't work as planed. Your final suggestion worked. I was using postgresql. With sqlalchemy you can use :keyword I guess web2py requires %%(keyword)s as you said above. Thanks for the help, this one was driving me crazy :D On Fri, Feb 10, 2012 at 12:16 PM, Niphlod wrote: > PS: f

[web2py] Re: Need assistance with executesql

2012-02-10 Thread Niphlod
PS: for postgresql, it's nasty ... placeholders are in "python" notation, so db.executesql('select * from %s', placeholders=('example')) or db.executesql('select * from %(tablename)s', placeholders={'tablename' : 'example'}) works. If payback types is passed as a string, you need to add a %

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-10 Thread Bruno Rocha
On Fri, Feb 10, 2012 at 1:00 PM, Wikus van de Merwe < dupakrop...@googlemail.com> wrote: > GPLv3 Whats the key differences between GPLv3 and LGPLv3 ? -- Bruno Rocha [http://rochacbruno.com.br]

[web2py] web2py shell not executing db.define_table() but does record it in SQL log.

2012-02-10 Thread Bill Thayer
In summary, creating a person table from the web2py shell creates an entry in the SQL log but does not create the table. I'm using the images example webapp for working the examples in Chapter 26. I entered... >>> db.define_table('person', Field('n

[web2py] Re: Need assistance with executesql

2012-02-10 Thread Niphlod
what db is involved ? placeholders can have different formats, I don't recall using the ":variable" notation... PS: I'm assming that the "seconds()" method in the other thread didn't worked... sorry for that

Re: [web2py] Re: Folder inside controller dosen't work.

2012-02-10 Thread howesc
one option working with the framework as is: - make a controller called jsonrpc with 1 method - use the first arg from the request.args to select the module to call - create a directory in modules and put all your calls in there. - import and invoke the modules as needed by the controller (pas

Re: [web2py] Making Internationalization Easier

2012-02-10 Thread Bruno Rocha
I am interested in this, did you see how Magento inline translations works? Let me know if I can help. http://zerp.ly/rochacbruno Em 10/02/2012 13:42, "Bruce Wade" escreveu: > Hello, > > I am working on a module for my current site that will make doing > internationalization easier for non-tech

[web2py] Re: maybe minor bug or just documentation

2012-02-10 Thread Lewis
The model follows. Focus on the category.name field (and point out anything else that looks wrong/inept). Looks like I have belt, suspenders, and back-up suspenders for that field. I need category.name to be unique and not empty. Is it the requires=IS_NOT_EMPTY() that forces me to use IS_NOT_IN_D

[web2py] Need assistance with executesql

2012-02-10 Thread Bruce Wade
Hi, I have posted a question about getting this to work with DAL, I am unable to do so. Therefor wish to just use executesql but am also having some issues. The way we have been doing it with sqlalchemy: sqlstr = """ select sum(happen_amount) from cash_journal whe

[web2py] Re: DAL Limitations with aggregate and union queries

2012-02-10 Thread BrendanC
>> Here "*request*" is a user requesting a page, not your application making a query to the database. >> OK - now that clears up my confusion and it all makes sense- guess I was having a YASM (yet another senior moment) here. (So used to thinking in terms of http requests it's easy to forget

[web2py] Re: Making Internationalization Easier

2012-02-10 Thread Mirek Zvolský
Of course I have interess for all what can improve internalization, because at this time it is not very clever. Current problems: 1) No data from where (in sources) the current string is. It would be nice to have inforrmation like "web2py core", "instantpress", "plugin xxx", "my application y

[web2py] Re: security check in web2py

2012-02-10 Thread Ross Peoples
Another option, which I use is to generate SSL certs and run web2py with -k and -c so that web2py runs on SSL, enabling admin from other computers.

[web2py] Re: security check in web2py

2012-02-10 Thread Massimo Di Pierro
Ciao Massimo, You suggest you do not disable it. Instead run: python web2py.py -i 10.0.1.7 -p 8080 -a '' python web2py.py -i 127.0.0.1 -p 8081 -a xx then connect to 8081 via ssl tunnel. exposing admin without https is a major security risk. If you really want to do, you can comment the chec

[web2py] security check in web2py

2012-02-10 Thread Massimo Di Stefano
i'm connected trough ssh to a remote linux box .. i started web2py by command line using : python web2py.py -i 10.0.1.7 -p 8080 -a xx if i go on the web page : http://myip:8080/welcome/default/index i can access to the web2py main page, but if i try to login to the admin interface i

Re: [web2py] Re: Making Internationalization Easier

2012-02-10 Thread Niphlod
no problem. just for the record, in the admin app the vertical length of the page would be a minor problem for me if the untranslated strings showed before/after the yet translated ones ... 1200 strings before, add a controller, 1250 strings after, also if they are highlighted it's heavy to scr

Re: [web2py] Re: Questions on the scheduler

2012-02-10 Thread Vinicius Assef
Yet on schedules, if my task failed or timed out, will web2py try to run it next time? On Fri, Feb 10, 2012 at 3:39 PM, Massimo Di Pierro wrote: > Not sure I understand. You do not call scheduled_workers functions. > You schedule tasks. Workers pick them up from queue an execute them > using th

Re: [web2py] Re: DAL Limitations with aggregate and union queries

2012-02-10 Thread Niphlod
@mcm : I was replying to BrendanC. On cluster indexes: retried, getting slighly better resultsthis timings don't get into account the actual "CLUSTER" operation, only the queries fired after having the table reindexed. method1 : 20.4900407235 method2 : 4.55434324348 method3 : 5.3219832108

[web2py] Re: Questions on the scheduler

2012-02-10 Thread Massimo Di Pierro
Not sure I understand. You do not call scheduled_workers functions. You schedule tasks. Workers pick them up from queue an execute them using the available power. On Feb 10, 4:54 am, blackthorne wrote: > - Is it possible to call scheduled_workers functions asynchronously? > How? > - How should I

[web2py] Re: Issue 651: strange events behaviors for grid and smartgrid

2012-02-10 Thread Massimo Di Pierro
SQLFORM.grid has ondelete, SQLFORM(...).accept(...) does not. The book is correct. The problem is that grid uses ondelete when doing ajax delete but not when using SQLFORM(...).accept(...) On Feb 10, 4:03 am, Manuele Pesenti wrote: > I post here this discussion because I'm not yet subscribed to

Re: [web2py] Re: Folder inside controller dosen't work.

2012-02-10 Thread Jonathan Lundell
On Feb 10, 2012, at 4:57 AM, Phyo Arkar wrote: > On one application , i have 20 JSON RPC methods , separated by each > controller. It going to be more than 100 JSORPC methods within 1 year for > whole project. > Out of curiosity: why only one method per controller?

Re: [web2py] Re: Making Internationalization Easier

2012-02-10 Thread Bruce Wade
You make a good point on the ~1200 strings. The language files are just python dictionaries, so I don't see any reason why we can't provide paging so make the file easier to work with. Sure if you would like to help the more people the better as I think everyone using web2py would benefit from thi

[web2py] Re: trying itemize1... code on shell - solved

2012-02-10 Thread Bill Thayer
I needed to put: >>>print itemize1('www.google.com') I forgot the print command.

Re: [web2py] Re: Folder inside controller dosen't work.

2012-02-10 Thread Phyo Arkar
> > but this project which i doing alone now , with a team with different > people , which going to grow soon to 15 members thats become big problem. * correction * Which i was doing alone "Before" , now I am with a team of different programming background. On Fri, Feb 10, 2012 at 7:27 PM, Phyo

[web2py] Re: Making Internationalization Easier

2012-02-10 Thread Niphlod
uhm, could be interesting. I myself have some problems updating the language of an application that has ~1200 strings with the normal admin page. Having them inside a db would be useful but I don't think I'll use the "translate directly on the site" feature I placed some T()s inside j

Re: [web2py] Re: Computed Fields broken by 1.99.2

2012-02-10 Thread Richard Vézina
I just want to report here about this thread that it seems that computed field has to be set to readable and writable = True to make the computed field to be effectively computed on form submit. Computed field won't appears in form but will be computed. If not readable and writable True (I didn't t

[web2py] trying itemize1... code on shell

2012-02-10 Thread Bill Thayer
While reading the web2pybook on page http://web2py.com/books/default/chapter/29/5 in the def...return chapter I tried to enter the code into the images shell controller (http://127.0.0.1:8000/admin/shell/index/images) to kind of test out both the code and using the shell. I copied this into th

[web2py] Re: Implementing task queue using web2py

2012-02-10 Thread howesc
some questions/thoughts: - local test server or production? - did you check the task queue? in production go to the admin console and find the task queues link. in local test go to /_ah/admin and find the task queue link - is params a required argument to taskqueue.add()? i don't know if i

[web2py] Re: Implementing task queue using web2py

2012-02-10 Thread Wikus van de Merwe
Check the app engine requests log to make sure the right task URL is being used.

[web2py] Re: Modules: how to access db

2012-02-10 Thread Sathvik Ponangi
Instead of using gluon, I pass it while importing the module. For example, if my module is commons, then in my controller: import commons commons.db = db commons.request = request commons.session = session Now db , request and session should now be available in the module...

[web2py] Making Internationalization Easier

2012-02-10 Thread Bruce Wade
Hello, I am working on a module for my current site that will make doing internationalization easier for non-technical people. Primary reason the current site will be translated into 5 different languages to start and the people doing the translations are not very good with technology to some exte

[web2py] Support for PyPy

2012-02-10 Thread Sathvik Ponangi
Is there some way to run Web2Py on PyPy ?

[web2py] Re: Update legacy table using primarykey failed

2012-02-10 Thread Omi Chiba
I'm not sure this happen for postgres but I think it's a bug. I submit the issue #656. http://code.google.com/p/web2py/issues/detail?id=656 On Feb 9, 1:58 pm, Niphlod wrote: > that seems a float vs decimal problem > > bottom line, I didn't get what is not working right now ? > > PS: po

[web2py] Re: Web2py session has me really confused now

2012-02-10 Thread Cliff
Anthony, thank you. I get it now. I somehow thought these two are equivalent: session[request.controller].something = 'foo' session[request.controller]['something'] = 'foo' Obviously they aren't. On Feb 10, 8:41 am, Anthony wrote: > > # I think this should work: > > if 'column_select_value' i

[web2py] Re: best way to fetch data from multiple tables?

2012-02-10 Thread Omi Chiba
Sorry, I forgot GAE doesn't support Join. I can't think of any other way except your original one. I heard now mysql is available on GAE. Maybe you can try if the support join ? http://googleappengine.blogspot.com/2011/10/google-cloud-sql-your-database-in-cloud.html On Feb 10, 6:10 am, Saurabh S

Re: [web2py] Re: DAL Limitations with aggregate and union queries

2012-02-10 Thread Michele Comitini
Niphold, Thanks for the reply. My first question is about this: http://www.postgresql.org/docs/8.1/static/sql-cluster.html. Sorry if I did not explicit about what I was referring, as it is postgresql specific. I was wondering if you would see different figures or not, because order by is influe

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-10 Thread Wikus van de Merwe
With web2py being licensed under LGPL it is possible to build applications which are proprietary software. To some degree it is even possible to build another web framework that uses unchanged web2py code as back-end. In practice, however, the latter is too complicated on a technical level. The

Re: [web2py] Re: Advice please: best way to count records?

2012-02-10 Thread Richard Vézina
Done : Issue 655 :Adding cache argument to .count() Richard On Fri, Feb 10, 2012 at 12:02 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > open a ticket. this should be added > > On Feb 9, 11:42 am, Richard Vézina > wrote: > > Is

[web2py] Re: Web2py session has me really confused now

2012-02-10 Thread Anthony
> > # I think this should work: > if 'column_select_value' in session[request.controller].keys(): > column_select_value = > session[request.controller].column_select_value > > # But I get this: > AttributeError: 'dict' object has no attribute 'column_select_value' > In Python, you ca

[web2py] Web2py session has me really confused now

2012-02-10 Thread Cliff
Help me understand. session[request.controller] = {} # This works great # Raises an exception unless foo is already an attribute of session[request.controller] bar = session[request.controller].foo AttributeError: 'dict' object has no attribute 'foo' # Okay, makes sense # I think this should wor

[web2py] Re: DAL Limitations with aggregate and union queries

2012-02-10 Thread Niphlod
just take a look to http://web2py.com/book/default/chapter/06#Connection-pooling for understanding how DAL handles connections. Your initial question was a concern on speed on aggregate and unions, and the script you provided clearly use one and only one db connection. I'm sorry if I misunders

Re: [web2py] Re: Folder inside controller dosen't work.

2012-02-10 Thread Phyo Arkar
ofcoz i put all the reusable code inside modules and such. and most are object oriented. But that is not a choice WHEN you want to separate Controllers thats going to serve ONLY JSONRPC and controller for HTML only.Folder becomes only necessary choice. On one application , i have 20 JSON RPC me

Re: [web2py] Re: DAL Limitations with aggregate and union queries

2012-02-10 Thread Michele Comitini
Niphlod, Just out of curiosity. Is the dal connection pooled? If in postgres you CLUSTER on the salary index do figures change? mic 2012/2/10 BrendanC : > Niphlod, > Thanks (belatedly) for your valuable  contribution and  your test results. >  The only thing missing from your test is contention

Re: [web2py] Re: Grid/Smartgrid: how to use the 'selectable' option?

2012-02-10 Thread Fabiano Faver
I had this same doubt and this thread have helped as there is no explanation on online book. But I want to make the rows selectable to allow user to update all them toguether. I have no clue how to edit the submit button that shows at the end of the table when selectable is active. Any tips?

Re: [web2py] Re: Modules: how to access db

2012-02-10 Thread Michele Comitini
other ways to do it without using current. in the module (ex. tools.py): def regte_verwysing(regte, tabel, veld, db): lys = db(db[tabel].article == regte).select(db[tabel][veld]) verwysings = [x[veld] for x in lys] return verwysings in the model (ex. db.py): import tools.py def

[web2py] Implementing task queue using web2py

2012-02-10 Thread Saurabh S
I have an application on google app engine. I have used web2py framework to develop the application I have a module in which I need to fetch the records from 3 tables and the final set of records contain data from all the 3 tables. Here each of my tables contain more than 1000 records so when I

Re: [web2py] Re: Modules: how to access db

2012-02-10 Thread Johann Spies
On 9 February 2012 18:14, Bruno Rocha wrote: > I dont know exactly how it works, but I had problems serializing db in to > current, so Massimo said to always pass it explicitly to classes ad > functions, I remember that SQLITE worked, but not Postgres. Anthony's advice to me earlier in this thr

[web2py] Re: best way to fetch data from multiple tables?

2012-02-10 Thread Saurabh S
Omi, We tried the solution that you have mentioned using join provided by web2py, it works fine on local server. But when we run it in google appengine sandbox or deploy it using google app engine it gives the error "Too many tables in the query". Is there a solution to resolve this? Is there any

[web2py] Questions on the scheduler

2012-02-10 Thread blackthorne
- Is it possible to call scheduled_workers functions asynchronously? How? - How should I adapt the behavior of a scheduled_worker as changing its model and adding new functionality? Thank you

[web2py] Re: Issue 651: strange events behaviors for grid and smartgrid

2012-02-10 Thread Manuele Pesenti
I post here this discussion because I'm not yet subscribed to the developers list and this regards the documentation... Il 09/02/2012 18:55, Massimo Di Pierro ha scritto: this is a good point. The problem is how to fix it. sqlhtml does not take a ondelete (perhaps it should, and grid should pa

[web2py] Re: DAL speed - an idea

2012-02-10 Thread Simon Lukell
+1 Having this option would make it really simple to change between the full-blown DAL result set and a faster stripped down one (which could then be adapted with the processor to keep the rest of the code working.) > I've been thinking about something like this as well. Instead of a separate > se