[web2py] 2.9.4 stable error when calling login_bare.

2014-03-07 Thread Anthony
Do you know how the null value got there?

-- 
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: How do I track who clicks a submit button?

2014-03-07 Thread Anthony
Each request is separate and independent. When a given user submits a form, a 
request is generated for that submit. In that request, the value of 
auth.user_id is the id of that particular user. When a different user submits 
the form, that generates an entirely new request, and in that request, the 
value of auth.user_id is the id of the second user (even if both submissions 
happen nearly  simultaneously).

Anthony

-- 
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: we2py google login - erroring out

2014-03-07 Thread Jayadevan M
Yes, it works. Thank you. I guess performance-wise, this must be slightly 
faster than my approach.

On Friday, March 7, 2014 10:15:26 PM UTC+5:30, Michele Comitini wrote:
>
> Jayadevan,
>
> Cosmetic changes in my patch:
>
> https://github.com/web2py/web2py/pull/391
>
> Can you check if this works for you?
>
> Thank you!
> mic
>
>
>
> 2014-03-07 14:21 GMT+01:00 Jayadevan M 
> >:
>
>> Looks like they changed to
>> application/json; charset=utf-8
>> I changed the code from 
>>
>> if not resp_type or resp_type == 'application/json':
>>
>> to 
>>
>> if not resp_type or 'application/json' in resp_type :
>> and it is working now. This looks OK?
>>
>>
>>
>> On Friday, March 7, 2014 6:07:08 PM UTC+5:30, Michele Comitini wrote:
>>
>>> What Content-type is the oauth response from google?
>>>
>>>
>>> 2014-03-07 13:25 GMT+01:00 Jayadevan M :
>>>
 Debugged and now we know this is where it is going - 
 tokendata = cgi.parse_qs(data)
 tokendata, after this line has the value 
 {}
 But the return string form google  is in proper json format. So for 
 some reason the parsing stopped working because of some minor change in 
 google auth's return format?


 On Friday, March 7, 2014 3:45:52 PM UTC+5:30, Jayadevan M wrote:
>
> We are using google login for authorization. Till a few hours ago, it 
> was working fine. All of a sudden (no code changes, nothing), we started 
> getting tickets. Error is 
> " Cannot parse oauth server response 
> {\n  "access_token" : "ya29.1.AADtN_Xz2PgzK2sZozKOvLlHP6QkDc.." 
> Anyone faced such issues? Any ideas?
>
  -- 
 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.

 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+un...@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] 2.9.4 stable error when calling login_bare.

2014-03-07 Thread Matt
HI there,

Just upgraded and ran immediately into the following error:

  File "/Projects/www/web2py/gluon/tools.py", line 2038, in login_bare

if not user.registration_key.strip() and password == \

AttributeError: 'NoneType' object has no attribute 'strip'

The registration_key for that particular user is null in the database. I 
notice that all of the other accounts have an empty string. Think that the 
framework should be able to detect the null and handle it if possible 
rather than assume it will always be there.

Hope that's possible.

Thanks in advance,

Matt

-- 
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: Problem doing a sortby in Smartgird

2014-03-07 Thread 黄祥
please use dict() when you deal with smartgrid that reference to another 
table 
*e.g. not tested *
def dailycounts():
fields = dict(daily_counts = [db.daily_counts.add_date, 
db.daily_counts.encrypt_count, 
  db.daily_counts.decrypt_count, db.daily_counts.error_count, 
  db.daily_counts.directory_create_count, 
db.daily_counts.client_add_count], 
  history = [db.history.client_id_dc, db.history.add_date, 
db.history.encryption_type, 
 db.history.out_filename] )
orderby = dict(daily_counts = ~db.dalily_counts.add_date, history = 
~db.history.add_date)
# similar to create = False, but you can make it flexible e.g. daily_counts 
= True, history = False
create = dict(daily_counts = False, history = False)
# similar to editable = False, but you can make it flexible e.g. 
daily_counts = True, history = False
editable = dict(daily_counts = False, history = False)
# similar to deletable = False, but you can make it flexible e.g. 
daily_counts = True, history = False
deletable = dict(daily_counts = False, history = False)
grid = SQLFORM.smartgrid(db.daily_counts, user_signature = False, 
create = create, editable = editable, 
 deletable = deletable, paginate = 10, orderby = orderby, fields = fields )
return locals()

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)
--- 
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: Problem doing a sortby in Smartgird

2014-03-07 Thread Dan Kozlowski
stifan,


I am still have trouble after following your example. All I want to do is
db.dalily_counts.add_date ~ and db.history.add_date ~ . Any chance you can
look at my code below and help ?

I appreciate it.





def dailycounts():
grid=SQLFORM.smartgrid(db.daily_counts, orderby=None,
  user_signature=False,create=False,editable=False,deletable=False,
paginate=10,
 
fields=[db.daily_counts.add_date,db.daily_counts.encrypt_count,db.daily_counts.decrypt_count,db.daily_counts.error_count,db.daily_counts.directory_create_count,db.daily_counts.client_add_count,
db.history.client_id_dc, db.history.add_date,
db.history.encryption_type,db.history.out_filename])
return locals()




On Fri, Mar 7, 2014 at 6:53 PM, 黄祥  wrote:

> you must set it on the dict for each table.
> e.g.
> *models/db.py*
> db.define_table('category',
> Field('name'),
> format = '%(name)s')
>
> db.define_table('product',
> Field('name'),
> Field('category', 'reference category'),
> format = '%(name)s')
>
> *controllers/default.py*
> def category():
> grid = SQLFORM.smartgrid(db.category, orderby = dict(category = ~
> db.category.name, product = db.product.name) )
> return locals()
>
> 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)
> ---
> 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/cSJjVIVcPXs/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] Re: current trunk using memdb results in crash

2014-03-07 Thread Leonardo Pires Felix
Looks like that this is happening with the REDIS too, Upgraded from 2.8.3 
to 2.9.4 And the error persist.

Traceback (most recent call last):
  File "/home/leonardo/domains/cef03.com/arquivos/web2py/gluon/restricted.py", 
line 217, in restricted
exec ccode in environment
  File 
"/home/leonardo/domains/cef03.com/arquivos/web2py/applications/cef03/models/db.py"
 , line 62, in 
session.connect(request, response, db = sessiondb)
  File "/home/leonardo/domains/cef03.com/arquivos/web2py/gluon/globals.py", 
line 883, in connect
row = table(record_id, unique_key=unique_key)
TypeError: __call__() got an unexpected keyword argument 'unique_key'





