[web2py] Strange 'SQLTABLE linkto' behaviour

2014-02-20 Thread mcamel
Hi, I've seen an unexpected 'SQLTABLE linkto' behaviour (both at 2.8.2 and trunk version): In a controller: def sqltablelinkto(): db = DAL('sqlite:memory:') db.define_table('parent',Field('name')) db.parent.insert(name='Parent1') db.parent.insert(name='Parent2') l

[web2py] Re: web2py API document, and method return values

2014-02-20 Thread Kiran Subbaraman
Massimo, Thanks for the reply. I should have mentioned that am using the update_record as an example. Basically, I want to figure out the return values for methods that deal with the CRUD operations on the database (via the DAL), and how to interpret if an operation succeeded or not. listing it

[web2py] Re: web2py API document, and method return values

2014-02-20 Thread Leonel Câmara
Why are you trying to do C style error checking? Python has exceptions. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because

[web2py] Re: DAL Join

2014-02-20 Thread Anthony
Looks like your query simply isn't returning any results. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you

[web2py] Admin problem with CSS files

2014-02-20 Thread Gael Princivalle
https://lh6.googleusercontent.com/-qAgATEO_fwo/UwXsYPMIzqI/BUw/Rf4C5lRJC5w/s1600/css.jpg Hello all. In the admin interface for a specific application web2py display only the first CSS file in the alphabetic order of the CSS folder. For another application in the same web2py

[web2py] Re: Admin problem with CSS files

2014-02-20 Thread Leonel Câmara
My guess is that you have more than 1000 static files for this app and the admin is not respecting the 0-1-∞ rule. Try editing the admin application default.py and increase MAXNFILES to 9 and see if it solves the problem. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: How can I restrict an input field to latin alphabet characters only?

2014-02-20 Thread Leonel Câmara
I'm guessing you can use IS_MATCH. Another alternative, you could make a validator that would try and encode a unicode version of the text you're validating to iso-8859-15 or something and see if you don't get any exceptions. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Admin problem with CSS files

2014-02-20 Thread Gael Princivalle
Thanks a lot, that's it ! Il giorno giovedì 20 febbraio 2014 14:35:15 UTC+1, Leonel Câmara ha scritto: My guess is that you have more than 1000 static files for this app and the admin is not respecting the 0-1-∞ rule. Try editing the admin application default.py and increase MAXNFILES to

Re: [web2py] Re: Angular.js And other js lib

2014-02-20 Thread Richard Vézina
I already like web3py... I found myself scratching my head more and more as I build complexe form, and the more I learn about Angular.js the more my problem seems fade away, though it seems to me that I will have to write more code than with web2py. Data binding is great, but it make field

[web2py] Re: creating a model of a table (with a large amount of data) in a mysql db. is taking a very long time

2014-02-20 Thread John Philip
Hi Derek and Anthony, I am not sure what else could cause this. You are right about the modeling. I did change the fields correctly and even recreated the exact table on a localhost mysql db and it worked!! However when I make the connection to the remote database Web2py just hangs. Also what's

[web2py] SQLFORM.grid and custom edit form

2014-02-20 Thread Luca Guerrieri
Dear all, after some new things i have understood on web2py I'm not able to find this solution : I've a sqlform.grid which becomes from a 2 tables query ... some customization code form = SQLFORM.grid(query=query, left = db.mylist.on(db.person.id == db.mylist.name ) , field_id =

[web2py] Change color of grid=SQLFORM.grid(db.abc, user_Signature=False)

2014-02-20 Thread Austin Taylor
I'm currently using a CSS template in my layout, but it changed my grid spreadsheet to an unreadable color. I've tried playing with the different css settings with no luck. Is there a way to just change the spreadsheet color? -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] Re: DAL Join

2014-02-20 Thread Urban Gatherer
Thank you, it turned out to be a problem in my loop. one query returned null. As you said On Thu, Feb 20, 2014 at 4:35 AM, Anthony abasta...@gmail.com wrote: Looks like your query simply isn't returning any results. Anthony -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Web2py instead of MS Access?

2014-02-20 Thread Derek
Well, I wouldn't say that any RDBMS is better, msaccess is good, and if they are coming from access, SQL Express is probably a better choice than MySQL or Postgres just because it's similar. On Wednesday, February 19, 2014 4:07:40 PM UTC-7, NeoToren wrote: The gotchas on MySQL are quite scary

[web2py] 'datetime.datetime' has no attribute 'datetime' in scheduler

