[web2py] Re: IS_IN_DB validator

2011-04-24 Thread DenesL
Correct, sorry I misread your initial post. On Apr 24, 2:11 am, niknok wrote: > Found the answer: orderby is supported. > > IS_IN_DB(dbset, field, orderby='mytable.myfield', ...) > > On Apr 24, 8:31 am, niknok wrote: > > > > > > > > > Thanks. But I guess I did not explain myself properly. > >

[web2py] Some Advice for a Novice

2011-04-24 Thread JoshC
Dear Friends, My partner and I are working on a small store website for a databases class. I have found that there is a lot of information about Web2py on the site and in the book. What I hope to find out from you guys is some pointers to specific parts of the technology and parts of the book that

[web2py] This patch makes End_Of_Line LF on web2py at Windows

2011-04-24 Thread Keishi Ooshio
I use web2py-1.94.6 at WindowsXp sp3. I make application "foo" with "New simple application" on "http:// 127.0.0.1:8000/admin/default/site". I clicked "edit" under "foo" and "edit" under "Controllers". Doing nothing,I pushed save button.Then, End_Of_Line is changed from LF(\n) to CRLF(\r\n).

Re: [web2py] Some Advice for a Novice

2011-04-24 Thread Kenneth Lundström
Hi Josh, I´d say, read the book (www.web2py.com/book), there is a lot of things you don´t need, but as you don´t know exactly what you need it´s hard to tell read that chapter or that chapter. While reading I think you´ll get many thoughts on how to do things. At some point you´ll start withou

[web2py] Re: bpython shell

2011-04-24 Thread Arun K.Rajeevan
bpython is still evolving, and in their forums, I can see many such error reports like these https://bitbucket.org/bobf/bpython/issue/171/bpython-crashes-when-attempting-to-save https://groups.google.com/forum/#!topic/bpython/-3Gq_9ncVZ4 We can hope, as they evolve, these problems will be correc

Re: [web2py] Re: Customizing auth in some interesting ways:

2011-04-24 Thread Jason Brower
On 04/23/2011 10:47 PM, Anthony wrote: On Saturday, April 23, 2011 1:40:09 PM UTC-4, encompass wrote: I would like to make a drop down with the email and password option there... similar to the way that twitter does it. Is this easily possible? auth.login() generates the login form

Re: [web2py] Re: IS_IN_DB validator

2011-04-24 Thread Stifan Kristi
nice share nik, thank you. i think IS_IN_DB(db, db.table_name.id, '%(field_name)s') is work too. On Sun, Apr 24, 2011 at 1:11 PM, niknok wrote: > Found the answer: orderby is supported. > > IS_IN_DB(dbset, field, orderby='mytable.myfield', ...) > > On Apr 24, 8:31 am, niknok wrote: > > Thanks.

[web2py] Re: This patch makes End_Of_Line LF on web2py at Windows

2011-04-24 Thread Massimo Di Pierro
Hello Keishi, thanks for the patch. This has pros and cons. Let's discuss it on web2py-developers and feel free to join. Other windows users, what do you think? Massimo On Apr 24, 12:40 am, Keishi Ooshio wrote: > I use web2py-1.94.6 at WindowsXp sp3. > I make application "foo" with "New simple

[web2py] web2py version

2011-04-24 Thread 黄祥
hi, where can i get the information about web2py version feature? i mean the feature's comparation between each version. and 1 more things, is there any schedule upgrade version for web2py? i mean like fedora or ubuntu have schedule update every 6 months thanks

[web2py] Re: web2py version

2011-04-24 Thread Massimo Di Pierro
We have this: http://web2py.com/examples/default/changelog A new version is coming out soon but we need to iron out some issues with current trunk. Massimo On Apr 24, 8:31 am, 黄祥 wrote: > hi, > > where can i get the information about web2py version feature? i mean > the feature's comparation b

[web2py] Re: images not loading completely

2011-04-24 Thread Timothy Farrell
@VP, how long ago did you have this issue? @Phillip is there any chance I could git a copy of your program and data? Whenever I test Rocket, I test it by creating an oversized web2py app (typically > 100 MB) and exporting and reimporting it. I never release a version of Rocket that can't do this

[web2py] Re: about bpython

2011-04-24 Thread Jose
On 24 abr, 01:05, Massimo Di Pierro wrote: > Is this the latest trunk? > Yes, it is the latest version of trunk. Jose