Em terça-feira, 4 de março de 2014 19h37min17s UTC-3, Sebastian Cambeo 
escreveu:
>
> I can only provide assistance for the "unique key error":
> line 883: https://github.com/web2py/web2py/blame/master/gluon/globals.py:
> dee4e6a9
>  
> »
>  
> mdipierro  
> 2013-08-20 new session logic 
>
>
> I don't know how the "int64 too big" error was introduced
>
>
>
> Am Dienstag, 4. März 2014 22:29:56 UTC+1 schrieb Massimo Di Pierro:
>>
>> can you provide a patch or a revision number that broke it?
>>
>> On Saturday, 1 March 2014 12:25:14 UTC-6, Bas Ti wrote:
>>>
>>> The current trunk does not support using memcache as session store on 
>>> GAE:
>>> session.connect calls memdb.Table.__call__(recordid, 
>>> unique_key=unique_key)
>>>
>>> however unique_key is not supported by memdb.Table, it is only supported 
>>> by dal.Table
>>>
>>

-- 
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] Complex css layout -- is web2py the right choice?

2014-03-07 Thread Austin Taylor
Hello,

I purchased this CSS template and I want to integrate web2py with it 
(because I love web2py).
http://www.4templates.com/website-templates/726353988-WT00926/#green

It has multiple html files it references, js files, and css sheets.
Index.html located here: http://pastebin.com/zbnWjs1v


How would I be able to normalize this enough to where I can extend the 
"layout.html" into other sheets and use all of the .js/css that comes with 
it?

I've tried for 2 days now and I keep running into issues. Even when I try 
to just return locals() (if I put the index.html in views) it still doesn't 
apply the css sheets. I've tried using {{=URL('static','css/style.css')")}} 
with no luck either.

Please help me find the best way to make this page normal.


-- 
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: Problem doing a sortby in Smartgird

2014-03-07 Thread 黄祥
you must set it on the dict for each table.
e.g.
*models/db.py*
db.define_table('category', 
Field('name'), 
format = '%(name)s')

db.define_table('product', 
Field('name'), 
Field('category', 'reference category'), 
format = '%(name)s')

*controllers/default.py*
def category():
grid = SQLFORM.smartgrid(db.category, orderby = dict(category = 
~db.category.name, product = db.product.name) )
return locals()

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)
--- 
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: smartgrid orderby descending

2014-03-07 Thread Dan Kozlowski
Jake,

Did you ever get this to work ? Reason being I think I have the same 
problem.


On Sunday, April 21, 2013 9:47:59 AM UTC-5, Jake Lowen wrote:
>
> In a normal grid the orderby descending works just fine:
>
> grid = SQLFORM.grid(db.meetings,
> orderby=~db.meetings.meeting_date,
> )
>
> But I can't get the parent table of a smart group to sort the same way:
>
> grid = SQLFORM.smartgrid(db.meetings,
> linked_tables=['meeting_docs'],
> orderby=dict(parent=~db.meetings.meeting_date, child=None),
> )
>
> What is the correct syntax to descent sort the parent table in a smartgrid?
>

-- 
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] Problem doing a sortby in Smartgird

2014-03-07 Thread Dan Kozlowski
I have had this problem since last year and it never got resolved. I have a 
smartgird that I need to oder by date in dec order. The grid works fine 
until I select a child link. It the tells me query not supported. I hope 
some can help.




-- 
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: How do I track who clicks a submit button?

2014-03-07 Thread User
What does the submit button do?

On Friday, March 7, 2014 6:20:46 PM UTC-5, Austin Taylor wrote:
>
> Thank you so much, Anthony. What if I have multiple users logged in? 
> How would I store their ID upon clicking? Sorry I'm still learning I 
> know that is a noob question. 
>
> On Fri, Mar 7, 2014 at 5:54 PM, Anthony > 
> wrote: 
> > Depends on your goals. If we're talking about a SQLFORM based on a db 
> table, 
> > it might make more sense to have a created_by and/or modified_by field 
> in 
> > the table. The field(s) could be set to readable=writable=False, and set 
> the 
> > default to auth.user_id. Whenever a record is inserted or updated, you 
> then 
> > have the id of the user. 
> > 
> > In any case, the current logged in user's id is in auth.user_id (which 
> is 
> > None if the user isn't logged in), so you could store that wherever you 
> like 
> > upon form submission. 
> > 
> > Anthony 
> > 
> > 
> > On Friday, March 7, 2014 5:01:03 PM UTC-5, Austin Taylor wrote: 
> >> 
> >> I'm trying to figure out a way to track users who click the submit 
> button. 
> >> Maybe using their db.auth_user.username and appending it to a list 
> whenever 
> >> they click submit? I literally just have no idea where to start and any 
> >> advice would be appreciated. 
> >> 
> >> Best, 
> >> 
> >> Austin 
> > 
> > -- 
> > 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/JQayRnZibYA/unsubscribe. 
> > To unsubscribe from this group and all its topics, send an email to 
> > web2py+un...@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] Understanding translation and accept-language header?

2014-03-07 Thread User
I made a bare bones app based on the welcome app:

In db.py:
T.current_languages = ['en']


in en-us.py:
# -*- coding: utf-8 -*-
{
'!langcode!': 'en-us',
'!langname!': 'English (American)',
'xyztest': 'Pass! (US English)'
}

in en-gb.py:
# -*- coding: utf-8 -*-
{
'!langcode!': 'en-gb',
'!langname!': 'English (British)',

'xyztest': 'Pass! (UK)'

}


In a view:
Language testing:
string: {{=T('xyztest')}}
current_languages: {{=T.current_languages}}
T.http_accept_language: {{=T.http_accept_language}}
T.accepted_language: {{=T.accepted_language}}


The rendered output of this is:

string: *xyztest*
T.current_languages: ['en']
T.http_accept_language: en-us,en;q=0.5
T.accepted_language: en-us

Why does this not get translated? By contrast, if I set my browser accept 
language to include en-gb the rendered output is:

string:* Pass! (UK)*
T.current_languages: ['en']
T.http_accept_language: en-gb,en-us;q=0.7,en;q=0.3
T.accepted_language: en-gb


-- 
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: How do I track who clicks a submit button?

2014-03-07 Thread Austin Taylor
Thank you so much, Anthony. What if I have multiple users logged in?
How would I store their ID upon clicking? Sorry I'm still learning I
know that is a noob question.

