[web2py] Re: Pass multiple arguments to URL through javascript

2011-12-03 Thread Vineet
@Anthony, thanks. Your method worked. Secondly, if I want to pass arguments by name, would it be okay to do something like this>> {{=URL(...)}} + '/' + 'p1=' + param1 + '/' + 'p2=' + param2 @Brian, I would be interested & grateful to you if you can send me a copy of jQuery.query (as mention

[web2py] Re: Pass multiple arguments to URL through javascript

2011-12-03 Thread Vineet
Brian, Yes. I would be interested & grateful to you if you can send me a copy (as mentioned by you). Thanks, Vineet On Dec 4, 3:53 am, Brian M wrote: > I've used a jQuery plugin called jQuery.query that can manipulate URLs.  If > memory serves correct you do something along the lines of > $.quer

[web2py] Re: Pass multiple arguments to URL through javascript

2011-12-03 Thread Vineet
Thanks Anthony. That worked. Secondly, if I want to pass arguments by name, would it be okay to do something like this>> {{=URL(...)}} + '/' + 'p1=' + param1 + '/' + 'p2=' + param2 ---Vineet On Dec 3, 9:37 pm, Anthony wrote: > >

[web2py] Re: web2py for dummies

2011-12-03 Thread Massimo Di Pierro
I hope sometime this week. It is basically done. Massimo On Dec 3, 9:00 pm, Andrea Bravi wrote: > First of all, thank all of you for your valuable (and quick!) answers. > > @Massimo DP: Just for curiosity, any expected date for the release of > the new editions? > > @Anthony: great suggestions!

[web2py] Re: myblog w2p

2011-12-03 Thread Massimo Di Pierro
:-) On Dec 3, 6:30 pm, Ovidio Marinho wrote: > I'm still not ashamed to have done in my own weblog web2py. But visit, it > hasinteresting topics in python and web2py. soon migrate to a promise in > web2py. > > https://ovidiomfalcao.wordpress.com/ > >        Ovidio Marinho Falcao Neto >          

[web2py] Re: date widget broken in trunk?

2011-12-03 Thread Massimo Di Pierro
I believe this is now fixed. Please check it. On Dec 3, 5:04 pm, Angelo Compagnucci wrote: > Yes, I can confirm there is a bug. > > With this model: > > db.define_table('testdb',Field('test','datetime', requires=IS_DATETIME())) > > I have this html using SQLFORM: > > [...] value="" /> [..] > >

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-03 Thread Constantine Vasil
I am using JQuery Mobile which is adding these hashes '#' after clicking on a link or Submit button. Cannot get rid of them no matter what. Also switched off ajax on the links.

[web2py] Re: Redirection does not sets the browser address bar

2011-12-03 Thread Constantine Vasil
Hi Massimo, I am using web2py+GAE+jQuery Mobile Regards, --Constantine

RE: [web2py] Re: Converting mongodb collection to row

