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

2014-08-30 Thread Joe Barnhart
I think there may be a change in operation for contains() in the DAL.  

With the last release, I can use an empty string as an argument to 
contains, and it will return all values (i.e. the empty string matches 
all).  In the trunk version the empty string matches nothing.  I don't know 
which is more correct but it does mean I need to change my code in 
numerous places to accommodate the change in usage.

-- Joe


On Saturday, August 9, 2014 12:13:38 AM UTC-7, Massimo Di Pierro wrote:

 Bootstrap 3 is in trunk now. Please help us test it.
 Also help us test that existing apps are not broken.

 Massimo


-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] How can I prevent a user from pressing the browser's back button?

2014-08-30 Thread Marin Pranjić
You can't. This is something you should take care of on server side.
Use session to store user's state, or store it in DB.


On Tue, Aug 26, 2014 at 11:36 PM, Fotis Gioulekas gioule...@gmail.com
wrote:

 Hello to everybody,

 I have built a quiz that randomlycreates questions.
 Each time a user submits it's answer, the app redirects to another
 question.
 When the user does not want to continue to another question it presses a
 button exit quiz and the app redirects to another url.
 When the user presses the browser's back button, it can return back to the
 quiz.
 How can I prevent this?
 Is there a solution that either closes the browser's tab or redirects to a
 default html page when the user presses the back broswer's button or

 My app does not requires user registratrion and login.

 Thank you in advance,
 Fotios

 --
 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-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Can't get web2py working with GAE locally

2014-08-30 Thread Richard Baron Penman
oh, where is that documented? I didn't find it in the help message
(web2py.py -h) or the book.


On Sat, Aug 30, 2014 at 1:31 AM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
 But now we simply do

 web2py.py -G GAE

 and everything is taken care for you you automatically.


 On Wednesday, 27 August 2014 08:45:43 UTC-5, Richard Penman wrote:

 Would be worth mentioning this in the book.


 On Saturday, January 4, 2014 3:25:17 AM UTC+1, Massimo Di Pierro wrote:

 It is in handlers/gaehandler.py
 There reason we moved is that we do now want to pollute the main folder
 and we do now want to overwrote any changes you may have to make to it upon
 upgrade. You have to

 cp handlers/gaehandler.py ./


 On Thursday, 2 January 2014 20:33:35 UTC-6, Jaime Sempere wrote:

 Hi everyone, this is driving me mad.

 I used web2py and GAE one year ago and I liked a lot, fast and easy to
 work with gae. Now that I wanted to start another app, I have download GAE
 and Web2Py again (for having last releases and starting in a cleannew
 folder).

 So, first change that I see is that when I run dev_appserver from GAE
 forces to use python 2.7. My first guess then, is that I need to change
 gaehandler in app.yaml and leave the code like this:

 application: myapp
 version: 1
 api_version: 1


   #script: gaehandler.py # CGI
   script: gaehandler.wsgiapp# WSGI (Python 2.7 only)
   secure: optional

 But when I do a http://localhost:8080/

 I obtain this error in console:

 ERROR2014-01-03 02:25:39,821 wsgi.py:262]
 Traceback (most recent call last):
   File
 /home/mrkite/DesarrolloATUBETV/google_appengine/google/appengine/runtime/wsgi.py,
 line 239, in Handle
 handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
   File
 /home/mrkite/DesarrolloATUBETV/google_appengine/google/appengine/runtime/wsgi.py,
 line 298, in _LoadHandler
 handler, path, err = LoadObject(self._handler)
   File
 /home/mrkite/DesarrolloATUBETV/google_appengine/google/appengine/runtime/wsgi.py,
 line 84, in LoadObject
 obj = __import__(path[0])
 ImportError: No module named gaehandler
 INFO 2014-01-03 02:25:39,834 module.py:617] default: GET /
 HTTP/1.1 500 -
 INFO 2014-01-03 02:25:40,208 module.py:617] default: GET
 /favicon.ico HTTP/1.1 304 -




 And of course I can't see any html returned. Why gaehandler is missing?

 I can reach localhost:8001/myapp   (web2py server)
 But not   localhost:8080  (gae)

 And second question: for running my appGAE locally do I need to have
 running web2py server? I used to have both running, but now I have seen 
 that
 I need to change default port 8000 to other (i.e. 8001), because gae is
 using 8000 and 8080.


 Any help would be very appreciated. Thank you

 --
 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 a topic in the
 Google Groups web2py-users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/web2py/M1wYyL9kr9U/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Creating tutorial videos.

