[web2py] scheduler task is queued but not running

2014-01-08 Thread peter
I have a scheduler task marked as queued. I have an active working with living heartbeats. They both have the same group name, the time for the task to run is in the past. The task is not being executed. Does anyone have any idea what might cause the problem. Web2py version 2.8.2 Thanks Peter -

[web2py] Re: GAE: defaults on "_tableobj"

2014-01-08 Thread Quint
Here is a patch. On Tuesday, January 7, 2014 9:03:48 AM UTC+1, Massimo Di Pierro wrote: > > Thank you. I will take care of this asap. Can you submit a patch? > > On Friday, 3 January 2014 04:10:11 UTC-6, Quint wrote: >> >> I created an issue for this: >> >> https://code.google.com/p/web2py/issues

[web2py] GAE: insert using "key_name"

2014-01-08 Thread Quint
Hi, In GAE it's possibe to supply a "key_name" when you insert an entity. This is a string that you can then use as an id to efficiently fetch an entity from db. ( https://developers.google.com/appengine/docs/python/datastore/entities#Python_Kinds_and_identifiers ) I would like to be able to do

[web2py] Re: GAE: insert using "key_name"

2014-01-08 Thread Alan Etkin
> I would like to be able to do this using web2py. I could also choose to > use the GAE API directly to do this but then a could not make use thing > like calculated Fields etc in my web2py tables. > One issue about forcing key names is that there's no guarantee that the new key will provide

[web2py] Nested References in Smart Grid

2014-01-08 Thread MVolpes
Hi I have been using this framework for the last few days and I am in awe a fantastic framework. I have come from a strong .net and php framework back ground and wanted to learn python this has already taught me so much!! I have a question that hopefully can be answered easily and maybe I am

[web2py] Re: Microsoft SQL Server Migrate Trying to Create New Table instead of Editing Old One

2014-01-08 Thread PN
For future reference, verifying that this can be fixed using the fake_migrate feature ( http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Fixing-broken-migrations ) Summary of steps: 1. Set your model in define_table to the old model that matches existing database 2. S

[web2py] Re: Important New Year News: Edison Award

2014-01-08 Thread Mark Wachira
Good luck Massimo, excellent framework On Saturday, January 4, 2014 7:08:38 AM UTC+3, Massimo Di Pierro wrote: > > Web2py/me have been nominated for the Edison Award. Please wish web2py > (and me) good luck. :-) > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - h

Re: [web2py] Re: intercept closing session

2014-01-08 Thread Anthony
On Wednesday, January 8, 2014 1:48:28 AM UTC-5, Giuseppe D'Amico wrote: > > I have to connect to a database known only at runtime, I create the > model on the fly, > Do you have to create the database or a database table on the fly (or something else)? > but it is not thread safe, > Why is

Re: [web2py] Re: Why web2py and AnguljarJS?

2014-01-08 Thread Richard Vézina
There is also : AngularStrap (Angular + Bootstrap) :) Richard On Tue, Jan 7, 2014 at 8:26 PM, Derek wrote: > Yea, there are a lot of similarities, I decided myself just to skip web2py > and do most of the work in a client side template, where the webserver only > serves static files and json,

[web2py] Re: GAE: insert using "key_name"

2014-01-08 Thread Quint
Yes, Your post reminds me, I forgot something. I thought that when a key_name is used, it could simply return that as an id. But if you say that DAL requires that it returns an integer id, than yes, that would break it. When you use a key_name, the records do not have an numeric id. But does tha

[web2py] Re: Rows.compact and other Rows methods

2014-01-08 Thread Anthony
Let's discuss on the developers list . On Tuesday, January 7, 2014 9:52:16 PM UTC-5, Joe Barnhart wrote: > > Maybe the best answer is to change Row so that it always holds the full > set of keys (table:field) and

[web2py] Re: GAE: defaults on "_tableobj"