2011-12-03 Thread Mark Breedveld
That was indeed a bit help full, but I think the parse() functions takes care of that. Do I'm not sure what that function is expecting, but more tomorrow. I'm from Europe, so a bit of a hour gab there. Regards Mark, -Oorspronkelijk bericht- Van: web2py@googlegroups.com [mailto:web2py@goog

RE: [web2py] Re: Converting mongodb collection to row

2011-12-03 Thread Mark Breedveld
It is even more straight forward then that. The result is a list of dict's. The parsing therefor is not needed. It is simply re-ordering the dict. But you put the question mark on the right spot. The collections are now equal to tables, but I not that familiar to python to know how it is done in a

[web2py] Re: connection with oracle database

2011-12-03 Thread Massimo Di Pierro
First check it is installed correctly. start python (not web2py) and try to import cx_Oracle if that works but it does not work in web2py then web2py is using a different Python version. Make sure you run web2py from source and not the binary, the binary has its own python. On Dec 3, 9:50 am, t

[web2py] Re: Redirection does not sets the browser address bar

2011-12-03 Thread Massimo Di Pierro
What browser are you using? What web2py version? On Nov 28, 11:47 pm, Constantine Vasil wrote: > I set a registration for in my front page and: > auth.settings.register_next = '/myapp/default/myinfo' > > After Registration the browser was redirected to myinfo screen > but at the browser address b

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-03 Thread Massimo Di Pierro
never seen this either. On Dec 3, 8:29 am, Alan Etkin wrote: > >The address bar shows /user/login#/user/login > > I am using 1.99.3 dev version and cannot reproduce this behavior > When i do login the resulting page shows the address without > parameters and hitting the back button shows the old

[web2py] Re: Expire date for Web2Py applications

2011-12-03 Thread Anthony
Maybe in a model file, something like: import datetime if request.now.date() > datetime.date(2011, 12, 20) and request.function != 'closed': redirect(URL('default', 'closed')) The 'closed' function in the default.py controller would display a message indicating the app is closed. Could also

[web2py] Re: web2py for dummies

2011-12-03 Thread Andrea Bravi
First of all, thank all of you for your valuable (and quick!) answers. @Massimo DP: Just for curiosity, any expected date for the release of the new editions? @Anthony: great suggestions! I spent all the day with http://www.w3schools.com/, http://www.webmonkey.com/tutorials/, and that was exactl

[web2py] Expire date for Web2Py applications

2011-12-03 Thread Shiv
Hi Team, Has any one tried to provide an expire date to the web2py application? I mean, if i set a date as 20-12-2011 then after that application should not open. -- Thanks & Regards Shiv

Re: [web2py] Re: myblog w2p

2011-12-03 Thread Ovidio Marinho
Thank you! soon there will web2py on the problem of translation is internationalized. Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br ITJP - itjp.net.br 83 8826 9088 - Oi

[web2py] Re: myblog w2p

2011-12-03 Thread Alan Etkin
Very nice page. It seems not to be translated to english, is it?. On Dec 3, 9:30 pm, Ovidio Marinho wrote: > I'm still not ashamed to have done in my own weblog web2py. But visit, it > hasinteresting topics in python and web2py. soon migrate to a promise in > web2py. > > https://ovidiomfalcao.wor

[web2py] myblog w2p

2011-12-03 Thread Ovidio Marinho
I'm still not ashamed to have done in my own weblog web2py. But visit, it hasinteresting topics in python and web2py. soon migrate to a promise in web2py. https://ovidiomfalcao.wordpress.com/ Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com

Re: [web2py] Submit gutton in fields

2011-12-03 Thread Nik Go
My own workaround for this issue is to to declare it as string and regexp ,Field('actual_date', 'string', length=10 # or -MM or -MM-DD ,requires=IS_EMPTY_OR(IS_MATCH('^(\d{4})$|^(\d{4})[- /.]((0[1-9])|(1[0-2]))$|^(\d{4})[- /.]((0[1-9])|(1[0-2]))[- /.]((0[1-9])|[12][

[web2py] Re: Converting mongodb collection to row

2011-12-03 Thread Alan Etkin
I see your point now, you meant a Rows instance (kind of a subset of a table) Would you post the exception (if any), when trying to read the query result? The point is that the select method has to instantiate properly a Rows object Have you read this web2py API section? http://web2py.com/example

Re: [web2py] date widget broken in trunk?

2011-12-03 Thread Angelo Compagnucci
Yes, I can confirm there is a bug. With this model: db.define_table('testdb',Field('test','datetime', requires=IS_DATETIME())) I have this html using SQLFORM: [...] [..] class should be datetime, not string! 2011/12/3 Carlos : > Hi, > > Is DATE widget broken in trunk?. > > Previously when I

[web2py] Re: Pass multiple arguments to URL through javascript

2011-12-03 Thread Brian M
I've used a jQuery plugin called jQuery.query that can manipulate URLs. If memory serves correct you do something along the lines of $.query.set('var', value) to set querystring values. And $.query.get('var') to retrieve. Sadly the jQuery team seems to have taken down the jQuery plugins site a

[web2py] Re: web2py for dummies

2011-12-03 Thread chawk
I started web building 2 years ago, i have a full time job in Automobile Insurance, and limited time at home to learn. Your question seems to indicate that you don't have any knowledge of HTML, CSS or Javascript/jQuery? forgive me if I am wrong, but if that is the case you definitely need to start

[web2py] Re: Converting mongodb collection to row

2011-12-03 Thread Alan Etkin
When you say that you try to convert a collection to a row, isn't there a conflict with database systems? I looking for the first time the mongodb database design, and i assume there is got to be some sort of mapping of objects: - A DAL Table is like a Collection - A DAL Row is (more or less) lik

[web2py] Re: SQLTABLE images for id fields

2011-12-03 Thread Anthony
On Saturday, December 3, 2011 4:52:43 PM UTC-5, Alan Etkin wrote: > > You are right, but this would send that output for all id fields as > long as there is not a new request (is that so?), and with the linkto > argument it would work just once. No, it would only apply to the particular id field

[web2py] Re: Using language files from another system folder

2011-12-03 Thread Alan Etkin
I found this: os.symlink(source, link_name) Just supported in Unix type systems, so i cannot use it On Dec 3, 6:21 pm, Alan Etkin wrote: > I know it is a unconvetional way of managing language files, but i am > working in a project wich has a desktop Python application and a > web2py application

[web2py] Re: SQLTABLE images for id fields

2011-12-03 Thread Alan Etkin
You are right, but this would send that output for all id fields as long as there is not a new request (is that so?), and with the linkto argument it would work just once. This last is the behavior i am looking for. I sent a modification request to Massimo so linkto can return a 2 element tuple opt

[web2py] Using language files from another system folder

2011-12-03 Thread Alan Etkin
I know it is a unconvetional way of managing language files, but i am working in a project wich has a desktop Python application and a web2py application and both of them will share translations. I do not like symbolic links for this case because i don't know if it there is a way of setting them f

[web2py] Re: Pass multiple arguments to URL through javascript

2011-12-03 Thread Anthony
On Saturday, December 3, 2011 3:48:06 PM UTC-5, lyn2py wrote: > > You can try: {{URL('static','action',args=[param1,param2])}} No, param1 and param2 are Javascript variables set on the client side, but the URL function is called on the server side before the page is delivered. So, param1 and pa

[web2py] Re: Pass multiple arguments to URL through javascript

2011-12-03 Thread lyn2py
You can try: {{URL('static','action',args=[param1,param2])}} On Dec 4, 12:10 am, Vineet wrote: > I referred to the below-mentioned thread (but could not reply to it). > > https://groups.google.com/group/web2py/browse_thread/thread/61d57e887... > > My question is --- > If I have two javascript v

[web2py] Re: mongodb and web2py

2011-12-03 Thread lyn2py
mongodb gets a lot of attention, has a fairly large userbase and even dedicated database hosting for scalability. They do a lot of marketing to expand their userbase from Rails to Django to PHP users are using it! I think it is fair that they want to work on the mongodb adapter. It will help expan

[web2py] Re: web2py for dummies

2011-12-03 Thread lyn2py
On Dec 4, 12:10 am, Javier Quarite wrote: > On Sat, Dec 3, 2011 at 10:32 AM, Anthony wrote: > > I've read that there's going to be a book something like "web2py recipes" > >> but I'm not sure where I've seen it > >> As far as I remember it could be a PACKT release > > >http://www.packtpub.com/w

[web2py] date widget broken in trunk?

2011-12-03 Thread Carlos
Hi, Is DATE widget broken in trunk?. Previously when I had a 'date' type field (with no widget), it was automatically assigned the 'date' class with a date picker. Now, even if I explicitly assign a DATE widget (SQLFORM.widgets.date.widget), it generates an input with 'string' class and no da

[web2py] Re: web2py hosting

2011-12-03 Thread DenesL
More hosting comments: about Alwaysdata, I'm on this host for years, here are more missing informations : Hosting company: alwaysdata.com Type of service: free/paid shared hosting, custom managed dedicated hosting web2py version: Python version: 2.4 2.5 2.6 3.1 (easily switchable on the admin are

[web2py] Re: Pass multiple arguments to URL through javascript

2011-12-03 Thread Anthony
> >

Re: [web2py] Re: web2py for dummies

2011-12-03 Thread Anthony
> > Oh well, I thought it could contain basic to expert example (or sort... :) > ) > I think there will be some stuff useful to beginners -- it's just not a general introduction to web programming. > > PD: Thanks for the link, do you know when its going to be released? > According to the

[web2py] Pass multiple arguments to URL through javascript

2011-12-03 Thread Vineet
I referred to the below-mentioned thread (but could not reply to it). https://groups.google.com/group/web2py/browse_thread/thread/61d57e887e42aee8/c3dd5cd43b9d5527?lnk=gst&q=URL+javascript+variable My question is --- If I have two javascript variables, which are to be passed to a controller throu

Re: [web2py] Re: web2py for dummies

2011-12-03 Thread Javier Quarite
On Sat, Dec 3, 2011 at 10:32 AM, Anthony wrote: > I've read that there's going to be a book something like "web2py recipes" >> but I'm not sure where I've seen it >> As far as I remember it could be a PACKT release >> > > > http://www.packtpub.com/web2py-application-development-recipes-to-master-

Re: [web2py] Re: connection with oracle database

2011-12-03 Thread tOlorun
I did try to import the cx_Oracle module but web2py throws an error then i realized that web2py is not seeing the oracle driver installed already so now ... How do i make web2py see and use the oracle driver which is already installed Thanks in advance On 12/2/11, Lazarof wrote: > If you a

[web2py] Re: web2py for dummies

2011-12-03 Thread Anthony
You might find these resources helpful: http://www.w3schools.com/, http://www.webmonkey.com/tutorials/. Chapter 4 of the book is in more of a reference style than most of the rest of the book, so you might find things starting to click a bit more as you proceed through the later chapters. Start

RE: [web2py] Re: Converting mongodb collection to row

2011-12-03 Thread Mark Breedveld
I'm currently modifing the DAL.py file to get DAL working with mongoDB. I got the insert part working, but the of the select method. So __select is working, but select() ain't. Because I need to convert a pymongo collection to a row. The line I point to has been written by Massimo, but isn't workin

Re: [web2py] Re: web2py for dummies

2011-12-03 Thread Anthony
> > I've read that there's going to be a book something like "web2py recipes" > but I'm not sure where I've seen it > As far as I remember it could be a PACKT release > http://www.packtpub.com/web2py-application-development-recipes-to-master-python-web-framework-cookbook/book Though I don't thi

Re: [web2py] Re: web2py for dummies

2011-12-03 Thread Javier Quarite
It seems to me that the material is targeting an audience > >> that already knows how to create web applications, and that only needs > to > >> learn a new "vocabulary". Now, is there some book/slides/course/anything > >> that you would suggest me to start with? I could buy a book like Python > 3

[web2py] Re: Registration Using Auth

2011-12-03 Thread Anthony
On Saturday, December 3, 2011 8:58:54 AM UTC-5, lyn2py wrote: > > Thanks for pointing that out Martin. That's not very good for auth! > > Massimo, have you considered an attribute to assign a group when a > user registers using a auth.register form, e.g. > >> form=auth.register(membership=...) > >>

[web2py] Re: Converting mongodb collection to row

2011-12-03 Thread Alan Etkin
Mark, i don't understand your post. Did you modify web2py code? Could you provide a little background on the interface you are working on? Thank you On Nov 30, 10:50 am, Mark Breedveld wrote: > I have got the select function of mongodb adapter working, but know I > need to convert a pymongo curso

[web2py] Re: Redirection does not sets the browser address bar

2011-12-03 Thread Alan Etkin
Have you modified/created routes.py for this app or an all application routes.py? Isn't there another software apart from web2py handling url text sent to the client? On Nov 29, 2:47 am, Constantine Vasil wrote: > I set a registration for in my front page and: > auth.settings.register_next = '/my

Re: [web2py] mongodb and web2py

2011-12-03 Thread Vasile Ermicioi
my advice is to pay attention to another document and graph database: orientdb http://code.google.com/p/orient/ like mongodb it is a document database, which means it can store json like objects and because it supports some sort of sql it should be much easier to write an adapter

[web2py] Re: uwsgi decorators and web2py

2011-12-03 Thread Alan Etkin
Wouldn't it better to set a cron web2py task for sending email with a sending pool? Cron examples are exposed in the web2py book (section 4.18): Maybe the action is stuck in a controller process till it is finished and then it responds to the client. On Dec 1, 8:07 am, Francisco Costa wrote: >

[web2py] Re: Set/change modules folder location for an app

2011-12-03 Thread Alan Etkin
Perfect. I thought there was need for that extra file. Thanks On Dec 2, 6:50 pm, Massimo Di Pierro wrote: > You can do it in routes.py > > import sys > sys.path.append(...) > > that file is executed only once. > > On Dec 2, 5:47 am, Alan Etkin wrote: > > > Suppose now that i dont feel like chan

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-03 Thread Alan Etkin
>The address bar shows /user/login#/user/login I am using 1.99.3 dev version and cannot reproduce this behavior When i do login the resulting page shows the address without parameters and hitting the back button shows the old address. Have you customized the scaffolding app? Could you post releva

Re: [web2py] Re: Ulipad with web2py plugin

2011-12-03 Thread António Ramos
More info i wrote the author and here is the reply On Thu, Sep 29, 2011 at 8:55 PM, Antonio Ramos wrote: > i´m trying to follow this tutorial > http://www.haokanbu.com/story/32803/ > > and in the end the web2py shell in ulipad does not work > i write dir() and i get only > ['UliPad', '__builtins

[web2py] Re: How to make a simple upload form with just one field - a file name?

2011-12-03 Thread Alan Etkin
If you still need to store data as csv i would use the "text" field type to store the text after uploading. The Python Standard Library has csv support http://docs.python.org/library/csv.html On Dec 3, 10:59 am, Alan Etkin wrote: > Use blob field to store the data in db > > It is covered in deta

Re: [web2py] Re: Ulipad with web2py plugin

2011-12-03 Thread Ovidio Marinho
I find nothing about de Plugin documentation. Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br ITJP - itjp.net.br 83 8826 9088 - Oi 83 9334 0266 - Claro

[web2py] Re: How to make a simple upload form with just one field - a file name?

2011-12-03 Thread Alan Etkin
Use blob field to store the data in db It is covered in detail in the book: Section 11.4.5 On Dec 2, 5:11 pm, Constantine Vasil wrote: > How to make a simple upload form with just one field - a file name? > > In GAE there is not a file system so I want to store this CSV file > in a string to pro

[web2py] Re: Registration Using Auth

2011-12-03 Thread lyn2py
Thanks for pointing that out Martin. That's not very good for auth! Massimo, have you considered an attribute to assign a group when a user registers using a auth.register form, e.g. >> form=auth.register(membership=...) >> dict(form=form) Will create a form that will not be modified by the user d

[web2py] Re: Create a "New Simple Application" clarification

2011-12-03 Thread lyn2py
Thanks Kenneth and Massimo! On Dec 3, 3:13 pm, Massimo Di Pierro wrote: > when you install or upgrade web2py zip the welcome app into a > welcome.w2p and uses this file from that moment on. If you make > changes to the welcome app and you want to use them as scaffolding, > you must delete the wel

RE: [web2py] mongodb and web2py

2011-12-03 Thread Mark Breedveld
I have also been working on the select matter, so maybe it would be wise to cooperate? I can add you to my dropbox and we can work together? Regards Mark -Oorspronkelijk bericht- Van: web2py@googlegroups.com [mailto:web2py@googlegroups.com] Namens Paul Verzonden: zaterdag 3 december 2011 1

[web2py] Re: Speed of JOIN vs Recursive SELECTs

2011-12-03 Thread apple
If it is only slow the first time the page is loading then maybe it is a web page issue rather than a database issue. You can easily look at how long each component took to load. In Chrome this is in the javascript console (ctrl-shift-J) and "network" tab. In Firefox it is in Firebug under the "net

[web2py] mongodb and web2py

2011-12-03 Thread Paul
Hi All, Since I'm interested in python, web2py and recently mongodb and after seeing breedvel...@gmail.com post http://code.google.com/p/web2py/issues/detail?id=497 to get inserts on the MongoDBAdapter working I've been hacking the MongoDBAdapter code further to get select (and,or,eq,gt,lt,le,ge,

[web2py] Re: joins across databases

2011-12-03 Thread Jim Gregory
FWIW, this is what I ended up doing (for anyone's future reference): in controller: data = db(db.table1.field1=value).select(db.table1.field1, db.table1.field2) for (i, row) in enumerate(data): lookupvalue = row.table1.field2 data[i].field3 = db2.table2(field2=lookupvalue).field3 r

Re: [web2py] Re: Registration Using Auth

2011-12-03 Thread Martín Mulone
yes but be aware with this code anyone can register as an admin. 2011/12/2 Massimo Di Pierro > def register_in_group(): >group_id = request.args(0) >auth.settings.register_onaccept=lambda form: > auth.add_membership(group_id,form.vars.id) >form = auth.register() >return dict(form

Re: [web2py] R: Upload & Install packed application on FluxFlex - Error500

2011-12-03 Thread Martin Weissenboeck
I have tried to upload a very small application and I have got these error message too. I think nothing has changed since the last message (2011/9/2), the limit of 128K has not been chanched? I have read about how to add an application using github: https://github.com/nus/web2py-for-fluxflex/blob/

Re: [web2py] Re: web2py for dummies

2011-12-03 Thread Phyo Arkar
Python 3 web development will be a far shot. web2py wont be going python 3 for long. On 12/3/11, Massimo Di Pierro wrote: > You raise a good issue. We will start working on it as soon as the 4th > ed of the book is out. > > On Dec 3, 12:17 am, Andrea Bravi wrote: >> Hi everyone, >> >> first of a