[web2py] Re: import_from_csv_file and unique

2014-08-28 Thread lyn2py
Thanks Derek. If the "uuid" field were specified, shouldn't the specified field be used, the way a uuid field is used, to de-duplicate records? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/w

[web2py] Document Expired/ Need to reload page on using browser back button

2014-08-28 Thread Sarbjit
I have an application having the layout as :- INDEX controller generates a view which have some drop-down and calls another controller RESULTS : Snippet : Now the RESULTS controller creates a grid and populates the view corresponding to RESULT controller. PROBLEM :- When I view/edit any ent

[web2py] Re: STYLE for GRID table

2014-08-28 Thread Vladimir Makarov
*It works perfectly.Thank you Antony!* On Thursday, August 28, 2014 10:50:20 PM UTC+4, Anthony wrote: > > You could do something like: > > grid = SQLFORM.grid(db.mytable) > table = grid.element('.web2py_htmltable') > table and table[0].add_class('myclass') > > Anthony > > On Thursday, August 28,

[web2py] Re: Both auth.login() and auth.register() on the same page, prevents password validation

2014-08-28 Thread Anthony
Looks like a bug. The login() method does the following: passfield = settings.password_field try: table_user[passfield].requires[-1].min_length = 0 except: pass It sets the minimum length for the password field to 0 but doesn't restore it. Please s

[web2py] Both auth.login() and auth.register() on the same page, prevents password validation

2014-08-28 Thread Mark Li
I currently have both auth.login() and auth.register() forms on the same page. A simplified version of my code below: def page(): login_form = auth.login() register_form = auth.register() return dict(login_form=login_form, register_form=register_form) If you go to the page with both

Re: [web2py] How to put both login and register forms on one page...

2014-08-28 Thread Mark Li
There seems to be a problem with this implementation For example, if you have def page(): login_form = auth.login() register_form = auth.register() return dict(login_form=login_form, register_form=register_form) If you go to the page with both forms, and submit the register form with

[web2py] Re: STYLE for GRID table

2014-08-28 Thread Anthony
You could do something like: grid = SQLFORM.grid(db.mytable) table = grid.element('.web2py_htmltable') table and table[0].add_class('myclass') Anthony On Thursday, August 28, 2014 2:32:40 PM UTC-4, Vladimir Makarov wrote: > > How to add class attr. for table inside web2py grid div? > Is there a

[web2py] STYLE for GRID table

2014-08-28 Thread Vladimir Makarov
How to add class attr. for table inside web2py grid div? Is there a way to manage styles for table or I need only duplicate styles in css file (.web2py_grid>table {some styles})? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: import_from_csv_file and unique

2014-08-28 Thread Derek
>From the documentation: When importing, the new records will be appended to the database if it is not empty. In general the new imported records will not have the same record id as the original (saved) records but web2py will restore references so they are not broken, even if the id values may

[web2py] Re: bootstrap 3 - if you care help test trunk now

2014-08-28 Thread Richard
Massimo, I downloaded the master zip and try the following http://codepen.io/ncerminara/full/omChv/ in order to get a full width desktop app layout. I tried the following but this was not successful: .. ..

[web2py] Re: SQLFORM.grid links and inner join

2014-08-28 Thread Louis Amon
Actually, if I look at the View, Edit and Delete buttons generated by the grid, it seems that in the case of a simple query the grid knows which table to use, but in the case of an inner join it arbitrarily selects the first table as the "main table" and generates links and buttons accordingly.

[web2py] SQLFORM.grid links and inner join