2014-01-08 Thread Alan Etkin
> (For instance when I want to supply a "key_name" when I put() an entity so I can have better performance to get() that entity from db. > Or when I want to use put_multi()) put_multi is supported by DAL trough the bulk_insert method. How better is performance when using named keys? Do you have

[web2py] Re: GAE: insert using "key_name"

2014-01-08 Thread Alan Etkin
> But does that mean you should not allow it to be inserted that way? > Nothing restricts users from operating (using web2py api) on rows inserted with GAE api There's no restriction on the use of the datastore, since it is not a service reserved for web2py apps, although I belive storing re

[web2py] Re: scheduler task is queued but not running

2014-01-08 Thread peter
I tried 'python scheduler.py -h' to get more information. it blew up with an error no module named simplejson. I have python2.6 after googling, I changed (in gluon/scheduler.py) try: from gluon.contrib.simplejson import loads, dumps except: from simplejson import loads, dumps around lin

[web2py] Re: Rows.compact and other Rows methods

2014-01-08 Thread Anthony
This is an interesting idea. Instead of bothering with the "compact" attribute, we could make it so any Row object automatically works like a "compact" Row whenever it includes only one top-level key. So, if you have: you could do either row.person.first_name or row.first_name, regardless of

[web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
I'm trying to use jQuery-File-Uploadto implement multiple file uploads. I'm using this tutorial as well as this sample app HERE

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Calvin Morrison
I just wrote my own way to do it yesterday which worked great. I would love it to go upstream. It's just a standard file upload with the multiple attribute. here's the entire thing: it spits out a form. my db looks like this: db.define_table('uploads', Field('username', 'string'), Fiel

[web2py] Re: Why web2py and AnguljarJS?

2014-01-08 Thread Ruud Schroen
So.. angularjs should be used when i want to create a website with lots of javascript/AJAX? On Sunday, January 5, 2014 11:06:43 PM UTC+1, Ruud Schroen wrote: > > I see more and more about using angularjs with web2py. > > But why? What would be an example of a benefit from using those two. > Cause

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
Calvin, you are awesome. I will try this on my end and report back. On Wednesday, January 8, 2014 7:18:28 AM UTC-8, Calvin Morrison wrote: > > I just wrote my own way to do it yesterday which worked great. I would > love it to go upstream. > > It's just a standard file upload with the multi

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Calvin Morrison
:-) I was having a hell of a time trying to get all the AJAX examples to work and well, none of it f***ing would. Yesterday I brewed an extra strong pot of coffee and cranked this out. Some of the code i would like review on, I am not sure how to properly check for if there was an uploaded file or

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
Also, should it be possible to adapt this so that I could use SQLFORM.factory instead of FORM? I notice this uploads the files to the db. What would need to change so that I'm just pulling it to the local disk? On Wednesday, January 8, 2014 7:18:28 AM UTC-8, Calvin Morrison wrote: > > I

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Calvin Morrison
instead of inserting it, you could write the file stream out to whereever you want. It's really just a python cgi module object. so you can use all corresponding documentation to help look at this SO answer https://stackoverflow.com/questions/15947988/in-my-python-cgi-script-how-do-i-save-to-dis

Re: [web2py] Re: Why web2py and AnguljarJS?

2014-01-08 Thread Richard Vézina
It could be one criteria with many others... Richard On Wed, Jan 8, 2014 at 10:34 AM, Ruud Schroen wrote: > So.. angularjs should be used when i want to create a website with lots of > javascript/AJAX? > > > On Sunday, January 5, 2014 11:06:43 PM UTC+1, Ruud Schroen wrote: >> >> I see more and

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
Calvin, i stripped out a variable or two, but it appears to work great. I'm getting a crazy twitch trying to figure out a javascript/ajax solution for this. I second the idea of building this into Web2py, I would be more than happy to contribute, but I'm just starting out with web2py and I wou

[web2py] Re: GAE: defaults on "_tableobj"

2014-01-08 Thread Quint
Well, put_multi 'm not sure about, maybe the difference in this case is insignificant (didn't research it.) But get_by_key_name() is less expensive than a fetch for a single record. On Wednesday, January 8, 2014 3:53:05 PM UTC+1, Alan Etkin wrote: > > > (For instance when I want to supply a "key

Re: [web2py] web2py administrative interface issue

2014-01-08 Thread Richard Vézina
Did you upgrade web2py? Do you try to restart web2py instance? Did you upgrade your system? Did you add code to your app that could have a bad consequence? Particularly name of controller, models, modules, etc. and folder... It very hard to say... Could you show the traceback if you have one?

[web2py] Scheduler repeat time drift

2014-01-08 Thread Brian M
Is there any way to keep the time at which recurring tasks run from drifting? I've got several daily tasks that over time go from running at say 10am to 10:30am - it seems like each consecutive run is 20 seconds or so behind the previous day's. Is this simply a matter of the next execution time

[web2py] Re: GAE: defaults on "_tableobj"

2014-01-08 Thread Quint
> > Also, is the use of named keys supported by DAL? I think it is not As long as it's not we will need to use GAE api directly then.. On Wednesday, January 8, 2014 3:53:05 PM UTC+1, Alan Etkin wrote: > > > (For instance when I want to supply a "key_name" when I put() an entity > so I can ha

[web2py] Re: GAE: insert using "key_name"

2014-01-08 Thread Quint
Sorry, I don't understand this line. although I belive storing records without id assignment would be > restrictive for apps Do you mean web2py apps or GAE apps? What did you mean by "restrictive" (and I doubt it will be actually compatible at all Compatible with what? Sure, when you would

Re: [web2py] Re: Why web2py and AnguljarJS?

2014-01-08 Thread António Ramos
I never liked javascript but Angular changed my mind.!! With Angular we code a lot less and only for good reasons. 2014/1/8 Ruud Schroen > So.. angularjs should be used when i want to create a website with lots of > javascript/AJAX? > > > On Sunday, January 5, 2014 11:06:43 PM UTC+1, Ruud Schro

[web2py] Re: GAE: defaults on "_tableobj"

2014-01-08 Thread Quint
As long as it's not we will need to use GAE api directly then.. To put() the entity that is. I would still prefer to use web2py to retreive it. On Wednesday, January 8, 2014 5:14:14 PM UTC+1, Quint wrote: > > Also, is the use of named keys supported by DAL? I think it is not > > > As long as i

[web2py] Re: GAE: defaults on "_tableobj"

2014-01-08 Thread Quint
> > I would still prefer to use web2py to retreive it. by using it's _tableobj I meant.. and then use GAE api On Wednesday, January 8, 2014 5:34:05 PM UTC+1, Quint wrote: > > As long as it's not we will need to use GAE api directly then.. > > To put() the entity that is. > I would still prefe

[web2py] Re: [web2py-dev] Rows.compact and other Rows methods

2014-01-08 Thread Massimo DiPierro
The problem is speed. I believe the getitem should be as fast as possible. This was changed before so that the trasformation of the rows occurred only once and not every time a row column is accessed. On Jan 8, 2014, at 8:41 AM, Anthony wrote: > Let's discuss on the developers list. > > On Tue

[web2py] Re: [web2py-dev] Rows.compact and other Rows methods

2014-01-08 Thread Massimo DiPierro
This would be slow and confusing. What if there is a table in the join called first_name? What if both tables in a join have a column first_name? On Jan 8, 2014, at 9:12 AM, Anthony wrote: > This is an interesting idea. Instead of bothering with the "compact" > attribute, we could make it so an

[web2py] Re: GAE: insert using "key_name"

2014-01-08 Thread Alan Etkin
> > Compatible with what? > With any web2py feature expecting entity keys (web2py records) with integer ids. But you would know that you don't need those functionalities if you would > decide to use a key_name > I think this is usually called a "corner case". I would't add the feature for th

[web2py] Validating list:string fields

2014-01-08 Thread curly
Hello, I'm trying to validate a list:string field with is_alphanumeric and is_length - trying to ensure that names are no longer than 6 alphanumeric characters in length. (I'm running web2py 2.8.1 in ubuntu 12.04) view: Sample name *: {{=form.custom.widget.sample_name}} controller: for

