[web2py] Nested LOAD() problem

2013-08-13 Thread Annet
I have a view site/index.html which includes the following code: {{=LOAD('landingpage','index.load',ajax=True)}} The view landingpage/index.load contains this code: {{=LOAD('landingpage','form.load',ajax=True)}} When I expose site/index a view called default/search.html is be

Re: [web2py] Re: How to define identical tables at once?

2013-08-13 Thread Marin Pranjić
Don't do that. It is wrong. Create only one new table and put everything there Marin (mobile) On Aug 14, 2013 7:08 AM, "Hunt" wrote: Did an absolutely atrocious job naming this question. A better title would be: "How to auto-generate an additional table for each auth_user table entry". On

[web2py] Re: How to define identical tables at once?

2013-08-13 Thread Hunt
Did an absolutely atrocious job naming this question. A better title would be: "How to auto-generate an additional table for each auth_user table entry". On Tuesday, August 13, 2013 5:54:03 PM UTC-4, Hunt wrote: > > Hi all, > > I want to add a 'friends' into a users profile in my web applicati

[web2py] Re: Do you use web2py professionally?

2013-08-13 Thread webpypy
Hi Arnon Marcus: Is it possible to write a small web2py example app using EJS TreeGrid? Regards, Ashraf Mansour -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an

Re: [web2py] particular IS_IN_DB need advice

2013-08-13 Thread Anthony
> I have table a that is referenced by table b, so there is a_id FK field in > table b. But now I want table c to reference table b but to discriminate > record I need the representation of a id in the dropbox of c form because b > table are meaning less with a id represent. > > It occurs that

[web2py] How to define identical tables at once?

2013-08-13 Thread Hunt
Hi all, I want to add a 'friends' into a users profile in my web application. My research and very limited knowledge point that the best way to go about this is to have a table separate from db.auth_user with each row containing a user_id for each friend that corresponds to the db.auth_user.id

[web2py] particular IS_IN_DB need advice

2013-08-13 Thread Richard
Hello, I have a situation were I need to use a referenced field from the referenced table... I have table a that is referenced by table b, so there is a_id FK field in table b. But now I want table c to reference table b but to discriminate record I need the representation of a id in the dropb

Re: [web2py] web2py on Google Drive

2013-08-13 Thread Luca
If you use sqlite, it should work, since the db is kept in a local file. Luca On Tuesday, August 13, 2013 12:11:37 PM UTC-7, Derek wrote: > > If you are going to manually sync up the databases, use the 'sql.log' to > make your work easier. > > On Tuesday, August 13, 2013 12:10:23 PM UTC-7, Derek

Re: [web2py] LDAP with username=True can still login with email

2013-08-13 Thread Richard Vézina
Massimo, If you are concern about possible backward compatibility issue that this change could raise... Maybe we could find a way to let the ldap_auth return validator error to form (to user)... I could live with that too... I just didn't find a easy way to make it works from ldap_auth (mean a lot

Re: [web2py] web2py on Google Drive

2013-08-13 Thread Derek
If you are going to manually sync up the databases, use the 'sql.log' to make your work easier. On Tuesday, August 13, 2013 12:10:23 PM UTC-7, Derek wrote: > > In this scenario, your database files keep track of the current state of > the database. So this won't really work unless you manually s

Re: [web2py] web2py on Google Drive

2013-08-13 Thread Derek
In this scenario, your database files keep track of the current state of the database. So this won't really work unless you manually sync up the databases. You may want to try fake_migrate to rebuild those table files. http://www.web2py.com/book/default/chapter/06#Fixing-broken-migrations On Tu

Re: [web2py] In IS_IN_SET how to set value that is seen when empty

2013-08-13 Thread Anthony
Yeah, IS_EMPTY_OR ignores the "zero" argument of IS_IN_SET and IS_IN_DB. Please submit a Google Code issueabout this so it can be corrected. Anthony On Tuesday, August 13, 2013 1:40:45 PM UTC-4, arche...@gmail.com wrote: > > This doesn't seem to w

Re: [web2py] Re: Do you use web2py professionally?