2014-08-28 Thread Louis Amon
I have a simple one-to-many relation like so: db.define_table('person', Field('job')) db.define_table('thing', Field('owner_id', 'reference person')) And I built a grid using SQLFORM.grid like so: grid = SQLFORM.grid((db.person.id == db.thing.owner_id), fields=[db.thing.owner

Re: [web2py] Re: How to call rows format?

2014-08-28 Thread Richard Baron Penman
ah OK, that makes sense. On Thu, Aug 28, 2014 at 2:42 PM, Anthony wrote: > In this case, the leading underscore is more to ensure the format attribute > doesn't clash with any possible field names (which are also accessed as > attributes of the table object). > > Anthony > > > On Thursday, August

[web2py] Setting default app on GAE

2014-08-28 Thread Richard Penman
Hello, how is the default app set on GAE? In routes.py I have "default_application = 'places'" but still redirects to welcome. app.yaml states: # Warning! Static mapping - below - isn't compatible with # the parametric router's language logic. # You cannot use them together. I have

[web2py] Re: How does one get their web2py sites on the poweredby page?

2014-08-28 Thread Anthony
Just go to http://web2py.com/poweredby/default/site_create and add it. On Thursday, August 28, 2014 8:40:29 AM UTC-4, sasogeek wrote: > > If I made a web app with web2py, how do I get it listed on the poweredby > page ? > -- Resources: - http://web2py.com - http://w

Re: [web2py] Re: How to call rows format?

2014-08-28 Thread Anthony
In this case, the leading underscore is more to ensure the format attribute doesn't clash with any possible field names (which are also accessed as attributes of the table object). Anthony On Thursday, August 28, 2014 8:31:22 AM UTC-4, Richard Penman wrote: > > I ask because typically a leading

[web2py] How does one get their web2py sites on the poweredby page?

2014-08-28 Thread 'sasogeek' via web2py-users
If I made a web app with web2py, how do I get it listed on the poweredby page ? -- 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) -

Re: [web2py] Re: How to call rows format?

2014-08-28 Thread Richard Baron Penman
I ask because typically a leading underscore would indicate a private method. On Aug 28, 2014 2:21 PM, "Anthony" wrote: > That's it. > > On Thursday, August 28, 2014 3:59:48 AM UTC-4, Richard Penman wrote: >> >> Hello, >> my database table defines 'format' - what is the proper way to use this >>

[web2py] Re: How to call rows format?

2014-08-28 Thread Anthony
That's it. On Thursday, August 28, 2014 3:59:48 AM UTC-4, Richard Penman wrote: > > Hello, > my database table defines 'format' - what is the proper way to use this in > a view? > Currently I have been using what I found in internals of SQLFORM: > db.tablename._format(record) > Richard > -- Res

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Prasad Muley
Pardon me earlier messaeg. I copied wrong code. *#models/scheduler.py* def send_mail(to, subject, message, cc=None, bcc=None, attachments=None): """ This module is called by scheduler. mail is queued by scheduler. """ if cc is None: cc = [] if bcc is

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Prasad Muley
NP. I got another way to catch failed mail/task. *#models/scheduler.py* def send_mail(to, subject, message, cc=None, bcc=None, attachments=None): """ This module is called by scheduler. mail is queued by scheduler. """ if cc is None: cc = [] if bcc i

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Niphlod
no. On Thursday, August 28, 2014 10:26:42 AM UTC+2, Prasad Muley wrote: > > Okay. > I am using 2.3 . I can't upgrade it because Company decided to use 2.3 > only. > Is there anyway to access current task id in 2.3? > > > > On Thu, Aug 28, 2014 at 1:47 PM, Niphlod > > wrote: > >> what version ar

[web2py] import_from_csv_file and unique

2014-08-28 Thread lyn2py
Assistance, anyone? Thanks. -- 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 "w

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Prasad Muley
Okay. I am using 2.3 . I can't upgrade it because Company decided to use 2.3 only. Is there anyway to access current task id in 2.3? On Thu, Aug 28, 2014 at 1:47 PM, Niphlod wrote: > what version are you using ?! W2P_TASK is available from 2.4.1. > > > On Thursday, August 28, 2014 9:30:28 AM U

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Niphlod
what version are you using ?! W2P_TASK is available from 2.4.1. On Thursday, August 28, 2014 9:30:28 AM UTC+2, Prasad Muley wrote: > > Hi Niphlod, > I need to get current task's id. I saw your sample scheduler example > on niphlod_w2p_scheduler_tests >

[web2py] How to call rows format?

2014-08-28 Thread Richard Penman
Hello, my database table defines 'format' - what is the proper way to use this in a view? Currently I have been using what I found in internals of SQLFORM: db.tablename._format(record) Richard -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/w

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Prasad Muley
Hi Niphlod, I need to get current task's id. I saw your sample scheduler example on niphlod_w2p_scheduler_tests I did it in same way but got error. *#models/scheduler.py* def send_mail(to, subject, message, cc