Re: [web2py] Re: Why web2py and AnguljarJS?

2014-01-08 Thread Richard Vézina
But you need other techno, as far as I understand it, you need something to talk with the db (web2py for instance)... To me the learning curve seems much longer than with web2py... web2py manage a lot of complexity of web development for you, it one of its strength. :) Richard On Wed, Jan 8, 20

[web2py] Re: pyfilesystem support (store uploads in S3)

2014-01-08 Thread Diogo Munaro
Hey guys! I know this topic is old, but here it's *working great* with mysql or sqlite on web2py 2.7.4. Just install: pip install fs Then on model: import fs.s3fs myfs = fs.s3fs.S3FS(bucket, prefix, aws_access_key, aws_secret_key) db.define_table('image',Field('image','upload',uploadfs = myfs)

Re: [web2py] Re: Why web2py and AnguljarJS?

2014-01-08 Thread António Ramos
for me was the other way. I learned angular (still learning) faster than web2py about talking to db angular excels with ng-resource. Very easy , it creates an object to use as REST resource http://coder1.com/articles/consuming-rest-services-angularjs 2014/1/8 Richard Vézina > But you n

[web2py] Re: Nested References in Smart Grid

2014-01-08 Thread Massimo Di Pierro
You can do it: db.tblvehicles.Model.represent = Lambda value,row: value.MakeID.Make but unless you denormalize this is slow (two nested select per row). On Tuesday, 7 January 2014 22:02:18 UTC-6, MVolpes wrote: > > Hi > > I have been using this framework for the last few days and I am in awe a