2013-08-13 Thread Jason (spot) Brower
I also like web2py because it's small enough I can contribute and big enough it makes a difference when I do. :) BR, Jason On Tue, Aug 13, 2013 at 8:47 PM, guruyaya wrote: > I've brought web2py with me, into 2 projects. One is a Scada platform (a > web interface for controlling devices, like a

[web2py] Re: Do you use web2py professionally?

2013-08-13 Thread guruyaya
I've brought web2py with me, into 2 projects. One is a Scada platform (a web interface for controlling devices, like air conditions). I pushed for it, because I was a long time fan, but my biggest selling point was the easy migrations (we needed to install and upgrade the system on many compute

Re: [web2py] In IS_IN_SET how to set value that is seen when empty

2013-08-13 Thread archeaneon
This doesn't seem to work in the case of IS_EMPTY_OR(IS_IN_SET(set), zero='empty')? On Tuesday, August 13, 2013 1:17:18 PM UTC-4, Marin Pranjić wrote: > > IS_IN_SET([...], zero='empty') > > On Tue, Aug 13, 2013 at 7:10 PM, > > wrote: > > I was wondering if it was possible to set the value tha

[web2py] Re: Performing database inserts with FORM( )

2013-08-13 Thread Evan Caldwell
Ross, I am currently trying to build a time clock app as well but I'm new to web2py (and fairly new to programming in general), I would love to be able to ask some questions. On Thursday, March 10, 2011 7:18:34 AM UTC-7, Ross Peoples wrote: > > Let's not forget about SQLFORM.factory either. This

Re: [web2py] Re: Request: Course about Web2py & TDD + pledge for cash

2013-08-13 Thread Luca
Dear Michael, last year's class web page is here, and all is accessible mostly by everybody. There may be videos that, as they include students and did not have all permissions, are accessible only from UCSC, but the rest should be wide open. This year will be similar, perhaps with more emph

Re: [web2py] web2py on Google Drive

2013-08-13 Thread Evan Caldwell
Johann, I didn't realize you had responded. I am using MySQL and getting the error : no such table: auth_user On Thursday, August 8, 2013 1:41:52 AM UTC-6, Johann Spies wrote: > > On 08/08/2013 01:10, Evan Caldwell wrote: > > I use Google Drive on all my machines to keep things synced up. I

Re: [web2py] In IS_IN_SET how to set value that is seen when empty

2013-08-13 Thread Marin Pranjić
IS_IN_SET([...], zero='empty') On Tue, Aug 13, 2013 at 7:10 PM, wrote: > I was wondering if it was possible to set the value that appears when the > form first appears as empty? As in instead of a blank space, it should read > "empty" > > -- > > --- > You received this message because you are su

[web2py] In IS_IN_SET how to set value that is seen when empty

2013-08-13 Thread archeaneon
I was wondering if it was possible to set the value that appears when the form first appears as empty? As in instead of a blank space, it should read "empty" -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group

Re: [web2py] Do you use web2py professionally?

2013-08-13 Thread Alfonso de la Guarda
Hi, Well, my company is using web2py in multiple scientific projects: from medicine, defense, mining through geography, in fact there are small projects in the sense that only works inside intranets but manages everything and simply moves to our costumers to a full web based solution. I don't hav

Re: [web2py] Re: Do you use web2py professionally?

2013-08-13 Thread Jim Steil
Not sure what you're asking here but I did not write an app to replace Excel, but apps to replace specific Excel spreadsheets that were developed to track business-related data that an off-the-shelf product couldn't handle or was overkill for our needs. On Mon, Aug 12, 2013 at 5:41 PM, Tim Michel

Re: [web2py] Re: Do you use web2py professionally?

2013-08-13 Thread Jason (spot) Brower
"web2py excels" your so punny! :-D On Tue, Aug 13, 2013 at 12:08 PM, Arnon Marcus wrote: > We at our company have been using web2py for almost 4 years now. > We use it as a basis for a wide-spectrum management system for our entire > business, as an intranet web-app. > We started by implementi

[web2py] Re: how to arrange a joined selection

2013-08-13 Thread Anthony
newrows = rows.sort(lambda row: row.id) See http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#find,-exclude,-sort . Anthony On Tuesday, August 13, 2013 12:21:33 PM UTC-4, sasogeek wrote: > > if i join 2 selections via rows = A | B for example, how do i make sure > th

[web2py] how to arrange a joined selection

2013-08-13 Thread sasogeek
if i join 2 selections via rows = A | B for example, how do i make sure that rows is arranged via the table id, like in .select(orderby=db.table.id) ? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and sto

[web2py] Re: What is the web2py team's future commitment to FastCGI ?

2013-08-13 Thread robertino01
Then it's going to be a rewrite in Python + Web2Py. :) :) :) And yes, I also use VPS and VM for development and personally. But I just cannot expect that from others. Thanks for the quick response. Robert On Tuesday, August 13, 2013 4:14:09 PM UTC+2, Massimo Di Pierro wrote: > > > > On Monday,

[web2py] Re: Accessing attributes of reference fields

2013-08-13 Thread Anthony
Yes, the reference fields execute a query each time when you access their attributes -- there is no caching. I think it might be a good idea to implement caching as an option. Even better, there should be an option to fetch the related records for all rows along with the initial select, either

[web2py] Re: File extention automatically changes when a file is uploaded

2013-08-13 Thread Anthony
On Tuesday, August 13, 2013 9:20:47 AM UTC-4, at wrote: > > Here is my controller code: > def test_upload: > if request.vars.file1 is not None: >result = db(db.mytable.id > ==24).update(file1=request.vars.file1.file) > request.vars.file1 is a cgi.FieldStorage object. The original file

Re: [web2py] LDAP with username=True can still login with email

2013-08-13 Thread Richard Vézina
No problem! As long as there is a solution in the next version I will be happy... Curious to know what is bugging you though, adding a new validator? Maybe the IS_MAIL() could be hack in order that it usage could be reversed, something like this : IS_MAIL(..., complement=True), then it will return

[web2py] Re: deployment to google app engine did not include my static files

2013-08-13 Thread Massimo Di Pierro
email it to me please or post a patch on github. On Monday, 12 August 2013 19:03:59 UTC-5, Luca wrote: > > Shall I post a working app.yaml (minus confidential details) that works > with threadsafe=True? > Let me know if this would help. > Luca > > On Sunday, August 4, 2013 12:12:16 PM UTC-7, dav

[web2py] Re: What is the web2py team's future commitment to FastCGI ?

2013-08-13 Thread Massimo Di Pierro
On Monday, 12 August 2013 17:30:34 UTC-5, rober...@gmail.com wrote: > > Until 2 days ago, I was undecided about which framework to use : web2py or > Django. > But the following linked topic in the Django Dvelopers Google Group was an > eyeopener, and made me cross Django off my list : > They ha

[web2py] Re: InterfaceError: connection already closed

2013-08-13 Thread Massimo Di Pierro
Do you know which web2py version? On Monday, 12 August 2013 09:49:32 UTC-5, hiro wrote: > > I have recently starting to get this error when accessing random pages and > the admin interface. > All I need to do to stop receiving the error is to wait for a while, and > then everything works for a w

Re: [web2py] LDAP with username=True can still login with email

2013-08-13 Thread Massimo Di Pierro
I need to review this. I understand the problem but I am not convinced by the solution. I will need one week. On Monday, 12 August 2013 08:46:31 UTC-5, Richard wrote: > > UP! > > > > On Fri, Aug 9, 2013 at 10:59 AM, Richard Vézina > > > wrote: > >> Here the patch!! >> >> I have not been able to

[web2py] Re: "404 not found" on registration

2013-08-13 Thread lesssugar
You're right! I probably copied the piece of code from something else I wrote. Thanks. On Tuesday, August 13, 2013 2:54:49 PM UTC+2, Anthony wrote: > > > def add_group_and_permissions(form): >> >> group_id = auth.id_group(role=request.args(0, cast=int)) >> > > If registration was working pr

[web2py] Re: File extention automatically changes when a file is uploaded

2013-08-13 Thread at
Here is my controller code: def test_upload: if request.vars.file1 is not None: result = db(db.mytable.id==24).update(file1=request.vars.file1.file) else: result = 0 return dict(result=result) status-5.png uploaded as applications/myapp/uploads/mytable.file1/85/mytable.

[web2py] Re: LOAD() not working

2013-08-13 Thread Anthony
If you set ajax=False and the component contains a form, you should then set ajax_trap=True -- that will submit the form via ajax back to the component's action (otherwise the form will be submitted to the action of the page that contains the component, and therefore it won't get processed). An

