Re: [web2py] Re: How to call controller function upon onClick from html?

2012-08-28 Thread Amit
Anthony, I am facing one more problem, I have one text Field called Name where user can input the name , i need to pass the entered name to controller function but if I use like: it is flashing error saying "name name_text_field is not defined" , even text field is there in same form ,inside sa

[web2py] field attributes outside field definition.

2012-08-28 Thread Annet
In my models I have the following table definition: db.define_table('node', Field('computedName',length=128), Field('computedSubClass',type='integer'), Field('createdOn',type='datetime',default=request.now,requires=IS_DATETIME(format='%Y-%m-%d %H:%M:%S'),writable=False,readable=Fals

Re: [web2py] Re: Avoiding loading models for the public portion of a site

2012-08-28 Thread Bruce Wade
I am righting a quick example app as I don't think anyone is really understanding what I am saying :D I will email it within the next 30 mins. On Tue, Aug 28, 2012 at 10:36 PM, Bruce Wade wrote: > Conditional models will work, however not with the default design as you > may have noticed. In you

Re: [web2py] Re: Avoiding loading models for the public portion of a site

2012-08-28 Thread Bruce Wade
Conditional models will work, however not with the default design as you may have noticed. In youadworld there are some controllers that required access to 20 tables and others that required access to only a few tables. The technique I used works perfect for that without ever duplicating the model

[web2py] Ckeditor(plugin) using the LOAD (....., ajax = True)

2012-08-28 Thread Picheth
I have a problem with the ckeditor function LOAD (., ajax = True) error : It pass the wrong part. please .. any help, cues or snippets of codes to accomplish this ... will be greatly appreciated Picheth. --

[web2py] Re: Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
pbreit- Yeah I thought about letting apache handle the public part, but that still leaves me in the lurch because I can't use web2py to determine whether the user is logged in, which is how we decide whether to deliver the public or private portion to begin with. So the only practical course is

[web2py] Re: Avoiding loading models for the public portion of a site

2012-08-28 Thread pbreit
Fair enough. If there's no processing at all, best to serve the static site direct through Nginx/Apache. Otherwise, as you note, conditional models may not work so waiting for "lazy tables" might be best (should be any day now in 2.0). On Tuesday, August 28, 2012 8:55:35 PM UTC-7, Yarin wrote:

Re: [web2py] Re: Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
Hey Bruce- again, it doesn't appear that you can use conditional models for more than one controller at a time, and we're dealing with a large app where multiple controllers need to load shared models. Massimo's stated as much. Unless you've got a novel approach I don't see how that can be a so

[web2py] Re: Deploying as RPM

2012-08-28 Thread LightDot
I'm distributing and supporting a project made with web2py as a set of RPMs (RHEL/CentOS/SL) for a while now. No big problems... I use Mock on SL6 to generate the RPMs. This project is fairly complex and involves much more than just web2py app, so my spec files wouldn't be applicaple straight a

Re: [web2py] Re: Avoiding loading models for the public portion of a site

2012-08-28 Thread Bruce Wade
Hi Yarin, Using conditional models will allow you to not load any models when you don't need them. Your idea of moving the brochure part of the site so it doesn't even get loaded by web2py will definitely increase performance however if you just remove the need for loading the models that should b

[web2py] Re: Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
Who said anything about premature? We want our app to run faster, and we are gonna worry about it. On Tuesday, August 28, 2012 11:49:22 PM UTC-4, pbreit wrote: > > If you haven't determined a performance issue, best to not worry about it > ("premature optimization -> evil"). > > > On Tuesday, Au

[web2py] Re: Avoiding loading models for the public portion of a site

2012-08-28 Thread pbreit
If you haven't determined a performance issue, best to not worry about it ("premature optimization -> evil"). On Tuesday, August 28, 2012 6:52:12 PM UTC-7, Yarin wrote: > > A basic architecture question: > > We're putting together a typical web app where non-logged in users reach a > public-fac

Re: [web2py] Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
- "use two apps" - How? Don't I still need to check against the auth session of the private app to see if the user is logged in, and so still would load models each time. - "move all public controllers under the same file" - This is totally impractical and goes against your o

[web2py] {{code}} compile in view

2012-08-28 Thread lucas
hello one and all, i want to store python code as a string in a text field of a table in a db, much like the code we write and store in a web2py view. at the right time, i want to compile the string into executed code and say the final line of the code be: "return = dict(...)". or after the c

[web2py] web2py 2.0 stats

2012-08-28 Thread Massimo Di Pierro
It is ready but we cannot stop tweaking it ... we replaced 16,000 lines of code and we added 41,000 new lines when compared with web2py 1.99.2 (minified js count as one line). We may release it tomorrow. --

Re: [web2py] Avoiding loading models for the public portion of a site

2012-08-28 Thread Massimo Di Pierro
oops. Do not have a solution other than use two apps or move all public controllers under the same file or use lazy_tables. On Tuesday, 28 August 2012 22:28:09 UTC-5, Yarin wrote: > > But my app has 13 private controllers and 1 public controller? > > On Tuesday, August 28, 2012 11:21:46 PM UTC-4,

Re: [web2py] Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
But my app has 13 private controllers and 1 public controller? On Tuesday, August 28, 2012 11:21:46 PM UTC-4, Massimo Di Pierro wrote: > > You just need two controllers say: > > controllers/public.py > controllers/private.py > > then put your model files like db.py in > > models/private/db.py > >

[web2py] Deploying as RPM

2012-08-28 Thread thinkwell
Hello everyone, The report feature I've been toiling over is now finished - YEA! and ready to be to deployed to the /opt/www/web2py directory of the various machines. This is a task for puppet, which we use for config & package management as it handles RPMs and custom repos extremely well, so t

Re: [web2py] Avoiding loading models for the public portion of a site

2012-08-28 Thread Massimo Di Pierro
You just need two controllers say: controllers/public.py controllers/private.py then put your model files like db.py in models/private/db.py They will not load when you call actions in public. Massimo On Tuesday, 28 August 2012 22:19:03 UTC-5, Yarin wrote: > > And now I'm also not sure how to

Re: [web2py] Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
And now I'm also not sure how to go about separating the public site into a separate application- wouldn't I still need to hit the 'real' application to check the whether the user is logged in or not, thereby requiring model loads on every request anyway? On Tuesday, August 28, 2012 11:09:43 PM

Re: [web2py] Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
Thanks guys but don't understand how conditional models could be applied here. I thought conditional models were models specific to a single controller/function? My app has many controllers that use the models, and only a few basic pages where I don't want models to load- how would conditional

Re: [web2py] Re: Mark required fields with asterisk "*" when using FORM

2012-08-28 Thread Anthony
Probably not, but the code might give you some ideas. On Tuesday, August 28, 2012 6:43:20 PM UTC-4, Daniel Gonzalez wrote: > > that example uses SQLFORM. Will it work with FORM? > Am 29.08.2012 00:36 schrieb "Anthony" >: > >> You might try this: http://dev.s-cubism.com/plugin_notemptymarker >> >>

Re: [web2py] Avoiding loading models for the public portion of a site

2012-08-28 Thread Bruno Rocha
- You can use conditional models. - You can use IF on models if not request.controller == "public": # my logic goes here - You can go to the option B (simple separate app) - You can serve the login form as static html file http://yourapp/static/public.html - You can use lazy_ta

Re: [web2py] Avoiding loading models for the public portion of a site

2012-08-28 Thread Jonathan Lundell
On 28 Aug 2012, at 6:52 PM, Yarin wrote: > A basic architecture question: > > We're putting together a typical web app where non-logged in users reach a > public-facing basic 'brochure' site, and then log in to reach the 'real' > application. With such a setup, it makes no sense to be loading m

[web2py] Avoiding loading models for the public portion of a site

2012-08-28 Thread Yarin
A basic architecture question: We're putting together a typical web app where non-logged in users reach a public-facing basic 'brochure' site, and then log in to reach the 'real' application. With such a setup, it makes no sense to be loading models for the public portion of the site, as it's j

[web2py] Re: TypeError: can't pickle file objects

2012-08-28 Thread aabelyakov
GLib.py put in the directory modules. Import it from the model file scheduler.py. Run it in the background with the parameters db and session. it works! Thank you! The question is closed... вторник, 28 августа 2012 г., 20:17:40 UTC+4 пользователь Massimo Di Pierro написал: > > The definitively

[web2py] Best editor for Markmin

2012-08-28 Thread villas
I know this has been asked before, but things may have changed... Does anyone have any good suggestions regarding JS client-side Markmin editors. 1. Best editor to assist users to do markup? Markitup is still the only one? 2. Is there a WSIWYG editor which saves in Markmin. I didn't find o

[web2py] Playing around with list/tuples of images on a basic form .... ( educational purpose)

2012-08-28 Thread Don_X
Hello, I am trying to cook up something with a list or tuples of images, but it does not and cannot show up in the view within a form ... ( let me show some codes ) a basic model file user_sex = [SPAN(IMG(_src=(URL('static','images/male_thumb.png',SPAN(IMG (_src=(URL('static','images/fema

[web2py] Re: IMPORTANT - NEED HELP: more speed improvements to be tested

2012-08-28 Thread Ron McOuat
Hi Massimo, I double checked and all foreign keys are declared as "reference table_name". I also used the {{=response.toolbar()}} and looking at the tables item I see the expected tables are defined for each function and tables not in use are indeed lazy. All the pages except the initial landin

[web2py] Re: Doing larger translations...

2012-08-28 Thread Alan Etkin
This could help with the translation task, although does not solve handling large amounts of data: http://code.google.com/p/plugin-multitranslate/ I belive large sets of text could be splitted and rejoined for large text translations. Perhaps I could add that feature to the plugin (or does web

[web2py] Re: need a simple wiki...

2012-08-28 Thread Alan Etkin
> You seem to need access to the Wiki object in more then one controller. Why? One case of use is described in issue 962 (now fixed, about re-using the wiki model) Other possible case: I intend to give access to wiki documents from a view in a plugin, i.e.: controllers/plugin_bavaria.py def w

[web2py] html in session.flash?

2012-08-28 Thread czamb
Is it possible to get some html content into the session.flash message? I would like to include an "undo" link for a delete action. Could also be nice to easily access newly created content. Thank you. --

Re: [web2py] Re: Mark required fields with asterisk "*" when using FORM

2012-08-28 Thread Daniel Gonzalez
that example uses SQLFORM. Will it work with FORM? Am 29.08.2012 00:36 schrieb "Anthony" : > You might try this: http://dev.s-cubism.com/plugin_notemptymarker > > Anthony > > On Tuesday, August 28, 2012 6:17:22 PM UTC-4, Daniel Gonzalez wrote: >> >> Hi, >> >> I am defining a non-database bound for

[web2py] Re: Mark required fields with asterisk "*" when using FORM

2012-08-28 Thread Anthony
You might try this: http://dev.s-cubism.com/plugin_notemptymarker Anthony On Tuesday, August 28, 2012 6:17:22 PM UTC-4, Daniel Gonzalez wrote: > > Hi, > > I am defining a non-database bound form with FORM, using INPUT, SELECT and > so on. Most of my fields have "requires" parameters, which are p

[web2py] Mark required fields with asterisk "*" when using FORM

2012-08-28 Thread Daniel Gonzalez
Hi, I am defining a non-database bound form with FORM, using INPUT, SELECT and so on. Most of my fields have "requires" parameters, which are properly validated by web2py. I would like to provide visual clues when rendering the form about which fields are required and which are not, using aster

Re: [web2py] id and legacy id name in row object gone with 1.99.7 can we have it back

2012-08-28 Thread Richard Vézina
If you want I can make a diff over 1.99.4 and 1.99.5 and try to locate what breaks the old behavior... Also, I understand that it was something experimental, but I think it is pretty usefull for legacy database users. I will try trunk tomorrow to see if your fix works as expect. Thank you Massimo

Re: [web2py] id and legacy id name in row object gone with 1.99.7 can we have it back

2012-08-28 Thread Massimo Di Pierro
For now I have committed a fix in trunk. I am not sure it belong there? It is not obvious to me the previous behavior was better or not (the feature you are using was never documented). Pros? Cons? On Tuesday, 28 August 2012 11:56:13 UTC-5, Richard wrote: > > FYI what you suggest trigger this e

Re: [web2py] more benchmarks of web2py 2.0 in trunk

2012-08-28 Thread Richard Vézina
Congrats! I am eager now more then ever to have version 2.0 :) Richard On Tue, Aug 28, 2012 at 3:53 PM, Bruno Rocha wrote: > For me on Linux Ubuntu 12.10 > > bcr@vaiubuntu:~/projects/web2py21$ python web2py.py -S welcome -N -R > ../thisfile.py > web2py Web Framework > Created by Massimo Di Pi

Re: [web2py] more benchmarks of web2py 2.0 in trunk

2012-08-28 Thread Bruno Rocha
For me on Linux Ubuntu 12.10 bcr@vaiubuntu:~/projects/web2py21$ python web2py.py -S welcome -N -R ../thisfile.py web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2012 Version 2.00.1 (2012-08-28 14:26:44) rc4 Database drivers available: SQLite3, pymysql, psycopg2, pg8000, IMAP tim

[web2py] Re: Web2Py on OpenShift

2012-08-28 Thread greaneym
Hi Andrew, I've updated the issue on your github link. thanks margaret On Sunday, August 26, 2012 9:32:13 AM UTC-5, Andrew wrote: > > Hi Margaret :) > > You certainly could use an ssh tunnel. I just prefer to get it working in > a natural anonymous web access way where I can access it from anyw

Re: [web2py] Re: Mercurial not found

2012-08-28 Thread Massimo Di Pierro
The mercurial people people keep changing the API every version. they do not seem to care of users who use mercurial programmatically. On Tuesday, 28 August 2012 11:47:50 UTC-5, Jonathan Lundell wrote: > > On 28 Aug 2012, at 9:40 AM, Massimo Di Pierro > > > wrote: > > Which web2py version? whi

[web2py] more benchmarks of web2py 2.0 in trunk

2012-08-28 Thread Massimo Di Pierro
# run with web2py.py -S welcome -N -R thisfile.py import time db=DAL() db.define_table('test',Field('one')) db(db.test).delete() for k in range(1000): db.test.insert(one='one') db.commit() n = 100 t0 = time.time() for k in range(n): y = db.test.one print

[web2py] Re: Changing DB passwords, and database/*.table files

2012-08-28 Thread Niphlod
problem here is basically: when you change the password tables are created/consistent with your model or not ? Seems to me that it's your case (you just have to change the password, tables and columns are there). If so, just delete all in /databases and set fake_migrate_all: it should recreate a

Re: [web2py] Changing DB passwords, and database/*.table files

2012-08-28 Thread Jonathan Lundell
On 28 Aug 2012, at 10:17 AM, Chris wrote: > Background: web2py keeps track of database definitions using files in each > app's ./databases directory. The basic concept is, for each table definition > a pickle file is created storing attributes defined in web2py / not > necessarily defined in t

[web2py] Changing DB passwords, and database/*.table files

2012-08-28 Thread Chris
Background: web2py keeps track of database definitions using files in each app's ./databases directory. The basic concept is, for each table definition a pickle file is created storing attributes defined in web2py / not necessarily defined in the database; and the name of each pickle file inco

Re: [web2py] id and legacy id name in row object gone with 1.99.7 can we have it back

2012-08-28 Thread Richard Vézina
FYI what you suggest trigger this error message : Object exists and cannot be redefined: id Richard On Tue, Aug 28, 2012 at 12:46 PM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Not sure I follow, in the pass we were allowed to define a legacy id for a > table like this : > > db.def

Re: [web2py] How to turn retrieved rows into a SELECT?

2012-08-28 Thread Richard Vézina
make_a_set = (query) Than use IS_IN_DB(db(make_a_set),...) Richard On Tue, Aug 28, 2012 at 12:28 PM, lyn2py wrote: > Hello experts, > > Generally, when we do a SQLFORM, the 'reference table' fields > automatically gets *all* the available options for choosing as a dropdown > menu. > > However,

[web2py] Re: How to turn retrieved rows into a SELECT?

2012-08-28 Thread Anthony
Yes. By default, a reference field gets a validator like this: IS_IN_DB(db, db.sometable._id, db.sometable._format). However, the IS_IN_DB() validator can take a Set object as the first argument instead of db, and the list will be based on the records defined by that Set. In that case, you'll ha

Re: [web2py] Re: Mercurial not found

2012-08-28 Thread Jonathan Lundell
On 28 Aug 2012, at 9:40 AM, Massimo Di Pierro wrote: > Which web2py version? which python version? Note that that particular message implies that 'from mercurial import ui, hg, cmdutil' yielded an ImportError. Try the import from python directly. > > On Tuesday, 28 August 2012 10:59:25 UTC-5,

Re: [web2py] id and legacy id name in row object gone with 1.99.7 can we have it back

2012-08-28 Thread Richard Vézina
Not sure I follow, in the pass we were allowed to define a legacy id for a table like this : db.define_table('test_endotoxin', *Field('something_id','id'),* Field('result','decimal(10,2)', notnull=True, requires=[IS_NOT_EMPTY(error_message=T('field can\'t be empty')),

[web2py] Re: Mercurial not found

2012-08-28 Thread Massimo Di Pierro
Which web2py version? which python version? On Tuesday, 28 August 2012 10:59:25 UTC-5, Sergi Pons Freixes wrote: > > Hi all, > > I have mercurial installed: > > # dpkg -l |grep mercurial > ii mercurial 1.6.4-1

Re: [web2py] Mercurial not found

2012-08-28 Thread Richard Vézina
Did you init a user for mercurial? http://manpages.ubuntu.com/manpages/hardy/man5/hgrc.5.html Also you need to create a repo for your app : hg init You have to ignore some folder like sessions, cache, etc. Then you should be able to use web2py to commit, I don't know if it still the case, but

Re: [web2py] id and legacy id name in row object gone with 1.99.7 can we have it back

2012-08-28 Thread Massimo Di Pierro
How about table.id = Field.Virtual(lambda row: row.table.something_id) On Tuesday, 28 August 2012 10:30:37 UTC-5, Richard wrote: > > Hello Massimo, > > I notice when I try to migrate to 1.99.7 some times ago that I could not > anymore do something like this : > > rows = db(db.table.id>0).select(

[web2py] Re: IMPORTANT - NEED HELP: more speed improvements to be tested

2012-08-28 Thread Massimo Di Pierro
I'd expect something better. Add {{=response.toolbar()}} to your layout. It will tell you which tables are lazy and which ones are now. Make you do no have more tables than you need. For example using Field('',db.auth_user) forces db.auth_user even if not needed. Field('','reference aut

[web2py] Re: datetime fields translation in latest trunk

2012-08-28 Thread Massimo Di Pierro
I cannot reproduce the problem but I do not have a de.py language. I tried with italian and it works. Is de-de.py it supposed to be there? Anyway, can you send me a minimalist app to reproduce? Can you check latest trunk? We did change some internal logic about languages. massimo On Tuesday,

[web2py] How to turn retrieved rows into a SELECT?

2012-08-28 Thread lyn2py
Hello experts, Generally, when we do a SQLFORM, the 'reference table' fields automatically gets *all* the available options for choosing as a dropdown menu. However, I would like to get a filtered list instead of *all* of the items. Is there an available function I can use to achieve a filtered

[web2py] Re: Doing larger translations...

2012-08-28 Thread Massimo Di Pierro
It depends. Can you tell us more about the structure of the data? On Tuesday, 28 August 2012 00:17:02 UTC-5, encompass wrote: > > I am wanting to create large amounts of content that needs to be > translated. Is the Lazy T() way the best for this? > Whole pages of text will need to be translate

[web2py] Re: TypeError: can't pickle file objects

2012-08-28 Thread Massimo Di Pierro
The definitively goes in modules. On Monday, 27 August 2012 23:50:27 UTC-5, aabelyakov wrote: > > gLib.py - this is a common library of functions and procedures. It uses > global variables attached to the session. > > понедельник, 27 августа 2012 г., 23:00:37 UTC+4 пользователь Massimo Di > Pier

[web2py] Re: Screenplay formatting with web2py - markdown2.py

2012-08-28 Thread Massimo Di Pierro
Let us know if this works. This served a blog post. I am sure there is a large community who may be interested in this... although not regular web2py users. On Monday, 27 August 2012 21:41:48 UTC-5, Rob_McC wrote: > > *Thanks* Massimo... > > I didn't know you could do it without modifying the .p

[web2py] Mercurial not found

2012-08-28 Thread Sergi Pons Freixes
Hi all, I have mercurial installed: # dpkg -l |grep mercurial ii mercurial 1.6.4-1 scalable distributed version control system

[web2py] id and legacy id name in row object gone with 1.99.7 can we have it back

2012-08-28 Thread Richard
Hello Massimo, I notice when I try to migrate to 1.99.7 some times ago that I could not anymore do something like this : rows = db(db.table.id>0).select() for row in rows: print row.id I can did it before 1.99.5. Has Anthony wrote in this thread : https://groups.google.com/forum/#!msg/we

Re: [web2py] Neither suggestion worked...

2012-08-28 Thread Richard Vézina
To see what the set return : print db((~db.trainer.id.belongs(db()._select(db.dogs.trainer When you will be into the web2py shell. Richard On Tue, Aug 28, 2012 at 10:22 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Hi Bill, > > Did you try you set into the web2py shell to see

Re: [web2py] Neither suggestion worked...

2012-08-28 Thread Richard Vézina
Hi Bill, Did you try you set into the web2py shell to see if it returns something? I usually try my query in a terminal web2py shell to make sure my query are good before waisting time in navigator reloading page. Here how you can start a web2py shell : cd into the web2py folder Than : python

Re: [web2py] Re: "wizard" style forms in web2py

2012-08-28 Thread Richard Vézina
Tuples are unmutable (you can't change them), so they don't have a replace attribute. I you want to change your the values into your tuples use list instead. Richard On Tue, Aug 28, 2012 at 3:44 AM, Bill Thayer wrote: > The example from the web2py application cookbook runs fine but when I > twe

Re: [web2py] Re: Update...dumb people like me should use smart_query... making progress but still need help.

2012-08-28 Thread Richard Vézina
With the query I suggest yesterday, I don't think he need is_active. For sure if this field is not update to true when assign a dog a new trainer, they (trainers) will never be active so they will be in the dropbox for ever. Richard On Tue, Aug 28, 2012 at 6:27 AM, villas wrote: > 1. Did you tr

Re: [web2py] Web2py en paquetes SCORM

2012-08-28 Thread Matol
Ok, Thank Jose Luis. Regards El domingo, 26 de agosto de 2012 10:18:02 UTC-3, José Luis Redrejo Rodríguez escribió: > > > Hi, Matias, this an English language only mailing list. Anyway, if I were > you I'd take a look to eXe learning. > > Regards > El 22/08/2012 00:03, "Matol" > > escribi

[web2py] signed_request from facebook

2012-08-28 Thread andre
I can't find the signed_request sent by facebook whenever my application is loaded within a Canvas page!! I looked over all places and nothing anyone can help me?? --

[web2py] Re: user login tables

2012-08-28 Thread Anthony
Instead of a default database, how about something like this: session.database = session.database or request.vars.database if not session.database or session.database not in ['list', 'of', 'valid', 'databases']: redirect(URL('default', 'index')) baza = DAL('postgres://postgres:postgres@local

Re: [web2py] Re: how to escape data from request.post_vars to prevent SQLi

2012-08-28 Thread Anthony
If the user input must fit very specific criteria, then you can use a validator, such as IS_MATCH or IS_EXPR to validate it before using it to construct your query. For more general inputs, you should probably not attempt to escape the input yourself, as it is difficult to get right. Instead, y

[web2py] Re: IMPORTANT - NEED HELP: more speed improvements to be tested

2012-08-28 Thread Cliff Kachinske
Found no problems running my production code against today's trunk. Didn't change the models. I use grid to manage configuration items like currencies, locations, payment terms, delivery terms. More complex objects involve many-to-many relationships; lots of table joins, but very vanilla stuff

Re: [web2py] Re: how to escape data from request.post_vars to prevent SQLi

2012-08-28 Thread Cliff Kachinske
>From the manual: A field also has methods. Some of them are used to build queries and we will seem them later. A special method of the field object is validate and it calls the validators for the field. print db.person.name.validate('John') which returns a tuple (value, error). error is None i

[web2py] Re: Update...dumb people like me should use smart_query... making progress but still need help.

2012-08-28 Thread villas
1. Did you try pasting my code exactly as I wrote it? If you are hesitant about overwriting your existing work, then simply rename, within my code, the dogs and trainers to something like cats and groomers and try it totally independently of everything else you have done. 2. I have ignored

[web2py] datetime fields translation in latest trunk

2012-08-28 Thread Andreas Kaiser
Hi all, with the latest trunk the datetime translation seems to be broken. In models.py I have defined: db.timeevent.start.requires = [IS_NOT_EMPTY(), IS_DATETIME(format=T('%Y-%m-%d %H:%M:%S'))] db.timeevent.finish.requires = IS_DATETIME(format=T('%Y-%m-%d %H:%M:%S')) and in languages de-de.p

[web2py] Re: "wizard" style forms in web2py

2012-08-28 Thread Bill Thayer
The example from the web2py application cookbook runs fine but when I tweak it I get 'tuple' object has no attribute 'replace' In the code below, mine is on top named test() for input a test request. The function named wizard came from the cookbook. def tests(): STEPS = { 0: ('db.t

[web2py] Re: user login tables

2012-08-28 Thread Yebach
Where do I put database = session.get('database','default_database') ?? In model? So if I understand correctly first there has to be a default database, but then after user selects the value a connection is set for the selected database? On Monday, August 27, 2012 8:59:03 PM UTC+2, Massimo