[web2py] Re: Validating list:string fields

2014-01-08 Thread Massimo Di Pierro
You simply need in the model or in the action before SQLFORM db. register.sample_name.requires=(IS_ALPHANUMERIC(),IS_LENGTH(maxsize=6)) On Wednesday, 8 January 2014 07:44:15 UTC-6, curly wrote: > > Hello, > > I'm trying to validate a list:string field with is_alphanumeric and > is_length - try

[web2py] Re: cpdb from sqlite to postgresql

2014-01-08 Thread Dave S
Martin has sent the following: On Tue, Jan 7, 2014 at 1:07 PM, Martin Weissenboeck wrote: > Ok, I have found a solution. > > (1) I have to copy the whole directory /gluon to /scripts > (2) Parameter -d of cpdb has to be an absolute path, e.g. -d > /home/www-data/web2py/gluon > > But I do not th

[web2py] Re: [web2py-dev] Rows.compact and other Rows methods

2014-01-08 Thread Anthony
OK, good point. In that case, I'll just send a patch for .find and .sort so they return the original self.records items so .render will work properly. Anthony On Wednesday, January 8, 2014 11:47:24 AM UTC-5, Massimo Di Pierro wrote: > > The problem is speed. I believe the getitem should be as fa

[web2py] Re: [web2py-dev] Rows.compact and other Rows methods

2014-01-08 Thread Anthony
On Wednesday, January 8, 2014 11:48:30 AM UTC-5, Massimo Di Pierro wrote: > > This would be slow and confusing. What if there is a table in the join > called first_name? What if both tables in a join have a column first_name? > The idea was that the row.fieldname syntax would work only if there i

[web2py] Re: Validating list:string fields