On Fri, Mar 7, 2014 at 5:54 PM, Anthony  wrote:
> Depends on your goals. If we're talking about a SQLFORM based on a db table,
> it might make more sense to have a created_by and/or modified_by field in
> the table. The field(s) could be set to readable=writable=False, and set the
> default to auth.user_id. Whenever a record is inserted or updated, you then
> have the id of the user.
>
> In any case, the current logged in user's id is in auth.user_id (which is
> None if the user isn't logged in), so you could store that wherever you like
> upon form submission.
>
> Anthony
>
>
> On Friday, March 7, 2014 5:01:03 PM UTC-5, Austin Taylor wrote:
>>
>> I'm trying to figure out a way to track users who click the submit button.
>> Maybe using their db.auth_user.username and appending it to a list whenever
>> they click submit? I literally just have no idea where to start and any
>> advice would be appreciated.
>>
>> Best,
>>
>> Austin
>
> --
> 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/JQayRnZibYA/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] Re: How do I track who clicks a submit button?

2014-03-07 Thread Anthony
Depends on your goals. If we're talking about a SQLFORM based on a db 
table, it might make more sense to have a created_by and/or modified_by 
field in the table. The field(s) could be set to readable=writable=False, 
and set the default to auth.user_id. Whenever a record is inserted or 
updated, you then have the id of the user.

In any case, the current logged in user's id is in auth.user_id (which is 
None if the user isn't logged in), so you could store that wherever you 
like upon form submission.

Anthony

On Friday, March 7, 2014 5:01:03 PM UTC-5, Austin Taylor wrote:
>
> I'm trying to figure out a way to track users who click the submit button. 
> Maybe using their db.auth_user.username and appending it to a list whenever 
> they click submit? I literally just have no idea where to start and any 
> advice would be appreciated.
>
> Best,
>
> Austin
>

-- 
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: Example of web2py integration with an AJAX grid (preferably jquery based) which updates backend db ?

2014-03-07 Thread Simon Ashley
Try the simple things first (good exercise in debugging):


   1. ensure that jeditable is being loaded (check the code, and paths)
   2. if that passes, put a breakpoint (and the debugger) on the second 
   line (beginning with* id, column*) of *upd_dog_name*.
  1. check what *request.vars* are being passed (you can also use the 
  console, toward the bottom of the debug page to query variables)
   

>>

-- 
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: Pre-registering users

2014-03-07 Thread Jim Steil
I'm in agreement that you should use the web2py auth tables.  What I was
suggesting is the you don't 'pre-register' the user in the auth tables
until they actually sign in and create their account.  After the user
actually registers, intercept the next page they are going to and setup the
permissions then based on the email that you cached in a table when the
initial notification came out.

Does that make any sense, or am I misunderstanding or not articulating my
point well enough?

-Jim


On Fri, Mar 7, 2014 at 2:29 PM, Horst Horst  wrote:

> I'd prefer to use the auth tables which are already in place, because
> eventually not only permissions, but also group membership of the invited
> user should be pre-arranged depending on the permissions and memberships of
> the inviting user.
>
> It seems rather simple to me: Instead of creating a new user, the existing
> placeholder user (who has only the email address field filled in) would be
> updated on registration.
>
> Am Freitag, 7. März 2014 15:25:06 UTC+1 schrieb Jim S:
>>
>> I would play around with this:
>>
>> auth.settings.register_next
>>
>>
>> First off, I wouldn't 'pre-register' my users.  Rather, I would put their 
>> email address in a table and have it sit there until they register.  In the 
>> controller pointed to by the statement above I'd then check to see if the 
>> email for the new registration was in the table.  If so, setup the required 
>> permissions then.  Once that controller is done, redirect them where they 
>> need to go.
>>
>>
>> ...just my thoughts on your issue.
>>
>>
>> -Jim
>>
>>
>>
>> On Friday, March 7, 2014 8:14:21 AM UTC-6, Horst Horst wrote:
>>>
>>> I'd like to implement a feature similar to sharing Google docs or
>>> Dropbox: If you share something with a non-registered user, he gets a
>>> notification email, but once he signed up, the permissions are already in
>>> place.
>>>
>>> Programmatically registering users should be no problem, but how can I
>>> show the registration form on their first visit, and have it not complain
>>> about the email being already present?
>>>
>>  --
> 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/da8gqfLFoYU/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] How do I track who clicks a submit button?

2014-03-07 Thread Austin Taylor
I'm trying to figure out a way to track users who click the submit button. 
Maybe using their db.auth_user.username and appending it to a list whenever 
they click submit? I literally just have no idea where to start and any 
advice would be appreciated.

Best,

Austin

-- 
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: meta.description = None?

2014-03-07 Thread User
Issue created: http://code.google.com/p/web2py/issues/detail?id=1891

On Friday, March 7, 2014 4:34:54 PM UTC-5, User wrote:
>
>
> On Friday, March 7, 2014 4:08:56 PM UTC-5, Anthony wrote:
>>
>> On Friday, March 7, 2014 2:58:19 PM UTC-5, User wrote:
>>>
>>> That works and I have done that but it still doesn't address that 
>>> setting description to None prints out the string "None". 
>>>
>>
>> Why would you explicitly set it to None rather than (a) not setting it at 
>> all or (b) deleting the key using del? By default, response.meta is empty, 
>> so if you explicitly add a key to it, the assumption is that you want that 
>> key included.
>>
>>  That behavior doesn't seem correct to me.  Also the welcome app default 
>>> setting is not google friendly.
>>>
>>
>>
> del was what I was looking for,  it didn't dawn on me to use this or 
> whether this would break anything.  But I agree I have removed it from 
> menu.py as there is zero benefit to having a fixed meta description 
> throughout the site.
>
>  
>
>>

-- 
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: meta.description = None?

2014-03-07 Thread User

On Friday, March 7, 2014 4:08:56 PM UTC-5, Anthony wrote:
>
> On Friday, March 7, 2014 2:58:19 PM UTC-5, User wrote:
>>
>> That works and I have done that but it still doesn't address that setting 
>> description to None prints out the string "None". 
>>
>
> Why would you explicitly set it to None rather than (a) not setting it at 
> all or (b) deleting the key using del? By default, response.meta is empty, 
> so if you explicitly add a key to it, the assumption is that you want that 
> key included.
>
>  That behavior doesn't seem correct to me.  Also the welcome app default 
>> setting is not google friendly.
>>
>
>
del was what I was looking for,  it didn't dawn on me to use this or 
whether this would break anything.  But I agree I have removed it from 
menu.py as there is zero benefit to having a fixed meta description 
throughout the site.

 

>

-- 
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: meta.description = None?

2014-03-07 Thread Anthony
On Friday, March 7, 2014 2:58:19 PM UTC-5, User wrote:
>
> That works and I have done that but it still doesn't address that setting 
> description to None prints out the string "None". 
>

Why would you explicitly set it to None rather than (a) not setting it at 
all or (b) deleting the key using del? By default, response.meta is empty, 
so if you explicitly add a key to it, the assumption is that you want that 
key included.

 That behavior doesn't seem correct to me.  Also the welcome app default 