2014-08-30 Thread Jason Brower
I was thinking of making some tutorial videos showing how to get 
started with web2py.  These could be link from the online book and 
perhaps even available in the app admin or other place.  I could even 
see the videos used in a special every growing app of all the tutorials 
with live examples.

BR,
Jason Brower


--
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-users group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: How can I prevent a user from pressing the browser's back button?

2014-08-30 Thread Anthony
The details will depend on exactly how you want to control access to quiz 
questions, but the general solution would be to store the user state in the 
session, and when a particular page/question is requested, check the 
session, and redirect elsewhere if the session check fails.

Anthony

On Tuesday, August 26, 2014 5:36:45 PM UTC-4, Fotis Gioulekas wrote:

 Hello to everybody,

 I have built a quiz that randomlycreates questions.
 Each time a user submits it's answer, the app redirects to another 
 question.
 When the user does not want to continue to another question it presses a 
 button exit quiz and the app redirects to another url.
 When the user presses the browser's back button, it can return back to the 
 quiz. 
 How can I prevent this?
 Is there a solution that either closes the browser's tab or redirects to a 
 default html page when the user presses the back broswer's button or 

 My app does not requires user registratrion and login.

 Thank you in advance,
 Fotios


-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] smartgrid form submit button behaviour

2014-08-30 Thread 98ujko9
1) smartgrid produces a form for a new record
2) I click on an input field and with the help of javascript smaller 
(second) browser window opens with related table content
3) I select a row in the window and ID is inserted in the first window 
field, the smaller second window closes.
4) I click submit in  the first window and the form inserts new record 
howerver
5 PROBLEM: page is redirected to the URL of the second window, that just 
closed (unwanted behaviour) not where the smartgrid was initially 
6 if I do not evoke the second window (where i select a record id) the 
submit action is all-right.
Why is the URL of the submit action being changed and what is a possible 
solution?
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 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Creating tutorial videos.

2014-08-30 Thread Anthony
Be sure to check out what's already been done:

https://www.youtube.com/playlist?list=PL5E2E223FE3777851
https://www.youtube.com/watch?v=BXzqmHx6edY
http://www.web2py.com/examples/default/videos/

Anthony

On Saturday, August 30, 2014 10:19:29 AM UTC-4, Encompass solutions wrote:

 I was thinking of making some tutorial videos showing how to get started 
 with web2py.  These could be link from the online book and perhaps even 
 available in the app admin or other place.  I could even see the videos 
 used in a special every growing app of all the tutorials with live examples.
 BR,
 Jason Brower



-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Can't get web2py working with GAE locally

2014-08-30 Thread Massimo Di Pierro
You need the nightly build version.

On Saturday, 30 August 2014 02:06:08 UTC-5, Richard Penman wrote:

 oh, where is that documented? I didn't find it in the help message 
 (web2py.py -h) or the book. 


 On Sat, Aug 30, 2014 at 1:31 AM, Massimo Di Pierro 
 massimo.dipie...@gmail.com wrote: 
  But now we simply do 
  
  web2py.py -G GAE 
  
  and everything is taken care for you you automatically. 
  
  
  On Wednesday, 27 August 2014 08:45:43 UTC-5, Richard Penman wrote: 
  
  Would be worth mentioning this in the book. 
  
  
  On Saturday, January 4, 2014 3:25:17 AM UTC+1, Massimo Di Pierro wrote: 
  
  It is in handlers/gaehandler.py 
  There reason we moved is that we do now want to pollute the main 
 folder 
  and we do now want to overwrote any changes you may have to make to it 
 upon 
  upgrade. You have to 
  
  cp handlers/gaehandler.py ./ 
  
  
  On Thursday, 2 January 2014 20:33:35 UTC-6, Jaime Sempere wrote: 
  
  Hi everyone, this is driving me mad. 
  
  I used web2py and GAE one year ago and I liked a lot, fast and easy 
 to 
  work with gae. Now that I wanted to start another app, I have 
 download GAE 
  and Web2Py again (for having last releases and starting in a 
 cleannew 
  folder). 
  
  So, first change that I see is that when I run dev_appserver from GAE 
  forces to use python 2.7. My first guess then, is that I need to 
 change 
  gaehandler in app.yaml and leave the code like this: 
  
  application: myapp 
  version: 1 
  api_version: 1 
  
  