2014-01-08 Thread Anthony
For a list:-type field, I think you can only use IS_IN_SET(..., multiple=True), IS_IN_DB(..., multiple=True), IS_NOT_EMPTY(), and IS_LIST_OF(), no? IS_LIST_OF() takes only a single additional validator, so to apply multiple validators using it, you would probably have to create a custom validat

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Calvin Morrison
Yes I am getting that same problem here. Like I said, I don't really know how to properly test if the variable has been set. Any input from more wise web2pyers would be great Calvin On 8 January 2014 14:03, Brando wrote: > Calvin, I'm getting this error when I select only 1 file to upload: >

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
Calvin, I'm getting this error when I select only 1 file to upload: Traceback (most recent call last): File "/Volumes/BrandonsData/Google Drive/web2py/web2py.app/Contents/Resources/gluon/restricted.py", line 217, in restricted File "/Volumes/BrandonsData/Google Drive/web2py/web2py.app/Conte

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
I removed that if loop completely and it works fine now: def submit(): import datetime form = FORM(LABEL("File(s):"), INPUT(_name='up_files', _type='file', _multiple=''), BR(),INPUT(_type='submit')) # if hasattr(request.vars, 'up_files'): # form.process() if form.accepts(request.v

Re: [web2py] web2py administrative interface issue

2014-01-08 Thread Kumar Sonu
Hi Richard, I didn't upgrade web2py. Also not changed the name of controller, models, modules. Although my application runs fine when I access via weblink but it is not accessible via web2py administrative interface as I said. On Wed, Jan 8, 2014 at 8:14 AM, Richard Vézina wrote: > Did you upgra

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Dave S
On Wednesday, January 8, 2014 11:07:03 AM UTC-8, Brando wrote: > > I removed that if loop completely and it works fine now: > The next obvious question: did you test with no files? To deal with those of us who click too fast? /dps -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] web2py administrative interface issue

2014-01-08 Thread Dave S
On Wednesday, January 8, 2014 11:14:40 AM UTC-8, sonu kumar wrote: > > Hi Richard, > I didn't upgrade web2py. > Which version are you running? > Also not changed the name of controller, models, modules. > Although my application runs fine when I access via weblink but it is not > accessible v

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
I'm working on that now. if anyone beats me to it please post the solution. On Wednesday, January 8, 2014 11:23:21 AM UTC-8, Dave S wrote: > > On Wednesday, January 8, 2014 11:07:03 AM UTC-8, Brando wrote: >> >> I removed that if loop completely and it works fine now: >> > > The next obvious q

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
This works, added the requires statement for form validation: def submit(): import datetime form = FORM(LABEL("File(s):"), INPUT(_name='up_files', _type='file', _multiple='', requires=IS_NOT_EMPTY()), BR(),INPUT(_type='submit')) if form.accepts(request.vars, formname="form"):

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
Question, how could I make it so I don't have to click the submit button. How could i make it to where they choose the files and it auto submits it? On Wednesday, January 8, 2014 11:35:44 AM UTC-8, Brando wrote: > > This works, added the requires statement for form validation: > > def submit()

[web2py] Re: [web2py-dev] Rows.compact and other Rows methods

2014-01-08 Thread Massimo Di Pierro
Thank you. :-) On Wednesday, 8 January 2014 12:28:18 UTC-6, Anthony wrote: > > OK, good point. In that case, I'll just send a patch for .find and .sort > so they return the original self.records items so .render will work > properly. > > Anthony > > On Wednesday, January 8, 2014 11:47:24 AM UTC-

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Calvin Morrison
that'd be a Jquery thing. jQuery("input#fileid").change(function () { alert(jQuery(this).val()) }); On 8 January 2014 14:36, Brando wrote: > Question, how could I make it so I don't have to click the submit button. > How could i make it to where they choose the files and it auto submits

[web2py] Re: Validating list:string fields

2014-01-08 Thread Massimo Di Pierro
Oops. I overlooked that this is a list field. I changed the IS_LIST_OF in trunk and now you can do: db. register.sample_name.requires=IS_LIST_OF((IS_ALPHANUMERIC(),IS_LENGTH(maxsize=6))) On Wednesday, 8 January 2014 12:48:24 UTC-6, Anthony wrote: > > For a list:-type field, I think you can only