> setting is not google friendly.
>

The meta values in menu.py are intended as an example -- they should be 
customized or deleted. The default is "a cool new app", so clearly it is 
not intended to be used as is. I wouldn't object to removing 
response.meta.description, though, as it probably makes more sense to set 
that in particular controllers or views. Maybe add a Google Code issue 
suggesting that.

Anthony

-- 
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: Pre-registering users

2014-03-07 Thread Horst Horst
I'd prefer to use the auth tables which are already in place, because 
eventually not only permissions, but also group membership of the invited 
user should be pre-arranged depending on the permissions and memberships of 
the inviting user.

It seems rather simple to me: Instead of creating a new user, the existing 
placeholder user (who has only the email address field filled in) would be 
updated on registration.

Am Freitag, 7. März 2014 15:25:06 UTC+1 schrieb Jim S:
>
> I would play around with this:
>
> auth.settings.register_next
>
>
> First off, I wouldn't 'pre-register' my users.  Rather, I would put their 
> email address in a table and have it sit there until they register.  In the 
> controller pointed to by the statement above I'd then check to see if the 
> email for the new registration was in the table.  If so, setup the required 
> permissions then.  Once that controller is done, redirect them where they 
> need to go.
>
>
> ...just my thoughts on your issue.
>
>
> -Jim
>
>
>
> On Friday, March 7, 2014 8:14:21 AM UTC-6, Horst Horst wrote:
>>
>> I'd like to implement a feature similar to sharing Google docs or 
>> Dropbox: If you share something with a non-registered user, he gets a 
>> notification email, but once he signed up, the permissions are already in 
>> place.
>>
>> Programmatically registering users should be no problem, but how can I 
>> show the registration form on their first visit, and have it not complain 
>> about the email being already present?
>>
>

-- 
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] Problem with upgrade to 2.9.4 with SQLTABLE

2014-03-07 Thread drayco
All code work with web2py 2.8.3 but when we upgrade to web2py 2.9.4, we use 
extensive SQLTABLE and in this moment we have a lot of errors similar to

File "/home/drayco/webapps/newconfig/web2py/gluon/sqlhtml.py", line 2929, in 
__init__
columns = 
['.'.join(sqlrows.db._adapter.REGEX_TABLE_DOT_FIELD.match(c).groups()) for c in 
sqlrows.colnames]
AttributeError: 'NoneType' object has no attribute 'groups'


This is our code