Re: [web2py] Re: web2py version

2011-04-24 Thread Stifan Kristi
thank you so much for your info, massimo. hope there are a lot of improvement features and new features on the next version. great job, all, thank you very much. On Sun, Apr 24, 2011 at 8:51 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > We have this: > > http://web2py.com/examples/

Re: [web2py] Re: Customizing auth in some interesting ways:

2011-04-24 Thread pbreit
Perhaps because you have the login widget inside the "if logged in" clause?

[web2py] Re: images not loading completely

2011-04-24 Thread pbreit
I've been happier serving images from static. There was a post here recently that explained how. It's pretty easy.

Re: [web2py] Re: Customizing auth in some interesting ways:

2011-04-24 Thread Anthony
auth.register includes the following: if self.is_logged_in(): redirect(self.settings.logged_url) You've got a call to auth.register inside an 'if auth.is_logged_in()' condition, so once logged in, it will redirect to self.settings.logged_url, which defaults to /user/profil

[web2py] Re: images not loading completely

2011-04-24 Thread VP
Tim, It's last year. The problem was described here: http://groups.google.com/group/web2py/browse_thread/thread/f7714312d0841e5f/6fd9283a8dceb9c1?lnk=gst&q=VP+download#6fd9283a8dceb9c1 On Apr 24, 8:33 am, Timothy Farrell wrote: > @VP, how long ago did you have this issue? > > @Phillip is there

[web2py] Re: about bpython

2011-04-24 Thread pierreth
Hello, I am unable to reproduce the problem. bpython is importing well here. To make sure, in gluon/custom_import.py, do you have this at line 46: try: result = result or new_mod.__dict__[name] except KeyError: raise Import

[web2py] How do I insert data into 2 tables from the same form?

2011-04-24 Thread Pystar
I have 2 tables and I would like to insert data gotten from the user into the tables at the same time. How do I go about this? Can I use SQLFORM() on 2 tables to present the user with a single form and then if the form validates, insert the data into the tables? Or do I have to use custom forms/SQL

[web2py] Re: How do I insert data into 2 tables from the same form?

2011-04-24 Thread Anthony
Here's what the book recommends: http://web2py.com/book/default/chapter/07#One-form-for-multiple-tables On Sunday, April 24, 2011 4:33:19 PM UTC-4, Pystar wrote: > I have 2 tables and I would like to insert data gotten from the user > into the tables at the same time. How do I go about this? >

[web2py] Re: web2py version

2011-04-24 Thread Anthony
On Sunday, April 24, 2011 9:31:25 AM UTC-4, 黄祥 wrote: > > and 1 more things, is there any schedule upgrade version for web2py? i > mean like fedora or ubuntu have schedule update every 6 months There's no regular schedule. New releases tend to happen every 2-4 weeks.

[web2py] compile does not grab the latest module version

2011-04-24 Thread VP
this is an annoying thing because the consequence is subtle. I have a module, imported via import_module (reload=False). Things work as supposed if the app is not compiled. It's is compiled (via command line) then web2py uses an "older" version of the module (i don't know where web2py keeps the

[web2py] Re: about bpython

2011-04-24 Thread Jose
On 24 abr, 17:14, pierreth wrote: > Hello, > > I am unable to reproduce the problem. > > bpython is importing well here. > > To make sure, in gluon/custom_import.py, do you have this at line 46: > >                 try: >                     result = result or new_mod.__dict__[name] >          

[web2py] Re: using another unique column in IS_IN_DB