#script: gaehandler.py # CGI 
script: gaehandler.wsgiapp# WSGI (Python 2.7 only) 
secure: optional 
  
  But when I do a http://localhost:8080/ 
  
  I obtain this error in console: 
  
  ERROR2014-01-03 02:25:39,821 wsgi.py:262] 
  Traceback (most recent call last): 
File 
  
 /home/mrkite/DesarrolloATUBETV/google_appengine/google/appengine/runtime/wsgi.py,
  

  line 239, in Handle 
  handler = _config_handle.add_wsgi_middleware(self._LoadHandler()) 
File 
  
 /home/mrkite/DesarrolloATUBETV/google_appengine/google/appengine/runtime/wsgi.py,
  

  line 298, in _LoadHandler 
  handler, path, err = LoadObject(self._handler) 
File 
  
 /home/mrkite/DesarrolloATUBETV/google_appengine/google/appengine/runtime/wsgi.py,
  

  line 84, in LoadObject 
  obj = __import__(path[0]) 
  ImportError: No module named gaehandler 
  INFO 2014-01-03 02:25:39,834 module.py:617] default: GET / 
  HTTP/1.1 500 - 
  INFO 2014-01-03 02:25:40,208 module.py:617] default: GET 
  /favicon.ico HTTP/1.1 304 - 
  
  
  
  
  And of course I can't see any html returned. Why gaehandler is 
 missing? 
  
  I can reach localhost:8001/myapp   (web2py server) 
  But not   localhost:8080  (gae) 
  
  And second question: for running my appGAE locally do I need to have 
  running web2py server? I used to have both running, but now I have 
 seen that 
  I need to change default port 8000 to other (i.e. 8001), because gae 
 is 
  using 8000 and 8080. 
  
  
  Any help would be very appreciated. Thank you 
  
  -- 
  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 a topic in the 
  Google Groups web2py-users group. 
  To unsubscribe from this topic, visit 
  https://groups.google.com/d/topic/web2py/M1wYyL9kr9U/unsubscribe. 
  To unsubscribe from this group and all its topics, send an email to 
  web2py+unsubscr...@googlegroups.com. 
  For more options, visit https://groups.google.com/d/optout. 


-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Enter date as 1963-08-28 error

2014-08-30 Thread Richard
I have used an sql form for adding records with date fields. After some 
changes the error  Enter date as 1963-08-28  pops up when entering a date.

In db.py
db.define_table('local_ev_def',
...
Field('ev_start_date', 'date', required=True,
  label=T('EV start date')),
Field('ev_end_date', 'date',  required=True,
  label=T('EV end date')),
.

In Controller
db.local_ev_def.global_ev.requires = 
IS_IN_DB(db(db.global_ev.community==com), 'global_ev.id', '%(gev_name)s')
form_add_local_ev_def = SQLFORM(db.local_ev_def,
fields=['lev_def_name', 'description', 
'homeostat', 'global_ev', 'period',
'ev_start_date', 'ev_start_date', 
'data_type', 'unit'])
form_add_local_ev_def.vars.community=com
if form_add_local_ev_def.process(formname='add_lev_def').accepted:
new_lev_def = db.local_ev_def[form_add_local_ev_def.vars.id]
new_lev_def.update_record(recursion=db.recursion[target_rec.id].id,
  created_by=auth.user_id,
  )

What may cause this error?

Richard D

-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Help in server config

2014-08-30 Thread Carlos Correia
Hi,

After migrating a web2py tree with several apps from one server to the 
other, I found that in the new server I had to put a symbolic link in 
admin/static to itself with the release name prefixed by an underscore in 
order to get a normal (css/js) admin interface, i.e., in 
applications/admin/static: 

ln -s _2.9.5 .

because the HTML generated have tags like this:


script src=/admin/static/_2.9.5/js/jquery.js 
view-source:https://t5.m16e.com/admin/static/_2.7.3/js/jquery.js 
type=text/javascript/script



I also noticed that one particular application stopped losing sessions in 
one of its controllers. All the other apps are working fine.

Both servers are running Debian wheezy, though the previous one (which 
wasn't fully configured by me) is running in a virtualenv.

Both servers are running apache + wsgi (same config, except for the 
certificate, which was a new one).

My question is: any one has a hint of where should I look to fix this?

-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: two forms submitted into the same cotroller

2014-08-30 Thread Andrey K
Hi Massimo,
Here is my dilemma:
I have one view with 3 tabs (DIVS), where I would like to have one tab for user 
tool selection and two forms in 2 separated tabs(DIVs) : 1)static form and 
2)dynamic form(generated based on user selection in first tab). Also I would 
like to submit all information from both forms into only one controller as two 
separated peaces of data, where I can nicely parse it and store in one record 
of the db.table, so it would be nice to have only one button to trigger it.
I have tried many ways but it did not work exactly the way I need it: either I 
can't present two forms in separated view divs or I can't submit both to only 
one controller. The last approach I had that did it almost the thing was to use 
HTML5 _form attribute for all form elements and button and related form _id 
attribute. But I have trouble submitting data back to the controller that 
generate my dynamic form, added to DIV via web2py_ajax_component.  
Please help me out. What would be the way to make it in w2p?
 