totalPagos = 
SQLTABLE(db((db.pagos.created_on>inicio)&(db.pagos.created_onhttp://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: meta.description = None?

2014-03-07 Thread User
That works and I have done that but it still doesn't address that setting 
description to None prints out the string "None".  That behavior doesn't 
seem correct to me.  Also the welcome app default setting is not google 
friendly.

On Friday, March 7, 2014 2:16:35 PM UTC-5, Anthony wrote:
>
> Just remove the response.meta.description line from menu.py.
>
> Anthony
>
> On Friday, March 7, 2014 1:02:10 PM UTC-5, User wrote:
>>
>> Sometimes I want to completely remove the meta description tag (as this 
>> is one of the recommended options according to Google: 
>> http://www.youtube.com/watch?v=W4gr88oHb-k)
>>
>> For example I have a default meta description tag defined in menu.py (as 
>> is in the welcome app).  Then in a specific controller function I'd like to 
>> remove that meta description tag so I try:
>>
>> response.meta.description = None
>>
>> However instead of completely removing the meta tag from the rendered 
>> html this produces:
>>
>> 
>>
>> which seems kind of pointless.  So three things:
>>
>> 1. What is a workaround to remove the meta description tag from a 
>> controller?
>>
>> 2. What about changing web2py so when response.meta.description = None, 
>> there is no meta tag output?
>>
>> 3. What about completely removing the response.meta.description from the 
>> welcome app, since according to Google, duplicate meta description tags are 
>> a bad thing and having no tag is better than having a duplicate tag?
>>
>>

-- 
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 v2.9.3: KeyError: 'Cannot resolve reference subject_subject in contract_contract definition'

2014-03-07 Thread Anthony
Probably a bug. Please report on Google Code.

Anthony

On Friday, March 7, 2014 12:59:20 PM UTC-5, Donatas Burba wrote:
>
> Because everything was fine with 2.8.2, I was surprised when it stopped 
> working after upgrade to 2.9.3 (ant 2.9.4). So I wonder if it is a new 
> "feature" or bug.
>
> 2014 m. kovas 7 d., penktadienis 15:37:50 UTC+2, Anthony rašė:
>>
>> On Friday, March 7, 2014 5:12:15 AM UTC-5, Tim Richardson wrote:
>>>
>>>
>>>
>>> On Thursday, 6 March 2014 13:09:18 UTC+11, Anthony wrote:

 But I believe you should be able to define tables out of order (i.e., 
 define the referenced table after the referencing table).

>>>
>>> Only when lazy_tables = True
>>>
>>
>> No, it should be supported regardless of lazy_tables (in fact, the 
>> capability was there long before lazy_tables even existed). See 
>> https://groups.google.com/d/msg/web2py-developers/cU_ZpBAOXAU/6Hx2OPxEDuIJ. 
>> If it doesn't work, something has broken.
>>
>> Anthony 
>>
>

-- 
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: meta.description = None?

2014-03-07 Thread Anthony
Just remove the response.meta.description line from menu.py.

Anthony

On Friday, March 7, 2014 1:02:10 PM UTC-5, User wrote:
>
> Sometimes I want to completely remove the meta description tag (as this is 
> one of the recommended options according to Google: 
> http://www.youtube.com/watch?v=W4gr88oHb-k)
>
> For example I have a default meta description tag defined in menu.py (as 
> is in the welcome app).  Then in a specific controller function I'd like to 
> remove that meta description tag so I try:
>
> response.meta.description = None
>
> However instead of completely removing the meta tag from the rendered html 
> this produces:
>
> 
>
> which seems kind of pointless.  So three things:
>
> 1. What is a workaround to remove the meta description tag from a 
> controller?
>
> 2. What about changing web2py so when response.meta.description = None, 
> there is no meta tag output?
>
> 3. What about completely removing the response.meta.description from the 
> welcome app, since according to Google, duplicate meta description tags are 
> a bad thing and having no tag is better than having a duplicate tag?
>
>

-- 
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] Make grid view larger & add scroll bar to top

2014-03-07 Thread Austin Taylor
Hello,

I'm using grid=SQLFORM.grid(db.table)

I want to know how to make the form it returns larger? I have looked all 
over for the CSS and I can't find it. It just says width 100% for 
.web2py_grid

Is there a way to make the overall layout larger since I have a bigger 
table, and is it possible to add a scroll bar to the top so I don't have to 
scroll all the way to the bottom to scroll to the right? Fixed headers 
would be nice too, but I'll keep trying to figure that out.

Thank you!!

-Austin

-- 
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] meta.description = None?

2014-03-07 Thread User
Sometimes I want to completely remove the meta description tag (as this is 
one of the recommended options according to Google: 
http://www.youtube.com/watch?v=W4gr88oHb-k)

For example I have a default meta description tag defined in menu.py (as is 
in the welcome app).  Then in a specific controller function I'd like to 
remove that meta description tag so I try:

response.meta.description = None

However instead of completely removing the meta tag from the rendered html 
this produces:



which seems kind of pointless.  So three things:

1. What is a workaround to remove the meta description tag from a 
controller?

2. What changing web2py so when response.meta.description = None, there is 
no meta tag output?

3. What about completely removing the response.meta.description from the 
welcome app, since according to Google, duplicate meta description tags are 
a bad thing and having no tag is better than having a duplicate tag?

-- 
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 v2.9.3: KeyError: 'Cannot resolve reference subject_subject in contract_contract definition'

2014-03-07 Thread Donatas Burba
Because everything was fine with 2.8.2, I was surprised when it stopped 
working after upgrade to 2.9.3 (ant 2.9.4). So I wonder if it is a new 
"feature" or bug.

2014 m. kovas 7 d., penktadienis 15:37:50 UTC+2, Anthony rašė:
>
> On Friday, March 7, 2014 5:12:15 AM UTC-5, Tim Richardson wrote:
>>
>>
>>
>> On Thursday, 6 March 2014 13:09:18 UTC+11, Anthony wrote:
>>>
>>> But I believe you should be able to define tables out of order (i.e., 
>>> define the referenced table after the referencing table).
>>>
>>
>> Only when lazy_tables = True
>>
>
> No, it should be supported regardless of lazy_tables (in fact, the 
> capability was there long before lazy_tables even existed). See 
> https://groups.google.com/d/msg/web2py-developers/cU_ZpBAOXAU/6Hx2OPxEDuIJ. 
> If it doesn't work, something has broken.
>
> Anthony 
>

-- 
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: we2py google login - erroring out

2014-03-07 Thread Omar Meat Boy Gutiérrez

Both solutions work great. Thanks Jayadevan M and Michele Comitini


On Friday, March 7, 2014 10:45:26 AM UTC-6, Michele Comitini wrote:
>
> Jayadevan,
>
> Cosmetic changes in my patch:
>
> https://github.com/web2py/web2py/pull/391
>
> Can you check if this works for you?
>
> Thank you!
> mic
>
>
>
> 2014-03-07 14:21 GMT+01:00 Jayadevan M 
> >:
>
>> Looks like they changed to
>> application/json; charset=utf-8
>> I changed the code from 
>>
>> if not resp_type or resp_type == 'application/json':
>>
>> to 
>>
>> if not resp_type or 'application/json' in resp_type :
>> and it is working now. This looks OK?
>>
>>
>>
>> On Friday, March 7, 2014 6:07:08 PM UTC+5:30, Michele Comitini wrote:
>>
>>> What Content-type is the oauth response from google?
>>>
>>>
>>> 2014-03-07 13:25 GMT+01:00 Jayadevan M :
>>>
 Debugged and now we know this is where it is going - 
 tokendata = cgi.parse_qs(data)
 tokendata, after this line has the value 
 {}
 But the return string form google  is in proper json format. So for 
 some reason the parsing stopped working because of some minor change in 
 google auth's return format?


 On Friday, March 7, 2014 3:45:52 PM UTC+5:30, Jayadevan M wrote:
>
> We are using google login for authorization. Till a few hours ago, it 
> was working fine. All of a sudden (no code changes, nothing), we started 
> getting tickets. Error is 
> " Cannot parse oauth server response 
> {\n  "access_token" : "ya29.1.AADtN_Xz2PgzK2sZozKOvLlHP6QkDc.." 
> Anyone faced such issues? Any ideas?
>
  -- 
 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.

 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+un...@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: we2py google login - erroring out

2014-03-07 Thread Michele Comitini
Jayadevan,

Cosmetic changes in my patch:

https://github.com/web2py/web2py/pull/391

Can you check if this works for you?

Thank you!
mic



2014-03-07 14:21 GMT+01:00 Jayadevan M :

> Looks like they changed to
> application/json; charset=utf-8
> I changed the code from
>
> if not resp_type or resp_type == 'application/json':
>
> to
>
> if not resp_type or 'application/json' in resp_type :
> and it is working now. This looks OK?
>
>
>
> On Friday, March 7, 2014 6:07:08 PM UTC+5:30, Michele Comitini wrote:
>
>> What Content-type is the oauth response from google?
>>
>>
>> 2014-03-07 13:25 GMT+01:00 Jayadevan M :
>>
>>> Debugged and now we know this is where it is going -
>>> tokendata = cgi.parse_qs(data)
>>> tokendata, after this line has the value
>>> {}
>>> But the return string form google  is in proper json format. So for some
>>> reason the parsing stopped working because of some minor change in google
>>> auth's return format?
>>>
>>>
>>> On Friday, March 7, 2014 3:45:52 PM UTC+5:30, Jayadevan M wrote:

 We are using google login for authorization. Till a few hours ago, it
 was working fine. All of a sudden (no code changes, nothing), we started
 getting tickets. Error is
 " Cannot parse oauth server response
 {\n  "access_token" : "ya29.1.AADtN_Xz2PgzK2sZozKOvLlHP6QkDc.." Anyone
 faced such issues? Any ideas?

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

-- 
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: we2py google login - erroring out

2014-03-07 Thread Michele Comitini
Sounds correct to me.

I will make a patch for trunk.




2014-03-07 14:21 GMT+01:00 Jayadevan M :

> Looks like they changed to
> application/json; charset=utf-8
> I changed the code from
>
> if not resp_type or resp_type == 'application/json':
>
> to
>
> if not resp_type or 'application/json' in resp_type :
> and it is working now. This looks OK?
>
>
>
> On Friday, March 7, 2014 6:07:08 PM UTC+5:30, Michele Comitini wrote:
>
>> What Content-type is the oauth response from google?
>>
>>
>> 2014-03-07 13:25 GMT+01:00 Jayadevan M :
>>
>>> Debugged and now we know this is where it is going -
>>> tokendata = cgi.parse_qs(data)
>>> tokendata, after this line has the value
>>> {}
>>> But the return string form google  is in proper json format. So for some
>>> reason the parsing stopped working because of some minor change in google
>>> auth's return format?
>>>
>>>
>>> On Friday, March 7, 2014 3:45:52 PM UTC+5:30, Jayadevan M wrote:

 We are using google login for authorization. Till a few hours ago, it
 was working fine. All of a sudden (no code changes, nothing), we started
 getting tickets. Error is
 " Cannot parse oauth server response
 {\n  "access_token" : "ya29.1.AADtN_Xz2PgzK2sZozKOvLlHP6QkDc.." Anyone
 faced such issues? Any ideas?

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

-- 
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: Example of web2py integration with an AJAX grid (preferably jquery based) which updates backend db ?

2014-03-07 Thread Mark Billion
I am sure I am an idiot, but when I hit enter to update (ie, petunia to 
petuniatest), it reverts back to the same old dog name (petunia).  

def dogs():
db.dogs.dog_name.represent = lambda value, row: DIV(value if value else 
'-',_class='dog_name', _id=str(row.id)+'.dog_name')
g = SQLFORM.grid(db.dogs, searchable=False, csv=False, 
user_signature=False)
return dict(form = g)


def upd_dog_name():
id,column = request.post_vars.id.split('.')
value = request.post_vars.value
db(db.dogs.id == id).update(**{column:value})
return value

{{extend 'layout.html'}}


jQuery(document).ready(function(){
jQuery('.dog_name').editable("{{=URL('dogs', 
'upd_dog_name')}}",{   
tooltip: "Click to edit, enter to save",
 indicator : 'updating',
 });})




{{=form}}


db.define_table('dogs',
Field('dog_name','string'))





On Monday, September 2, 2013 8:10:59 PM UTC-4, Tim Richardson wrote:
>
> Can anyone provide tutorial/example of a web2py implementation of an AJAX 
> grid which updates records? web2py slices has jqgrid in read only mode, 
> (although the example doesn't work out of the box anymore).
> My learning curve is working out good ways to send update requests back to 
> the server, however pretty sure this wheel is already invented.
>
> Overall, I want to have the skills to add inline editing to my web2py apps 
> and I think using a javascript grid is the only realistic way to do 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: Pre-registering users

2014-03-07 Thread Jim S
I would play around with this:

auth.settings.register_next


First off, I wouldn't 'pre-register' my users.  Rather, I would put their email 
address in a table and have it sit there until they register.  In the 
controller pointed to by the statement above I'd then check to see if the email 
for the new registration was in the table.  If so, setup the required 
permissions then.  Once that controller is done, redirect them where they need 
to go.


...just my thoughts on your issue.


-Jim



On Friday, March 7, 2014 8:14:21 AM UTC-6, Horst Horst wrote:
>
> I'd like to implement a feature similar to sharing Google docs or Dropbox: 
> If you share something with a non-registered user, he gets a notification 
> email, but once he signed up, the permissions are already in place.
>
> Programmatically registering users should be no problem, but how can I 
> show the registration form on their first visit, and have it not complain 
> about the email being already present?
>

-- 
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] Pre-registering users

2014-03-07 Thread Horst Horst
I'd like to implement a feature similar to sharing Google docs or Dropbox: 
If you share something with a non-registered user, he gets a notification 
email, but once he signed up, the permissions are already in place.

Programmatically registering users should be no problem, but how can I show 
the registration form on their first visit, and have it not complain about 
the email being already present?

-- 
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 v2.9.3: KeyError: 'Cannot resolve reference subject_subject in contract_contract definition'

2014-03-07 Thread Anthony
On Friday, March 7, 2014 5:12:15 AM UTC-5, Tim Richardson wrote:
>
>
>
> On Thursday, 6 March 2014 13:09:18 UTC+11, Anthony wrote:
>>
>> But I believe you should be able to define tables out of order (i.e., 
>> define the referenced table after the referencing table).
>>
>
> Only when lazy_tables = True
>

No, it should be supported regardless of lazy_tables (in fact, the 
capability was there long before lazy_tables even existed). See 
https://groups.google.com/d/msg/web2py-developers/cU_ZpBAOXAU/6Hx2OPxEDuIJ. 
If it doesn't work, something has broken.

Anthony 

-- 
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: wcscpy_s error back in 2.9.4 release

2014-03-07 Thread Massimo Di Pierro
Please open a ticket. This needs to be fixed.

On Thursday, 6 March 2014 19:32:34 UTC-6, mke...@halstead.com wrote:
>
> I just downloaded version 2.9.4 onto a Windows XP Professional Service 
> Pack 3 machine and get the error "The procedure entry point wcscpy_s could 
> not be located in the dynamic link library msvcrt.dll" when I execute 
> web2py.exe
>

-- 
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: Can I specify a display name in emails sent via auth.settings.mailer?

2014-03-07 Thread Massimo Di Pierro
You can only if your SMTP server accepts it.

On Thursday, 6 March 2014 18:12:05 UTC-6, User wrote:
>
> Anyone?
>
> On Wednesday, February 5, 2014 6:26:01 PM UTC-5, User wrote:
>>
>> I would like the from address of automated emails for user registration, 
>> retrieve password, etc to have a display name.  How can I do this?
>>
>> Currently my mailer is defined similar to:
>>
>> mail = auth.settings.mailer
>> mail.settings.server = 'logging' or 'smtp.gmail.com:587'
>> mail.settings.sender = 'i...@example.com' 
>>
>> Can I do something like this?
>>
>> mail.settings.sender = 'Company ...@example.com>' 
>>
>> I saw this related post: 
>> https://groups.google.com/forum/#!topic/web2py/GCY_jQusDKk but that is 
>> only discussing the mail.send() method I believe
>>
>

-- 
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: session not recognising membership

2014-03-07 Thread Massimo Di Pierro
rect. Or call:

auth.update_groups()

On Thursday, 6 March 2014 11:10:32 UTC-6, Niphlod wrote:
>
> Seem to recall that groups are only added to session at the login time 
> (i.e. if you login, then add membership, you won't find them in session). 
> Did you try to logout and login ?
>
> On Thursday, March 6, 2014 10:30:16 AM UTC+1, Johann Spies wrote:
>>
>> What can cause session on my server to not recognise my membership of 
>> groups?
>>
>> auth:
>> expiration:
>> 2592000
>> hmac_key :
>> c1f0ee87-9945-43b2-8653-88df476a88df
>> last_visit:
>> datetime.datetime(2014, 3, 3, 11, 58, 9, 804045)
>> remember:
>> True
>> user :
>> created_on:
>> None
>> email :
>> jsp...@sun.ac.za
>> first_name: 
>> Johann
>> id:
>> 2L
>> last_name :
>> Spies
>> modified_on:
>> datetime.datetime(2013, 5, 9, 8, 7, 47)
>> registration_id:
>> 1234
>> registration_key:
>> reset_password_key:
>> username:
>> johann.spies
>> user_groups:
>>
>>
>>
>> while auth_membership shows:
>>
>> auth_membership.id
>> auth_membership.user_id
>>  
>> auth_membership.group_id
>>
>>
>>
>>
>>
>>
>>
>>
>> 7 
>> johann.spies 
>> kb_ed 
>> (1) 
>>
>>
>>
>>
>>
>> 10 
>> johann.spiesmanagers
>>  
>> (4)  
>> 12
>> johann.spieswiki_editor
>>  
>> (6)  
>>
>>
>> On my develop computer there is no similar problem.
>>
>>
>> Regards
>> Johann
>> -- 
>> Because experiencing your loyal love is better than life itself, 
>> my lips will praise you.  (Psalm 63:3)
>>  
>

-- 
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: we2py google login - erroring out

2014-03-07 Thread Jayadevan M
Looks like they changed to
application/json; charset=utf-8
I changed the code from 

if not resp_type or resp_type == 'application/json':

to 

if not resp_type or 'application/json' in resp_type :
and it is working now. This looks OK?


On Friday, March 7, 2014 6:07:08 PM UTC+5:30, Michele Comitini wrote:
>
> What Content-type is the oauth response from google?
>
>
> 2014-03-07 13:25 GMT+01:00 Jayadevan M 
> >:
>
>> Debugged and now we know this is where it is going - 
>> tokendata = cgi.parse_qs(data)
>> tokendata, after this line has the value 
>> {}
>> But the return string form google  is in proper json format. So for some 
>> reason the parsing stopped working because of some minor change in google 
>> auth's return format?
>>
>>
>> On Friday, March 7, 2014 3:45:52 PM UTC+5:30, Jayadevan M wrote:
>>>
>>> We are using google login for authorization. Till a few hours ago, it 
>>> was working fine. All of a sudden (no code changes, nothing), we started 
>>> getting tickets. Error is 
>>> " Cannot parse oauth server response {\n  
>>> "access_token" : "ya29.1.AADtN_Xz2PgzK2sZozKOvLlHP6QkDc.." Anyone faced 
>>> such issues? Any ideas?
>>>
>>  -- 
>> 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 .
>> 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] Re: wcscpy_s error back in 2.9.4 release

2014-03-07 Thread Leonel Câmara
Just use the source code instead of the binary version of web2py. 

-- 
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: recaptcha doesn't work in a component (LOAD)

2014-03-07 Thread Michele Comitini
If you can ajax LOAD a whole form you can use this to add a recaptcha
easily:

http://www.web2pyslices.com/slice/show/1584/adding-a-recaptcha-to-a-form




2014-03-07 2:09 GMT+01:00 Tim Richardson :

>
>
> On Friday, 7 March 2014 03:22:56 UTC+11, Paolo Valleri wrote:
>>
>> I agree with lightdot, the parameter is redundant.
>> Mind that recaptcha library is splitted into two files, the first one
>> (challenge) internally load a second one (recaptcha_canary.js). You made
>> the former to be loaded with "ajax", the second is loaded dynamically in
>> both the cases. Moreover the real library belongs to the second file, the
>> first one contains only a few line of code
>>
>
> Going over my head a bit. It seems that in the non-ajax api the first
> Recaptcha script rewrites the document to inject the canary code, and this
> doesn't happen when the script is itself loaded via ajax (as in a
> component). How it works is up to Google, I just followed their ajax api.
>
> It seems to me that
> a) we could completely move to using the ajax API (so my new parameter is
> redundant since it's the only way we do it)
> b) auto-detect ajax
> c) let the developer choose
>
> (c) may be a temporary solution until we know that it works. Plus, we
> already ask the developer to specify ajax functionality in other places, so
> I'm not sure it's a big deal.
> Personally, I'd like to go with the new parameter, which has a safe
> default, mark it as experimental which is a licence to remove it, and
> revisit it after it's had wider testing.
>
> As for 'people who want to use ajax can make a load component out of it',
> that was what I was confronted with, but then I thought "LOAD is a web2py
> feature, and a good one, so is Recaptcha. It's a bug that one doesn't work
> with the other."
>
>
>
>
>
>
>
>>
>>  Paolo
>>
>>
>> 2014-03-06 13:33 GMT+01:00 LightDot :
>>
>> Well, if people want to use ajax for the recaptcha, they can make a load
>>> component out of it. I think that the parameter really is redundant...
>>>
>>> Anyway, thanks for spotting & fixing this.
>>>
>>> Regards
>>>
>>>
>>>
>>> On Thursday, March 6, 2014 11:56:40 AM UTC+1, Tim Richardson wrote:



 On Thursday, 6 March 2014 18:29:40 UTC+11, Paolo Valleri wrote:
>
> I haven't tested, just an idea, instead of adding a new parameter,
> what about checking current.request.ajax ?
>
>
 I didn't know about that. Does that mean that the client_side parameter
 in redirect is redundant?

 people may want to optionally use the ajax recaptcha API even in
 non-LOAD circumstances, since it probably gives faster perceived load
 times, so there is probably justification for the extra control that a
 parameter gives.
  However, perhaps the default can be changed to True in case of
 current.request.ajax.




  Paolo
>
>
> 2014-03-06 0:59 GMT+01:00 Tim Richardson :
>
>> I've made the PR, but my knowledge of jquery/javascript is
>> paleolithic so Paolo is would be great if you can look at it.
>> It works.
>> https://github.com/web2py/web2py/pull/389
>>
>>
>> On Thursday, 6 March 2014 07:12:11 UTC+11, Tim Richardson wrote:
>>>
>>>
>>>
>>> On Thursday, 6 March 2014 01:06:07 UTC+11, Paolo Valleri wrote:

 I run a couple of tests and I got the same issues, I am try to
 figure out why the js library (recaptcha_canary.js) is not loaded
 at all

  Paolo


>>>
>>> I've opened issues 1888 and I've worked out how to fix it (see code
>>> on the issue page). I'll make a PR today/tongith
>>>

 2014-03-05 12:17 GMT+01:00 Tim Richardson :