2011-04-24 Thread villas
country.iso2 is a 'list:reference' field, right? On Apr 24, 5:40 am, niknok wrote: > I have the following: >     db.profile.citizenship.requires=IS_IN_DB(gdb,'country.iso2', > '%(name)s',multiple=True,zero=None) > > It works fine until I try accessing the record from appadmin (I can view > the

[web2py] changing the view of a function

2011-04-24 Thread Resa Bee
Can anyone tell me how would redirect a controller function to show in view that is not its default view eg function"readjson" to show in "default/workpile.html" and not in the "default/readjson.html" view NB: there is a function called workpile.htm

[web2py] DAL compatibility with GAE design recommendations

2011-04-24 Thread Mike
I've just begun to explore web2py and the GAE. On the GAE site, there are several articles which discuss table design in the absence of joins. For example, at http://www.google.com/events/io/2009/sessions/BuildingScalableComplexApps.html, Brett Slatkin describes "relation index entities" and "me

[web2py] Re: This patch makes End_Of_Line LF on web2py at Windows

2011-04-24 Thread villas
If we wish to maintain consistent line-endings, it seems clear that we should use this patch. Having said that, this has not caused any problems for me in the past. On Apr 24, 2:30 pm, Massimo Di Pierro wrote: > Hello Keishi, thanks for the patch. > This has pros and cons. Let's discuss it on

[web2py] Re: using another unique column in IS_IN_DB

2011-04-24 Thread Philip
try 'db.country.iso2' rather than 'country.iso2' On Apr 24, 12:40 am, niknok wrote: > I have the following: >     db.profile.citizenship.requires=IS_IN_DB(gdb,'country.iso2', > '%(name)s',multiple=True,zero=None) > > It works fine until I try accessing the record from appadmin (I can view > the t

[web2py] Re: changing the view of a function

2011-04-24 Thread DenesL
Just set response.view to the desired one: response.view="default/workpile.html" On Apr 24, 11:02 am, Resa Bee wrote: > Can anyone tell me how would redirect a controller function to  show > in view that is not its default view > eg function"readjson" to show in "default/workpile.html" and n

Re: [web2py] DAL compatibility with GAE design recommendations

2011-04-24 Thread Vasile Ermicioi
http://web2py.com/book/default/chapter/11#Google-App-Engine

[web2py] Re: using another unique column in IS_IN_DB

2011-04-24 Thread niknok
Thanks Villas. I missed that, and it defaulted to 'string'. How do I use 'list:reference ' with another database? I tried: 'list:reference gdb.country' but that doesn't work. On Apr 25, 7:09 am, villas wrote: > country.iso2 is a  'list:reference' field,  right? > > On Apr 24, 5:40 am, niknok wr

[web2py] Re: Some Advice for a Novice

2011-04-24 Thread JoshC
good news! We have our model and are starting to work on the controllers. Thanks for the advice. db.define_table('users', #Field('id','string'), ID is implicit Field('first', 'string'), Field('last', 'string'), Field('address', 'string'), Field('email', 'string'), Field('pw

[web2py] Re: compile does not grab the latest module version

2011-04-24 Thread Massimo Di Pierro
Is this trunk? On Apr 24, 4:47 pm, VP wrote: > this is an annoying thing because the consequence is subtle. > > I have a module, imported via import_module (reload=False). > > Things work as supposed if the app is not compiled.  It's is compiled > (via command line) then web2py uses an "older" ve

[web2py] Re: This patch makes End_Of_Line LF on web2py at Windows

2011-04-24 Thread Massimo Di Pierro
The problem is that with the patch if you try open the files with a windows editor, the line-endings will not have the CR and may not be indented as expected. On Apr 24, 6:38 pm, villas wrote: > If we wish to maintain consistent line-endings,  it seems clear that > we should use this patch. > > H

[web2py] Re: using another unique column in IS_IN_DB

2011-04-24 Thread Massimo Di Pierro
You cannot. You must do list:integer On Apr 24, 7:09 pm, niknok wrote: > Thanks Villas. I missed that, and it defaulted to 'string'. > > How do I use 'list:reference ' with another database? I tried: > 'list:reference gdb.country' but that doesn't work. > > On Apr 25, 7:09 am, villas wrote: > >

[web2py] search plugin (plugin_wiki)

2011-04-24 Thread mart
Hi, a user brought up a good point (at least i never thought about it...duh! :( ). He was looking for something, but didn't know which table to find it in. Is there an easy way to tell the search plugin in plugin_wiki to check all tables (and to allow for multiple keywords that may be set in diff

[web2py] Re: This patch makes End_Of_Line LF on web2py at Windows

2011-04-24 Thread Anthony
On Sunday, April 24, 2011 8:22:52 PM UTC-4, Massimo Di Pierro wrote: > > The problem is that with the patch if you try open the files with a > windows editor, the line-endings will not have the CR and may not be > indented as expected. I think most Windows editors can handle text files that o

[web2py] using ajax to insert into database

2011-04-24 Thread Resa Bee
How can i insert data from a javascript into my web2py database .. i was trying using ajax but something was so wrong..(ajax(url..)(but i am not really sure how to use it... secondly i am using janrain.. and i want to grab the user info.. mainly first last and e-mail but i cant seem to grab it

[web2py] Re: compile does not grab the latest module version

2011-04-24 Thread VP
No, this is 1.94.6. On Apr 24, 7:20 pm, Massimo Di Pierro wrote: > Is this trunk? > > On Apr 24, 4:47 pm, VP wrote: > > > > > > > > > this is an annoying thing because the consequence is subtle. > > > I have a module, imported via import_module (reload=False). > > > Things work as supposed if th

[web2py] Re: This patch makes End_Of_Line LF on web2py at Windows

2011-04-24 Thread Massimo Di Pierro
Let's give this a day. Are there any windows users who strongly oppose this change? On Apr 24, 7:58 pm, Anthony wrote: > On Sunday, April 24, 2011 8:22:52 PM UTC-4, Massimo Di Pierro wrote: > > > The problem is that with the patch if you try open the files with a > > windows editor, the line-endi

[web2py] Re: using ajax to insert into database

2011-04-24 Thread Anthony
On Sunday, April 24, 2011 8:20:16 PM UTC-4, Resa Bee wrote: > > How can i insert data from a javascript into my web2py database .. i > was trying using ajax but something was so wrong..(ajax(url..)(but > i am not really sure how to use it... See http://web2py.com/book/default/chapter/10#

[web2py] Re: about bpython

2011-04-24 Thread pierreth
OK, What are the steps to reproduce the problem? On 24 avr, 19:06, Jose wrote: > On 24 abr, 17:14, pierreth wrote: > > > Hello, > > > I am unable to reproduce the problem. > > > bpython is importing well here. > > > To make sure, in gluon/custom_import.py, do you have this at line 46: > > >    

[web2py] crud challenge

2011-04-24 Thread DenesL
Using crud in a controller show a list of links using the title of the heading to display a list of the related subheading titles. Sort all by sequence. db.define_table( 'heading', Field('title'),Field('sequence','integer')) db.define_table( 'subheading', Field('title'),Field('sequence','integer'

[web2py] Re: images not loading completely

2011-04-24 Thread Timothy Farrell
VP, Thanks for the reply. The issue you were experiencing has already been addressed and should not show up anymore in web2py. The updating changes came around December 2010. Philip, I'd be happy to look at your code, please feel free to email me privately if you wish Thanks, Tim On Apr 24, 1

Re: [web2py] Re: web2py version

2011-04-24 Thread Stifan Kristi
a, i c, thank you so much for your info, anthony. On Mon, Apr 25, 2011 at 4:33 AM, Anthony wrote: > On Sunday, April 24, 2011 9:31:25 AM UTC-4, 黄祥 wrote: >> >> and 1 more things, is there any schedule upgrade version for web2py? i >> mean like fedora or ubuntu have schedule update every 6 months

Re: [web2py] Re: bpython shell

2011-04-24 Thread Bruno Rocha
I would like to see web2py runnning with dreampie http://dreampie.sourceforge.net/ The Python shell you've always dreamed about! -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ] On Sun, Apr 24, 2011 at 9:07 AM, Arun K.Rajeevan wrote: > bpython is still evolving, and in their forums, I ca

[web2py] Re: how to parse rawsql results?

2011-04-24 Thread cyber
I used to use construction like this: rows_count=db(db.autos.out=='T').count(), but my real query consists of many conditions. So I decided to use executesql. By the way, I wrote the code: rows_count = db.executesql("SELECT count(1) FROM autos WHERE autos.out='T' and autos.out='F' and autos.idk

[web2py] Re: images not loading completely

2011-04-24 Thread Philip
Thanks Tim, I emailed you my project. I captured the traffic while attempting to load an image, and the HTTP response had the correct Content-Length (519074), but the server started sending FIN after just 152501 bytes. -Philip On Apr 24, 9:04 pm, Timothy Farrell wrote: > VP, > > Thanks for the

[web2py] Re: images not loading completely

2011-04-24 Thread pbreit
To serve images statically: Field('image', 'upload', uploadfolder=request.folder+'static/uploads')

Re: [web2py] FORM Generation Code.

2011-04-24 Thread Ab...
If there's a workaround other than modifying the core file, I'd like to know as I'm also facing the same issue.

[web2py] Re: extra element in form toggles automatically

2011-04-24 Thread Rohan
Any updates? as a workaround I am using response.js and setting the correct value of checkbox from js.