[web2py] Re: upload e CASCADE delete

2015-04-17 Thread pang
El miércoles, 15 de enero de 2014, 15:39:07 (UTC+1), Anthony escribió: > > The cascading delete is handled by the database, so the web2py DAL is not > executing the delete from the db.allegato table and therefore doesn't have > the opportunity to run the _before_delete and _after_delete callbac

[web2py] Re: using pydal to connect to app in standalone mode

2015-04-17 Thread Ron Chatterjee
Found the issue: Its about having the folder location in windows way as oppose to linux/unix. If I use fwd slash, instead backwards. It works. Sorry. On Friday, April 17, 2015 at 10:33:11 PM UTC-4, Massimo Di Pierro wrote: > > This should be possible. This is the purpose of pydal. Perhaps the

[web2py] Re: Setup.py

2015-04-17 Thread Massimo Di Pierro
It is very well possible that it does not work. Somebody should adopt it. On Friday, 17 April 2015 15:05:37 UTC-5, AngeloC wrote: > > Hello List, > > I'm trying to understand how setup.py works. It seems to me that it > doesn't work. > > There is no web2py binary in system path or somewhere els

[web2py] Re: 'module' object has no attribute 'items'

2015-04-17 Thread Massimo Di Pierro
Yes. That is a patch gone bad. We are working on fixing it. On Friday, 17 April 2015 09:32:27 UTC-5, Dimid Duchovny wrote: > > Hello, > > I get this error right after cloning: > > git clone --recursive https://github.com/web2py/web2py.git > [snip] > cd web2py/ > python web2py.py > ERROR:root:New i

Re: [web2py] Re: WEB2PY Certificate ?

2015-04-17 Thread Ron Chatterjee
Would be nice to have a web framework course work but who will teach it or will pay to develop the course? But I just want to add, certification is not looked at very respectfully in the industry. I know I will get attached for this comment I am making. But lets say you try to get a job at googl

Re: [web2py] Re: Ractive example