2014-02-20 Thread Manuele Pesenti
Hi! trying to schedule a task with the scheduler in this way: scheduler.queue_task('test_networking', pvars=dict(body=oldbody), # do un minuto per riavviare l'interfaccia start_time = datetime.now() + timedelta(minutes=1), # periodo di test (default 10 min)

[web2py] Re: web2py secrets video part 2???

2014-02-20 Thread Carlos Zenteno
I can't even see the one you loved... samuel links to other videos. Very good ones of a class that Massimo gave last year... -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: web2py large model

2014-02-20 Thread Carlos Zenteno
Hi, welcome to Web2py. You do not need to post your question more than once. Somebody will answer your question. You have 2 answers in your previous one. If nobody answers is due to that nobody knows the answer, nobody understands your question -- Resources: - http://web2py.com -

[web2py] Re: web2py large model

2014-02-20 Thread Anthony
If the answers you received herehttps://groups.google.com/d/msg/web2py/Lva1wlY7EAo/uldboNdjtAgJand here https://groups.google.com/d/msg/web2py/3j6ayt18OPc/_UvgsVIF6B0J are not sufficient, please be more specific about your requirements, what you don't understand, what you have tried, what

[web2py] SQL Muli Select to Web2py format

2014-02-20 Thread Fcosqui
Hi ! I want to translate this query to Web2py format, but i have found nothing in Documentation SELECT COUNT(ip) from (SELECT ip FROM info GROUP BY ip) as b; i don't want to use executesql someone can help me? thnx -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

[web2py] Re: Running google visualization js in a LOAD component

2014-02-20 Thread Jordan Ladora
Thanks for your help!!! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups

[web2py] Re: Web2py instead of MS Access?

2014-02-20 Thread jimbo
Right, had a play with Anthony's suggestion and it is brilliant, just what I needed. A lot easier than I remember MS Access being. Two questions, rather than use 0.0.0.0 should I set a fixed IP and connect to that one, like 192.168.1.66 as 0.0.0.0 might be exposed externally? Also the photo

[web2py] Re: 'datetime.datetime' has no attribute 'datetime' in scheduler

2014-02-20 Thread Niphlod
that is an unfortunate misnaming in the datetime module the datetime module holds: - datetime - timedelta - tzinfo - time as submodules. web2py uses import datetime and then it uses datetime.datetime.now() while your code probably does from datetime import datetime and then uses

[web2py] Re: SQL Muli Select to Web2py format

2014-02-20 Thread Niphlod
web2py's DAL has no support for subselects, so unfortunately there's no current DAL-way to translate that query. BTW: your query doesn't make sense to me (I'm a professional dba in real life). You're just counting how many distinct values of ip are in the table why bother with a subselect

Re: [web2py] Re: Can I use win32com.client under Web2Py?

2014-02-20 Thread António Ramos
I use it a lot to connect to an OS400 db2 database. Also with a windows machine. just use it in your controller and you are ok. 2014-02-20 0:42 GMT+00:00 Ben Lawrence benlawr...@gmail.com: Do you have a product that integrates quickbooks to web2py as in a CRM? I would be interested in

[web2py] Re: Conditional deletes (ondelete etc) in sqlform.grid

2014-02-20 Thread ksotiris
deletable = False if 'edit' in request.args: record = db[table](request.args[-1]) if some condition of record: deletable = True grid = SQLFORM.grid(db[table], deletable = deletable) Plus to above Idea: We have smartgrid with orders link table products_in_order and we want not

[web2py] Re: Conditional deletes (ondelete etc) in sqlform.grid

2014-02-20 Thread Anthony
With your suggested changes, it looks like any time an ondelete is specified, the grid code would no longer actually do the delete. I don't think we want that. If your ondelete determines that no delete should take place, then it can do a redirect or raise HTTP() in order to abandon the

[web2py] Re: Web2py instead of MS Access?

2014-02-20 Thread Jim S
If you're really interested in hitting the ground running I'd highly recommend reading the entire book BEFORE getting started. I've read through it cover to cover twice now and am constantly using it as a reference. It will really open your eyes to how web2py works and what it can do for you

[web2py] Re: How can I restrict an input field to latin alphabet characters only?

2014-02-20 Thread User
I agree the IS_MATCH could work but what is the regex that you would use? On Thursday, February 20, 2014 9:06:23 AM UTC-5, Leonel Câmara wrote: I'm guessing you can use IS_MATCH. Another alternative, you could make a validator that would try and encode a unicode version of the text you're

Re: [web2py] Re: Free opensource Janrain alternative - Python Social auth

2014-02-20 Thread Quint
https://code.google.com/p/w2p-social-auth/ On Tuesday, February 18, 2014 7:19:15 AM UTC+1, Quint wrote: I'm working on a plugin. I expect to have an initial version somewhere this week.. Quint -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] how login_onaccept works ?

2014-02-20 Thread brushek
Hello web2py users and devs, I have simple question: does auth.settings.login_onaccept should fire only once after login, or it is normal that it is running in every click after login ? I have folowing code in default.py: def check_production(towar=1): if not session.auth: return

[web2py] Re: Web2py instead of MS Access?

2014-02-20 Thread jimbo
Point taken Jim thanks, I honestly have found learning by doing better. I have sorted out uploading docs now and I am going to compare what I have done with the book, which is v good but maybe a bit deep for me at the moment. At least I now know the power of web2py for the future. Thanks to

Re: [web2py] how login_onaccept works ?

2014-02-20 Thread Marin Pranjić
you are calling the function and assigning the return value use = lambda: check_production(1) or just = check_production, without (1) Marin (mobile) On Feb 21, 2014 12:56 AM, brushek luk...@chrustek.net wrote: Hello web2py users and devs, I have simple question: does

[web2py] Import error for guppy

2014-02-20 Thread David Phillips
My app uses web2py as a background task (as described in Ch. 4 of the web2py docs). I have a slow memory leak in the background task. I'm trying to run guppy periodically to find it but I am getting a error when I try to use it. The relevant part of my code looks like this: import guppy