Re: [web2py] web2py administrative interface issue

2014-01-08 Thread Richard Vézina
Try to reboot you web2py instance and make sure there is no instance remaining up and running... Is this a dev local web2py app or a kind of production server? We can't help you with the information you provide... Richard On Wed, Jan 8, 2014 at 2:25 PM, Dave S wrote: > On Wednesday, January

[web2py] Re: Validating list:string fields

2014-01-08 Thread Anthony
Nice. On Wednesday, January 8, 2014 2:43:16 PM UTC-5, Massimo Di Pierro wrote: > > Oops. I overlooked that this is a list field. I changed the IS_LIST_OF in > trunk and now you can do: > > db. > register.sample_name.requires=IS_LIST_OF((IS_ALPHANUMERIC(),IS_LENGTH(maxsize=6))) > > On Wednesday,

[web2py] Re: Scheduler repeat time drift

2014-01-08 Thread Niphlod
I don't exactly get how you scheduled the tasks and how are you expecting them to run. If you schedule a task to start at 10am and set a period of 24*60*60, the task will be "requeued" to be executed at 10am. As the book says, *The time period is not calculated between the END of the first roun

[web2py] Re: scheduler task is queued but not running

2014-01-08 Thread Niphlod
are you running the scheduler from where ? it should be in the gluon folder along with the other files from the framework, and hence not erroring on import. If you're running from a standalone file then ok, with python2.6 you should have simplejson installed, and we'll fix in trunk to choose jso

[web2py] Re: scheduler task is queued but not running

2014-01-08 Thread Niphlod
whoops. my bad. definitely it should not give errors on import. The scheduler needs dal, utils and Storage so the only way to run it is from inside the gluon folder, along with the rest of the framework. Also, please post the contents of your scheduler_task and scheduler_worker tables, so we fi

[web2py] Re: Nested References in Smart Grid

2014-01-08 Thread MVolpes
Thank you that worked however as pointed out its quite slow. I ended up creating a view joining the tblmodels and tblmake and reference that Thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google

[web2py] Re: Different applications usiong same set of tables

2014-01-08 Thread Niphlod
On Wednesday, January 8, 2014 5:37:12 AM UTC+1, Jayadevan M wrote: > > Thank you. So fake_migrate=True will scan the structure defined for tables > defined under models in the .py files and create files under databases so > that the structure defined in the python files and in the databases fol

[web2py] Re: GAE: defaults on "_tableobj"

2014-01-08 Thread Alan Etkin
> by using it's _tableobj I meant.. and then use GAE api > About using appengine property default values, the patch sets defaults for entity creation but I think that this would bypass the DAL interface, which uses it's own logic for setting default values. This could lead to web2py apps be

[web2py] Re: GAE: defaults on "_tableobj"

2014-01-08 Thread Alan Etkin
> About using appengine property default values, the patch sets defaults for > entity creation but I think that this would bypass the DAL interface, > I did not take in account that the patch just copies defaults, my bad. So I don't think the feature affects any previous implementation or lead

[web2py] Re: GAE: defaults on "_tableobj"

2014-01-08 Thread Quint
Ok. I will manage this myself then where I need it. thanks anyway! -- 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] Re: Scheduler repeat time drift

2014-01-08 Thread Brian M
I've got it scheduled to repeat every 86400 seconds (24*60*60) so once a day. I thought that it was supposed to keep the same start time like the book says but it has definitely been drifting - part of the task that's queued logs to a DB and I can see the timestamps there consistently drifting

[web2py] Re: GAE: insert using "key_name"

2014-01-08 Thread Alan Etkin
How about adding support in dal.py for the following: # processes the field input and add defaults, computes, etc. (does not make actual insertion). >>> values = db._insert(spam="alot", ...) {"spam": "alot", ...} So one can use the output for storing named keys (with app specific logic or maybe