2015-04-17 Thread Massimo Di Pierro
No. That simply decides wheher to display the login menu. On Thursday, 16 April 2015 13:41:03 UTC-5, Richard wrote: > > Hello Massimo, > > Are you really consider leaving authentication filtering of page elements > to ractive ({{#if (auth && auth.user)}} ...)? > > Richard > > On Wed, Apr 15, 201

[web2py] Re: Ractive example

2015-04-17 Thread Massimo Di Pierro
yes. On Wednesday, 15 April 2015 14:44:27 UTC-5, Richard wrote: > > If I understand to style and create a semantic ui form style I would have > to create new layout and form template? > > forms.bs3.html -> forms.semntaic-ui.html > > ? > > Richard > > Le mercredi 15 avril 2015 15:30:40 UTC-4, Rich

[web2py] Re: Issue with lookup foreign key / format statement in 2.10.3

2015-04-17 Thread Massimo Di Pierro
No tomorrow. On Wednesday, 15 April 2015 13:10:28 UTC-5, Dave S wrote: > > > > On Tuesday, April 14, 2015 at 2:29:48 PM UTC-7, Niphlod wrote: >> >> being a bug, we need to ship a new web2py. it got fixed already. we're >> waiting for Massimo to release a 2.10.4. >> > > Is that fix included in the

Re: [web2py] Application Arquitecture advices

2015-04-17 Thread Sébastien Loix
I am mixing both client and server side code according to my need. All the json data loaded into angular is made through *Restangular *calls to a controler 'api.py'. In that api controller I have several functions, all with the '@request.restful()' decorator. Inside each of them I import a modul

[web2py] How to read latin encoded characters correctly from MSSQL?

2015-04-17 Thread Carlos Costa
Whe I use pyodbc only, I can read and convert characters correctly. But always replace accentuated characters with '?'. I already tried the db_codec='cp1252' and db_codec='latin1' attribute in DAL. In fact, MSSQL uses its own collation: sql_latin1_general_cp1_ci_as as collation. But both latin1

[web2py] Stackless/threading Python

2015-04-17 Thread Abdul Hakeem
Hello, Can anyone suggest how to setup Web2Py using Stakckless Python ?. Best regards, Abdul Hakeem -- 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 re

Re: [web2py] Re: WEB2PY Certificate ?

2015-04-17 Thread KPlusPlus
Well , Since all of you liked the idea , how could we apply it in the real world ? Do we need to license/Certify the instructors so they can start running web2py course in their institutions ? or we have a better solution ? On Thursday, April 16, 2015 at 8:50:13 PM UTC+3, Ron Chatterjee wrote:

[web2py] SQLFORM, add field with button

2015-04-17 Thread KevC
Hi community. I want to know if you could help me. I started to use web2py, but I don't know some things. I want to create fields with a button on SQLFORM and HTML. For example, I have author table and book table, but a book can get several authors and I need to create differents "INPUT" on the F

[web2py] Re: Web2Py compute fields not working on update

2015-04-17 Thread Ian Ryder
Same problem here - all works fine but am using an after_update callback on a child record but the compute doesn't work when the parent record values are updated. On Tuesday, June 19, 2012 at 2:24:05 AM UTC+10, Brandon Reynolds wrote: > > I have this problem when i try to generate thumbnails.

[web2py] Creating dynamic feedback

2015-04-17 Thread Andrea Baric
I am trying to create an application that mirrors a multiple choice test with just one question per page. How do I check for the correct answer and generate instant visual feedback--right or wrong-- after a user has submitted his or her answer (via a radio button)? -- Resources: - http://web2p

[web2py] Re: How to write dynamic part of a select?

2015-04-17 Thread Sébastien Loix
One last thing, any idea if it is also possible to dynamically add "left=[.], orderby=" For now I can't as it (logically) tells me that 'append() takes no keyword arguments' thank you! On Wednesday, 15 April 2015 00:52:53 UTC+2, Limedrop wrote: > > You can do this by building a list o

[web2py] Add field with button on SQLFORM

2015-04-17 Thread KevC
Hi community! Good afternoon, my name is Kevin. I want to know if you could help me. I started to use web2py, but I don't know some things. I want to create fields with a button on SQLFORM and HTML. For example, I have author table and book table, but a book can get several authors and I need

[web2py] routes.py breaking login...

2015-04-17 Thread Tom Stratton
Hi - I wanted to change my default application and did some research. First I did the simple: ``` default_application='p' default_controller = "pkg" default_function = "packages" ``` And it seemed to work fine but I was not satisfied so I did this: ``` routers = dict( BASE = dict(default_appli

[web2py] Re: using pydal to connect to app in standalone mode

2015-04-17 Thread Massimo Di Pierro
This should be possible. This is the purpose of pydal. Perhaps the file truly corrupted or the folder is missing/incorrect? On Friday, 17 April 2015 17:47:42 UTC-5, Ron Chatterjee wrote: > > > from pydal import DAL, Field > > > db = > DAL('sqlite://storage.sqlite',folder='C:\web2py\applicati

[web2py] using pydal to connect to app in standalone mode

2015-04-17 Thread Ron Chatterjee
from pydal import DAL, Field db = DAL('sqlite://storage.sqlite',folder='C:\web2py\applications\my_app_name\databases',auto_import=True); in my application models/db.py I have my database definition. I can't connect through pydal. I get an error: return self.driver.Connection(dbpath, **

[web2py] Creating a webhook handler for IFTTT and using routes in the hack.

2015-04-17 Thread Jason (spot) Brower
I found this... https://github.com/captn3m0/ifttt-webhook Which is a work around to connect ifttt as a webhook to your webserver. However, I need to route for servername.com/xmlrpc.php to handle the "authentication" for the server and make the connection work. Then I can start throwing data at the

[web2py] Setup.py

2015-04-17 Thread Angelo Compagnucci
Hello List, I'm trying to understand how setup.py works. It seems to me that it doesn't work. There is no web2py binary in system path or somewhere else. It's a bug or feature? Thank you! Sincerely, Angelo -- Profile: http://it.linkedin.com/in/compagnucciangelo -- Resources: - http://web2p

Re: [web2py] Re: Does Lazy Tables setting only have relevance if migration = True?

2015-04-17 Thread Alex Glaros
sorry, didn't see your question above. can you please describe details of how to make the change? -- 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 r

[web2py] Re: A bug in _after_insert callback's document (book)? And more.

2015-04-17 Thread Anthony
> Well, in my case, the delay was caused by sending email, so it is >>> definitely not "milliseconds of each other". It takes some 2 or 3 seconds, >>> maybe even longer. And during this period, it is not that another user >>> would try to register with same username/email, it is somehow the sa

Re: [web2py] Re: Does Lazy Tables setting only have relevance if migration = True?

2015-04-17 Thread Anthony
On Friday, April 17, 2015 at 3:26:12 PM UTC-4, Alex Glaros wrote: > > if plugin code is not compatible with lazy tables, should should someone > report a bug or make fix request? > I don't know if the plugin is being maintained (it is not part of web2py). If not, you can simply make the change y

Re: [web2py] Re: Does Lazy Tables setting only have relevance if migration = True?

2015-04-17 Thread Anthony
On Thursday, April 16, 2015 at 5:30:35 PM UTC-4, Alex Glaros wrote: > > Anthony, > > editor already only defined in field, but error persists. > The error results from the plugin code -- have you fixed that? Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: Does Lazy Tables setting only have relevance if migration = True?

2015-04-17 Thread Alex Glaros
if plugin code is not compatible with lazy tables, should should someone report a bug or make fix request? Alex -- 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 Issue

[web2py] Re: A bug in _after_insert callback's document (book)? And more.

2015-04-17 Thread Ray (a.k.a. Iceberg)
On Friday, April 17, 2015 at 6:35:09 AM UTC-7, Anthony wrote: > > 2. Even without above snippet, in our context I would say a rare 500-response-but-it-would-be-gone-if-you-simply-retry is (arguably?) still better than, silently creating duplicated user accounts which clearly vio

Re: [web2py] Re: list:boolean

2015-04-17 Thread Richard Vézina
It mays also be possible that this display is only obtain with JS plugin apply on select multiple html node. Richard On Fri, Apr 17, 2015 at 11:08 AM, Anthony wrote: > In terms of the data model, that could be handled with a list:string or > list:reference field. Then you just need a custom wid

[web2py] Re: list:boolean

2015-04-17 Thread Anthony
In terms of the data model, that could be handled with a list:string or list:reference field. Then you just need a custom widget to present that as a set of checkboxes on the page. Actually, web2py includes a basic checkboxes widget, though it doesn't look like the screenshot you have shown. A

[web2py] list:boolean

2015-04-17 Thread 黄祥
hi, i've seen in opencart that they have some sort of imho looks like list:boolean in web2py (yet it's not exist, checked on book), so my question is it possible to have some kind of it using web2py? please see attached file that taken from opencart thanks and best regards, stifan -- Resour

Re: [web2py] 'module' object has no attribute 'items'

2015-04-17 Thread Dimid Duchovny
This error doesn't occur when downloading the stable source from http://www.web2py.com/examples/static/web2py_src.zip 2015-04-17 17:32 GMT+03:00 Dimid Duchovny : > Hello, > > I get this error right after cloning: > > git clone --recursive https://github.com/web2py/web2py.git > [snip] > cd web2py/

[web2py] 'module' object has no attribute 'items'

2015-04-17 Thread Dimid Duchovny
Hello, I get this error right after cloning: git clone --recursive https://github.com/web2py/web2py.git [snip] cd web2py/ python web2py.py ERROR:root:New installation error: unable to create welcome.w2p file web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2015 Version 2.10.3-sta

[web2py] Re: validate hidden field

2015-04-17 Thread Anthony
> In 2012 I had an issue related to validation, the following solution was > given: > > including nodeID as a hidden field (if you're willing to have nodeID > "published" on the source page, the normal user wouldn't see this) form = > SQLFORM(db.tie, hidden=dict(nodeID=6)) sends a hidden field

[web2py] Re: validate hidden field

2015-04-17 Thread Annet
Hi, Thank you both for your reply. @Anthony In 2012 I had an issue related to validation, the following solution was given: including nodeID as a hidden field (if you're willing to have nodeID "published" on the source page, the normal user wouldn't see this) form = SQLFORM(db.tie, hidden=di

Re: [web2py] Cant install via git repo

2015-04-17 Thread Richard Vézina
Hard to say without knowing which git repo you clone and how do you clone it... Richard On Thu, Apr 16, 2015 at 8:34 PM, Joe Magaro wrote: > Hi, on my web2py install I tried to install some applications via a git > repo. I have tried several but keep receiving the error below. > > Any idea what

Re: [web2py] Two SQLFORMs side by side?

2015-04-17 Thread Richard Vézina
'reference tablename' = 1 to many 'list:reference tablename' = "many to many" it denormalised that why I put it between double quotes Richard On Thu, Apr 16, 2015 at 5:13 PM, LoveWeb2py wrote: > Richard, > > I did want to have a foreign key for info_about_field1. I guess I could do > a referenc

[web2py] Re: A bug in _after_insert callback's document (book)? And more.

2015-04-17 Thread Anthony
> Thanks for your hint, Anthony. I did not realize that I can set that > "unique" attribute after db.define_tables(). Will definitely try to do that > in my projects. > On second thought, I don't think that will trigger a migration in the database, so you will probably have to do that manuall

[web2py] Re: A bug in _after_insert callback's document (book)? And more.

2015-04-17 Thread Anthony
> > 2. Even without above snippet, in our context I would say a rare >>> 500-response-but-it-would-be-gone-if-you-simply-retry is (arguably?) still >>> better than, silently creating duplicated user accounts which clearly >>> violates the universal expectation of such a fundamental db scheme >

[web2py] Re: Web2py: Using images in HTML data

2015-04-17 Thread Joe Magaro
Thanks Annet: I am aware of web2py URL helpers. I use them inside of my views. However in this case, they wont work for me as the data is stored in a table and output to a web page, I require another method. On Friday, April 17, 2015 at 3:01:17 AM UTC-4, Annet wrote: > > Hi Joe, > > In the book

[web2py] Re: validate hidden field

2015-04-17 Thread Leonel Câmara
Along with Anthony's answer. Your code seems seriously WTF, why do you have a default='' for a notnul=True field? Why do you want to validate a field that is not writable? Anyway you can use onvalidation to do your custom checks if you really want to validate it. -- Resources: - http://we

[web2py] validate hidden field

2015-04-17 Thread Anthony
As mentioned in the book, hidden fields are just meant to be submitted with the form - the are not moved into form.vars nor validated. You can access them via request.cars. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sou

[web2py] Re: Need help with web2pyslices plugin administration

2015-04-17 Thread Mirek Zvolský
Thank you in advance. I think we need good central place for plugins and this one is already integrated with admin app. But it must work a little.. My entries from yesterday have subject: Testing In admin, install plugins, is still visible just the upload from previous month, the two uploads

[web2py] validate hidden field

2015-04-17 Thread Annet
I have the following table and validator definitions: db.define_table('cal_opening_hours', Field('nodeID', 'reference nd_node', **isnode), migrate = False) isnode = dict(default='', requires=[IS_IN_DB(db, 'nd_node.id', '%(id)s', zero='Selecteer een node',

[web2py] Re: Web2py: Using images in HTML data

2015-04-17 Thread Annet
Hi Joe, In the book is an example of how to embed an image using helpers: A(IMG(_src=URL('static','logo.png'), _alt="My Logo"), _href=URL('default','index')) In one of my apps I upload images to a separate app and within that app to separate folders, to embed these images I use: where UP