[web2py] Re: "404 not found" on registration

2013-08-13 Thread Anthony
> def add_group_and_permissions(form): > > group_id = auth.id_group(role=request.args(0, cast=int)) > If registration was working previously, you must have made at least one other change -- above, you attempt to cast request.args(0) to an int, even though it is a string ("seafarer" or "c

[web2py] Re: File extention automatically changes when a file is uploaded

2013-08-13 Thread Anthony
'txt' is the default extension given if the filename doesn't match the following regex: '\.(?P\w{1,5})$'. "picture.jpg" should match that regex, so something else is going on. Please show the full code used for the upload action as well as an actual filename that exhibits the problem. Anthony

[web2py] Re: File extention automatically changes when a file is uploaded

2013-08-13 Thread at
picture.jpg changes to picture.txt, infact to a long encoded name: mytable.file1.8cc66faf70ead672.746d70316a6c676677.txt Regards, Atif On Tuesday, 13 August 2013 17:25:28 UTC+5, LightDot wrote: > > Does .txt actually replace an existing extension, or does it show up > appended instead? What I

[web2py] Re: Rocket listener started when not ready

2013-08-13 Thread Niphlod
that's what the binary for windows is for... what ip address turns up when the dialog is shown ? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un

[web2py] Re: File extention automatically changes when a file is uploaded

2013-08-13 Thread LightDot
Does .txt actually replace an existing extension, or does it show up appended instead? What I mean is, does picture.jpg change into picture.txt or into picture.jpg.txt? Regards, Ales On Tuesday, August 13, 2013 12:10:40 PM UTC+2, at wrote: > > > > Hi, > > Please consider following model: > db.d

[web2py] Re: Rocket listener started when not ready

2013-08-13 Thread Willoughby
This is my normal install process for Windows machines: 1. Install Python - add to Windows path if your install doesn't automatically 2. Install PyODBC 3. Install Pywin32 (I need it, you may not) 4. Install web2py from *source* 5. Open a shell and type "python web2py.py" 6. If step 5 doesn't work,

Re: [web2py] File extention automatically changes when a file is uploaded

2013-08-13 Thread Marin Pranjić
How do you upload file? Can you show controller? Marin On Tue, Aug 13, 2013 at 12:10 PM, at wrote: > > > Hi, > > Please consider following model: > db.define_table('mytable', > Field('file1', type='upload', uploadseparate=True, > requires = > IS_EMPTY_OR(I

[web2py] Re: "404 not found" on registration

2013-08-13 Thread lesssugar
I'm not sure what to show, I mean, what would be useful as I don't know what's going on totally. Let's say I want to register as a seafarer registration function (default/register): def register(): response.view = 'default/join.html' auth.settings.formstyle = 'divs' if not requ

[web2py] "404 not found" on registration

2013-08-13 Thread Anthony
Can you show some code? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.

[web2py] "404 not found" on registration

2013-08-13 Thread lesssugar
I'm getting *404 not found* error when I submit my registration form. After submitting the registration form user should be redirected to his or her profile. That's it. 1. I haven't changed a thing in the registration function 2. Registration worked fine until now 3. All I did today was add an e

[web2py] File extention automatically changes when a file is uploaded

2013-08-13 Thread at
Hi, Please consider following model: db.define_table('mytable', Field('file1', type='upload', uploadseparate=True, requires = IS_EMPTY_OR(IS_UPLOAD_FILENAME(extension='pdf|jpg|png|gif|doc|docx|rtf|txt', error_message='Only PDF, Word Docs, RTF, Text

Re: [web2py] Re: Command line login

2013-08-13 Thread Martin Weissenboeck
Thank you, I have tried it - works fine! But it seems to me that this is a real login, not only a validation. Martin 2013/8/13 Luca > The correct way to do this would be something like: > > def ulogin(): > u = auth.login_bare(request.vars.user, request.vars.password) > if not u: >

[web2py] Re: LOAD() not working

2013-08-13 Thread lesssugar
Thanks, Joe, I'm getting some progress... When changed to ajax=False, the feedback form displays correctly on all the pages. However, with ajax set to False, the feedback is not being sent to my email. Plus, how do I check if ajax gets triggered? my feedback (suggestions) function: def suggesti

[web2py] Re: Do you use web2py professionally?

2013-08-13 Thread Arnon Marcus
We at our company have been using web2py for almost 4 years now. We use it as a basis for a wide-spectrum management system for our entire business, as an intranet web-app. We started by implementing a bidding process (generating budget-proposals, and such) as a substitution for monstrous spreads

[web2py] Accessing attributes of reference fields

2013-08-13 Thread Quint
Hello web2py users, I have a question about reference fields. When i access a attribute of a reference Field, i notice that the reference field is represented by an instance of the "Reference" class. When i access attributes on that reference , will it perform a new query each time or does it