-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Insert a record after user has been verified

2014-08-30 Thread Anthony
Maybe something like:

def add_company(user_set, fields):
if 'registration_key' in fields and not fields['registration_key']:
for user in user_set.select():
dbs.company.update_or_insert(name=user.Company, created_by=user.
id)

dbs.auth_user._after_update.append(add_company)

So, whenever you explicitly set the registration_key of some records to 
blank, it will make inserts into the company table (though not if the 
record already exists).

Anthony

On Friday, August 29, 2014 1:32:55 PM UTC-4, asumal wrote:

 Hello everyone,

 My situation. I would like to approve every user that signs up with my 
 site. I understand that I should set the following to True (in db.py):

  auth.settings.registration_requires_approval = True


 After I approve the user, I would like to insert a value into the 
 database. I tried the following (in default.py):

 auth.settings.register_onaccept.append(lambda form: __add_company(form))

  

 def __add_company(form):
 print 'user.id', auth.user_id
 dbs.company.insert(name = form.vars.Company, created_by = 
 auth.user_id)


 However, this inserts the value when the user signs up and before I can 
 verify. Also, the auth.user_id is None because the user is not signed in. 
 Is there another way to do this? Is there a function that runs after an 
 update to the auth.user_id. 


-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: two forms submitted into the same cotroller

2014-08-30 Thread Massimo Di Pierro
I believe your problem is the XY 
problem. http://mywiki.wooledge.org/XyProblem
Y = submitting to forms to the same controller.
Do no ask about Y. What it your original problem X for which you think Y is 
a good solution?

On Saturday, 30 August 2014 15:24:16 UTC-5, Andrey K wrote:

 Hi Massimo,
 Here is my dilemma:
 I have one view with 3 tabs (DIVS), where I would like to have one tab for 
 user tool selection and two forms in 2 separated tabs(DIVs) : 1)static form 
 and 2)dynamic form(generated based on user selection in first tab). Also I 
 would like to submit all information from both forms into only one 
 controller as two separated peaces of data, where I can nicely parse it and 
 store in one record of the db.table, so it would be nice to have only one 
 button to trigger it.
 I have tried many ways but it did not work exactly the way I need it: 
 either I can't present two forms in separated view divs or I can't submit 
 both to only one controller. The last approach I had that did it almost the 
 thing was to use HTML5 _form attribute for all form elements and button and 
 related form _id attribute. But I have trouble submitting data back to the 
 controller that generate my dynamic form, added to DIV via 
 web2py_ajax_component.  
 Please help me out. What would be the way to make it in w2p?
  

-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] new web2py videos

2014-08-30 Thread Massimo DiPierro
Nico has helped edit and re-organize some my class lectures about web2py. They 
are now split into 30 small videos:

https://vimeo.com/album/3016728

Please join me in thanking Nico.

Massimo

-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Virtual Fields in auth_user?

2014-08-30 Thread Tim Korb
Did you ever get this working?  I tried the same thing, adding

Field.Virtual('last_first', lambda row: %s, %s % 
(row.auth_user.last_name, row.auth_user.first_name))

to auth.settings.extra_fields['auth_user'], but get the same error message 
when trying to build the SQLFORM.grid.

