[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:

[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 type \'exceptions.Exception\' Cannot parse oauth server response {\n access_token : ya29.1.AADtN_Xz2PgzK2sZozKOvLlHP6QkDc..

[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

[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

[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

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 maymala.jayade...@gmail.com: 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

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 t...@growthpath.com.au: On Friday, 7 March 2014 03:22:56 UTC+11, Paolo Valleri wrote: I agree

[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

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

[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,

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

[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

[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,

[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

[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

[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 =

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 maymala.jayade...@gmail.com: 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

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 maymala.jayade...@gmail.com: Looks like they changed to application/json; charset=utf-8 I changed the code from

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

[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

[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

[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

[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:

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

[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

[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 =

[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

[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?

[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

[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

[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: -

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

[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*

[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,

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 abasta...@gmail.com wrote: Depends on your goals. If we're talking about a SQLFORM based

[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',

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

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

[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, )

[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 =

[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

[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

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,

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,

[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

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

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,

[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