>
>
> On Wednesday, 5 March 2014 21:56:49 UTC+11, Paolo Valleri wrote:
>>
>> Hi,
>> Is it working without placing it in a component?
>> have you tried to disable the facebook plugin? I'm just wondering
>> if there is a correlation between the two.
>>
>
> I removed the facebook plugin but it made no difference.
> Yes, it works when not in a plugin.
> The generated code is very different between the working example
> and the LOAD. It seems that the Google javascript for recapture is not
> being executed when LOAD is used.
> When it works (no LOAD) there is a quite of lot of injected code
> which is not present in the LOADed component. In Firebug, I'm told to
> "reload the page to get source for http:..www.google.com/recpatch
> a/..." so the 

Re: [web2py] Re: we2py google login - erroring out

2014-03-07 Thread Michele Comitini
What Content-type is the oauth response from google?


2014-03-07 13:25 GMT+01:00 Jayadevan M :

> Debugged and now we know this is where it is going -
> tokendata = cgi.parse_qs(data)
> tokendata, after this line has the value
> {}
> But the return string form google  is in proper json format. So for some
> reason the parsing stopped working because of some minor change in google
> auth's return format?
>
>
> On Friday, March 7, 2014 3:45:52 PM UTC+5:30, Jayadevan M wrote:
>>
>> We are using google login for authorization. Till a few hours ago, it was
>> working fine. All of a sudden (no code changes, nothing), we started
>> getting tickets. Error is
>> " Cannot parse oauth server response {\n
>> "access_token" : "ya29.1.AADtN_Xz2PgzK2sZozKOvLlHP6QkDc.." Anyone faced
>> such issues? Any ideas?
>>
>  --
> 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.