Tim


On Thursday, July 10, 2014 8:26:01 AM UTC-4, Fabiano Almeida wrote:

 Hi Massimo,

 I tried this:

 auth.settings.extra_fields['auth_user']= [
 ...
 Field('dept_grid', compute = lambda row: 
 Departamento[row['departamento_id']].nome if row['departamento_id'] else 
 None, label = 'Departamento'),
 Field.Virtual('dept_name', lambda row: 
 Departamento[row.departamento_id].nome if row.departamento_id else None, 
 label = 'Departamento')]

 The compute field work, the virtual field does not work. And the error by 
 calling the table in SQLFORM.grid:

 AttributeError: 'Row' object has no attribute 'dept_name'


 Can I use virtual field to display information from another table?

 Thanks,

 Fabiano.


 2014-07-10 3:55 GMT-03:00 Massimo Di Pierro massimo@gmail.com 
 javascript::

 auth.settings.extra_fields['auth_user'] = [Field.Virtual(), ... ]


 On Wednesday, 9 July 2014 13:14:14 UTC-5, Fabiano Almeida wrote:

 Hi again,

 It's possible insert virtual field in auth_user? how?

 thanks,

 Fabiano.

  -- 
 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-users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to web2py+un...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/d/optout.




-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] web2py database migration workflow

2014-08-30 Thread Diogo Munaro
Hey guys, I was thinking about web2py migrates and how control database 
version.

I did a workflow that take care of database version control and it's 
extensible for a lot of version controls (like git or mercurial, but by now 
only git) and databases (by now only mysql and postgres, but extensible 
too).

This workflow could be useful with Continuous Integration environment.

It's open for all kind of usage and is here for more 
information: https://github.com/dmvieira/web2py-migrate

I'll love collaboration and feedback ;)

Regards

-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py resources

2014-08-30 Thread Massimo Di Pierro
+ videos:

https://vimeo.com/album/3016728 

On Monday, 30 April 2012 14:49:41 UTC-5, Anthony wrote:

 Most web2py resources can be found on web2py.com, but here are some 
 Google Groups topics identifying additional resources:

 web2py help  resources 
 https://groups.google.com/d/msg/web2py/sne1n0WKh6k/elCU9OJ7O4cJ
 Plugins 
 https://groups.google.com/forum/?fromgroups#!topic/web2py/vGfyX_N9cRY
 Signature apps 
 https://groups.google.com/forum/#!topic/web2py/UiXfhtnQDtI/discussion
 Featured web2py apps 
 https://groups.google.com/d/topic/web2py/QGcDwD-Pe9I/discussion
 web2py hosting 
 https://groups.google.com/d/topic/web2py/e2SL5ViOhL4/discussion


-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] SQLFORM.accept is clobbering formstyle='bootstrap' when custom widgets are used

2014-08-30 Thread Jeremy Field
I believe this line 
https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L1499 in 
sqlhtml.py is disturbing the way formstyle_bootstrap displays custom 
widgets:

parent.components = [widget]


The older formstyles (table3cols, table2cols, etc) all wrap their 
controls within a dedicated tag, for example:

_controls = TD(controls, ...)
...
table.append(TR(_label, _controls, _help, _id=id))


In contrast, formstyle_bootstrap puts a help span as a *sibling* to the 
controls:

_help = SPAN(help, _class='help-block')
_controls = DIV(controls, *_help*, ...)
...
parent.append(DIV(label, _controls, ..., _id=id))


The result is that, when the form is submitted but has errors, i.e.:

   - form.accepts(...) returns False, and
   - fieldname is in request_vars,

the DIV which contained controls and _help now only contains the widget. 
The styling applied in formstyle_bootstrap is also lost, e.g.:

controls.add_class('span4')


A partial fix might be to wrap the controls in a redundant SPAN in 
formstyle_bootstrap:

_controls = DIV(SPAN(controls), _help, ...)

although this would not fix the styling problem.

Is this bug fixable while maintaining backward compatibility? Is there a 
fundamental impedance mismatch between the web2py and boostrap approaches 
to form layout? I have worked around the problem in my project to some 
extent with a custom formstyle, but am still affected by the styling 
problem.

Thanks for an otherwise glorious framework.

Regards,
Jeremy Field

-- 
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-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.