[web2py] Set Field Type Dynamically

2014-01-08 Thread MVolpes
Hi I am loving the smart grid but the amount of references is killing itvery slow. Removing the references and using multiple lefts is a workable option however I do want the goodness of references when editing a particular row in the edit field Can I change the type dynmaically? eg it i

[web2py] Best practices with sessions

2014-01-08 Thread Wonton
Hello everyone, I'm trying to implement the web2py recipes to improve the efficiency and security of my backend. I'm beggining with sessions and I have a couple of doubts: - My site is over SSL and has user authentication, so I guess I should secure my sessions. The recipe sais "In your appli

[web2py] Re: Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Alan Etkin
> > I'm trying to use > jQuery-File-Uploadto implement > multiple file uploads. I'm using this > tutorial > as > well as this sample app > HERE

[web2py] android and web2py

2014-01-08 Thread Ismael Velandia
Hello list. How to connect android app with web2py through JSONRPC? Can someone help me with an example? Thanks from Colombia, Ismael Velandia -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/

[web2py] Sharing fields across different tables in models?

2014-01-08 Thread Apple Mason
If we have a table full of products, but some products use slightly different fields, how should this be represented? For example, if I sell clothing and furniture: clothing and furniture share these fields: - price - description - stock - name clothing have these special fields: - materia

[web2py] Re: Wiki.auth 401 error

2014-01-08 Thread waleedabu
Jim and Alan, I have the exact same problem, and exact same error. my setup is simple: using the latest "web2py_win" (as of December 2013) and followed the book "web2py_manual_5th". The instructions in section 3.5 will guide you to use the built in wiki, and if you follow these instructions

[web2py] Re: Wiki.auth 401 error

2014-01-08 Thread Alan Etkin
> > Jim and Alan, > > I have the exact same problem, and exact same error. my setup is simple: > using the latest "web2py_win" (as of December 2013) and followed the book > "web2py_manual_5th". The instructions in section 3.5 will guide you to use > the built in wiki, and if you follow these

[web2py] auth.enable_record_versioning

2014-01-08 Thread Jayadevan M
A question about record versioning. Is it possible to have this ON and still *not keep* deleted versions of the record in the original table? 2 reasons - 1) When there are tables with a number of deletes, the table will become huge 2) If we are using hand-written SQLs in many places, we have

[web2py] Re: Set Field Type Dynamically

2014-01-08 Thread Anthony
There's no need to change the field type. If you don't want to display the reference fields in the grid at all, just set the "readable" attribute to False. You can also pass a list of fields to the grid to display -- other fields will be excluded. If you do want to include the reference fields b

[web2py] Re: Sharing fields across different tables in models?

2014-01-08 Thread 黄祥
just a suggestion, why not create the table for category. e.g. db.define_tables('category', Field('name', 'string') ) db.define_tables('product', Field('price', 'double'), Field('description', 'string'), Field('stock', 'integer), Field('name', 'string') Field('material_fab

[web2py] Re: ckeditor in appadmin

2014-01-08 Thread 黄祥
please check this discussion: https://groups.google.com/forum/#!topic/web2py/OoZ1EI8OOmw best regards, stifan -- 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)

[web2py] REF: update_or_insert() confirming update

2014-01-08 Thread Teddy Nyambe
wanted to find out how to confirm that an update really took place when using update_or_insert(), insert atleast returns the auto id but a successful update seems to return none/null. Any ideas? -- ... Teddy Luba

[web2py] REF: DAL Catching errors

2014-01-08 Thread Teddy Nyambe
Hi, I am trying to find out the best way to catch errors generated by web2py especially those genereted by say DAL. Say forinstance if I have a table: db.define_table('test', Field('xyz', 'integer', unique=True) If i insert a dublicate field will get the exception and ticket: IntegrityError: (1