[web2py] Re: we2py google login - erroring out

2014-03-07 Thread Jayadevan M
Debugged and now we know this is where it is going - 
tokendata = cgi.parse_qs(data)
tokendata, after this line has the value 
{}
But the return string form google  is in proper json format. So for some 
reason the parsing stopped working because of some minor change in google 
auth's return format?

On Friday, March 7, 2014 3:45:52 PM UTC+5:30, Jayadevan M wrote:
>
> We are using google login for authorization. Till a few hours ago, it was 
> working fine. All of a sudden (no code changes, nothing), we started 
> getting tickets. Error is 
> " Cannot parse oauth server response {\n  
> "access_token" : "ya29.1.AADtN_Xz2PgzK2sZozKOvLlHP6QkDc.." Anyone faced 
> such issues? Any ideas?
>

-- 
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 v2.9.3: KeyError: 'Cannot resolve reference subject_subject in contract_contract definition'

2014-03-07 Thread Donatas Burba
The main advantage is that I don't need to trigger table if something has 
changed in its definition, so databases/sql.log is updated after the first 
request. And statements from this file is put into database migration file 
that is run in production. So with lazy_tables=False I won't forget to 
track all database schema changes.

2014 m. kovas 7 d., penktadienis 12:16:54 UTC+2, Tim Richardson rašė:
>
>
> With lazy_tables=True everything is ok, but in development environment I 
> don't want use True value. My table definitions are grouped in separate 
> files, so situation is next:
>>
>>
> By the way, what development advantages do you find from not using 
> lazy_tables=True (which you will definitely use in production)? 
>

-- 
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 v2.9.3: KeyError: 'Cannot resolve reference subject_subject in contract_contract definition'

2014-03-07 Thread Tim Richardson


> With lazy_tables=True everything is ok, but in development environment I 
> don't want use True value. My table definitions are grouped in separate 
> files, so situation is next:
>
>
By the way, what development advantages do you find from not using 
lazy_tables=True (which you will definitely use in production)? 

-- 
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] we2py google login - erroring out

2014-03-07 Thread Jayadevan M
We are using google login for authorization. Till a few hours ago, it was 
working fine. All of a sudden (no code changes, nothing), we started 
getting tickets. Error is 
" Cannot parse oauth server response {\n  
"access_token" : "ya29.1.AADtN_Xz2PgzK2sZozKOvLlHP6QkDc.." Anyone faced 
such issues? Any ideas?

-- 
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 v2.9.3: KeyError: 'Cannot resolve reference subject_subject in contract_contract definition'

2014-03-07 Thread Tim Richardson


On Thursday, 6 March 2014 13:09:18 UTC+11, Anthony wrote:
>
> But I believe you should be able to define tables out of order (i.e., 
> define the referenced table after the referencing table).
>

Only when lazy_tables = True


 

>
> On Wednesday, March 5, 2014 7:55:13 PM UTC-5, Tim Richardson wrote:
>>
>> Model files in the same directory execute alphabetically; it seems that 
>> you are seeing correct behaviour. 
>> This behaviour predates v2.8.2 by quite some time as far as I know. 
>>
>> the book says 
>> Models in the same folder/subfolder are executed in alphabetical order.
>>
>>
>> https://do.growthpath.com.au/book/default/chapter/29/04/the-core?search=alphabetical#Workflow
>>
>> I think this means you can assume nothing will change. I think you should 
>> change your file names.
>>
>> You can dynamically change load order as documented in the book, but it's 
>> tricky to use in my experience. 
>>
>> On Wednesday, 5 March 2014 04:46:44 UTC+11, Donatas Burba wrote:
>>>
>>>
>>> After upgrading to v2.9.3 (from 2.8.2), error is thrown:
>>>
>>> Traceback (most recent call last):
>>>   File "/vagrant/grand/web2py/gluon/restricted.py", line 217, in restricted
>>> exec ccode in environment
>>>   File "/vagrant/grand/web2py/applications/grand/models/db_contract.py", 
>>> line 13, in 
>>> Field('actual_date', 'date', readable=False, writable=False)
>>>   File "/vagrant/grand/web2py/gluon/dal.py", line 8223, in define_table
>>> table = self.lazy_define_table(tablename,*fields,**args)
>>>   File "/vagrant/grand/web2py/gluon/dal.py", line 8260, in lazy_define_table
>>> polymodel=polymodel)
>>>   File "/vagrant/grand/web2py/gluon/dal.py", line 925, in create_table
>>> raise KeyError('Cannot resolve reference %s in %s definition' % 
>>> (referenced, table._tablename))
>>> KeyError: 'Cannot resolve reference subject_subject in contract_contract 
>>> definition'
>>>
>>> With lazy_tables=True everything is ok, but in development environment I 
>>> don't want use True value. My table definitions are grouped in separate 
>>> files, so situation is next:
>>>
>>> models/db_contract.py:
>>>
>>> db.define_table('contract_contract'
>>>
>>> ...
>>>
>>> Field('subject_id', 'reference subject_subject')
>>>
>>> ...
>>>
>>> )
>>>
>>>
>>> models/db_subject.py
>>>
>>> db.define_table('subject_subject',
>>>
>>> ...
>>>
>>> )
>>>
>>> As I understand the problem occurs because db_contract.py is executed 
>>> before db_subject.py, Is it posible to revert back to executement like in 
>>> v2.8.2 (it means that such situation won't throw any error without setting 
>>> lazy_tables to True)? Or it is new feature?
>>>
>>>

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