[web2py] Re: LDAP-auth debugging
OK, I figured out the first part: settings.domain_name used to be ldap://domain.com; - changing this to just domain.com makes web2py query the ldap-server. There seems to be a problem in my case with get_user_groups_from_ldap: The search for username in line 634 return the users full-name instead of the the username: CN=Firstname Lastname. :-( Am Dienstag, 17. September 2013 07:56:35 UTC+2 schrieb D.: Here are my auth-settings auth = Auth(db, secure=True) auth.define_tables(username=True) auth.settings.create_user_groups=False auth.settings.actions_disabled = ['register','change_password','request_reset_password','retrieve_username','profile'] auth.settings.create_user_groups = False auth.settings.remember_me_form = False auth.settings.login_methods = [ldap_auth(mode=ad, server=settings.ldap_server, base_dn=settings.domain_name, db=db, manage_user=True, user_firstname_attrib=givenName, user_lastname_attrib=sn, user_mail_attrib=mail, manage_groups=True, group_dn=ou=Groups, + settings.domain_name, group_name_attrib=cn, group_member_attrib=member, group_filterstr='objectClass=*')] I'm passing in valid login-credentials via web2pys login-form. As mentioned, according to the network-traffic web2py does not even contact the ldap server but tells me Invalid login right away. Am Montag, 16. September 2013 19:06:50 UTC+2 schrieb D.: Dear community, I'm trying to user ldap to authenticate against an MS AD as described in the book but I keep getting Invalid login. I can connect and verify my login through the normal pyhton-console using simple_bind_s and whoami_s just fine - not using web2py however :-( Apparently there's not even a request to the ldap-server: tcpdump on the server does not show any ldap-packets at all when trying to authenticate with web2py (I can see the ldap-process when doing it manually as described). Where and how does web2py write it's auth-logging? I tried adding a seperate logger in login_methods/ldap_auth, but it's never even called. All of the other logging-entries (scheduler etc.) work and are written to web2py/logs/web2py.log. Any help greatly appreciated! -- 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/groups/opt_out.
[web2py] Re: Restful API with HTTPS and authentication
Hi Larry, thanks for the quick reply. It might have something to do with the certificate. Me calling it a production server is actually not totally correct, it's more of a staging server, and therefore the SSL certificate does not match the domain name. Using basic auth was more of a way to find out what is going wrong. Our goal is to have API authentication based on the auth table in web2py. With basic auth and Apache/WSGI, aren't we restricted to a password-file and therefore a separate user/pass set than in web2py? On Monday, September 16, 2013 6:08:14 PM UTC+2, Larry Weinberg wrote: I'm doing exactly that and not running into troubles. Could it be something about your SSL certificate? If it's not a well trusted certificate sometimes you need to install it on the client side. Does it match the domain name you are calling? I test my server with the following python code and I can use basic authentication with restful calls: import requests from requests.auth import HTTPBasicAuth import json user = 'myn...@my.com javascript:' passwd = 'mypassword' url= 'http://mysrver/app/controller/resfullcall.json' r = requests.get(url, auth=HTTPBasicAuth(user, passwd)) # print r.text # Decode the JSON response and get the access token decodedDict = json.loads(r.text) -- 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/groups/opt_out.
[web2py] Re: JQuery Issue in Web2py: JQuery programs dont seem to work
nope... the first question would be to open the console and see what js errors are there :-P Il giorno martedì 17 settembre 2013 07:46:45 UTC+2, Tim Richardson ha scritto: On Tuesday, 17 September 2013 07:25:47 UTC+10, Horace Cunningham wrote: I am having this strange issue in web2py where Jquery applications such as the datepicker does not work. The Jquery file is present but nothing works. I have tried replacing the Jquery file, commenting it out and adding another from the Jquery CDN, but nothing works. Any suggestions? First suggestion is to tell us which version of web2py you have :) -- 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/groups/opt_out.
[web2py] Re: Subfolders in models
In version 2.6.3, sort=False is still there. Unsure if the way it's supposed to be used has changed. Got the same bug as before when I updated. Den fredagen den 14:e december 2012 kl. 09:39:24 UTC+1 skrev Joel Samuelsson: Glad to help! You do excellent work. Thanks! Den tisdagen den 11:e december 2012 kl. 15:25:21 UTC+1 skrev Massimo Di Pierro: How did that get in there? Fixed in trunk. Thanks Joel for reporting this. On Tuesday, 11 December 2012 02:51:15 UTC-6, Joel Samuelsson wrote: I'm not sure if we're using the same web2py version. I am using the current stable release (2.2.1). The call to listdir looks like this (just downloaded a fresh copy and double-checked): models = listdir(path, '^\w+\.py$', 0, sort=False) I.e. sort=False. Otherwise, what you describe is true. With sort=False though, sort order is not alphabetical and what you describe does not work since you can't know in what order models are run. /Joel Den måndagen den 10:e december 2012 kl. 17:10:43 UTC+1 skrev Anthony: I've been testing the way you described above and it works, to a point. The models are not imported in alphabetical order. This seems to be controlled by this line (521): models = listdir(path, '^\w+\.py$', 0, sort=False) in compileapp.py listdir is essentially os.walk with a regexp for filtering and os.walk doesn't give any guarantees for ordering at all from what I understand. Note, it is not os.listdir -- it is the listdir function from gluon/fileutils.py, which does sort the files alphabetically: http://code.google.com/p/web2py/source/browse/gluon/fileutils.py#88. Later in compileapp, the models found with listdir are looped through, once (not dependant on the regexp) which gives changing the regexp between models limited use. It loops through the files alphabetically -- within any given file, response.models_to_run can be changed, which can affect whether models that come *later* in alphabetical order get run (obviously it cannot cause models that come earlier in alphabetical order to be run). Using response.models_to_run does not change the order in which models are run, nor the ability of later models to affect earlier ones. It merely controls which models get run, with some ability for earlier models to make dynamic changes that affect later ones. To explain my issue, I'll try to use an example. Please bear with me! Let's say I have the following models: dbInterface/someDbFile.py anotherInterface/someAnotherInterface.py __init__.py logic.py Now let's assume that listdir lists the models root dir first, then anotherInterface dir and then dbInterface dir. That should be exactly how listdir lists the models. I want the dbInterface to load before anotherInterface since anotherInterface is dependant on dbInterface. Very simple -- just change the names so dbInterface comes before anotherInterface. Is there any way I can control the order things are imported from subfolders without changing web2py? I am aware that just setting sort to true in the listdir-call will fix my issue but I would like to be able to update web2py without having to make that change each time, if possible. As noted, sort is already True, so you should be OK. There is no way to change the order in which web2py executes the models, though (other than to generate your folder and file names to produce the order you desire). 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/groups/opt_out.
Re: [web2py] Re: Restful API with HTTPS and authentication
Fredrik, You should be able to use http basic authentication on ssl. You can also use x509 auth if you want to use client side certificates (still using web2py auth_* tables). I do not understand what is the exact error on your client. Can you post it? mic 2013/9/17 Fredrik fredrik.zetterg...@gmail.com Hi Larry, thanks for the quick reply. It might have something to do with the certificate. Me calling it a production server is actually not totally correct, it's more of a staging server, and therefore the SSL certificate does not match the domain name. Using basic auth was more of a way to find out what is going wrong. Our goal is to have API authentication based on the auth table in web2py. With basic auth and Apache/WSGI, aren't we restricted to a password-file and therefore a separate user/pass set than in web2py? On Monday, September 16, 2013 6:08:14 PM UTC+2, Larry Weinberg wrote: I'm doing exactly that and not running into troubles. Could it be something about your SSL certificate? If it's not a well trusted certificate sometimes you need to install it on the client side. Does it match the domain name you are calling? I test my server with the following python code and I can use basic authentication with restful calls: import requests from requests.auth import HTTPBasicAuth import json user = 'myn...@my.com' passwd = 'mypassword' url= 'http://mysrver/app/**controller/resfullcall.jsonhttp://mysrver/app/controller/resfullcall.json ' r = requests.get(url, auth=HTTPBasicAuth(user, passwd)) # print r.text # Decode the JSON response and get the access token decodedDict = json.loads(r.text) -- 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/groups/opt_out. -- 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/groups/opt_out.
Re: [web2py] Re: Django vulnerability and web2py
pbkdf2_ctypes is at least 20x times faster than flask, django or web2py fallback implementation. I think it takes much more time to transmit than to hash on common connections ;-) 2013/9/15 samuel bonill pythonn...@gmail.com thanks massimo... El domingo, 15 de septiembre de 2013 08:32:12 UTC-5, Massimo Di Pierro escribió: A serious DoS vulnerability was found in reported in Django today: https://www.djangoproject.com/**weblog/2013/sep/15/security/https://www.djangoproject.com/weblog/2013/sep/15/security/ We use the same default hashing algorithm for password, PBKDF2, so some of you may worry about the same vulnerability affecting web2py. Well NO! We are safe, This is because web2py always validates (and always did) the length of the password strings and it is capped to 256 bytes. https://github.com/web2py/**web2py/blob/master/gluon/dal.**py#L6892https://github.com/web2py/web2py/blob/master/gluon/dal.py#L6892 This is also the time to point our that web2py (since 2.6.x) uses its own implementation of PBKDF2, written by Michele Comitini which is 10x faster than the original version used by Flask and Django. Given this vulnerability (in Django) probably we will modify our library so that, if used outside of web2py, there is a max password length enforced by the library itself. You may see this patch in the near future. Again this does not affect us but may affect others in case they choose to use it. Massimo -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- 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/groups/opt_out.
[web2py] Re: Spatial / GIS support in DAL
I cannot get Postgis to work with web2py™ Version 2.6.3-stable+timestamp.2013.09.15.17.01.20 Python Python 2.7.3: C:\Python27\python.exe (prefix: C:\Python27) pg.define_table('franchise', Field('code', 'string', length=1), Field('name'), ) pg.define_table('fastfood', Field('franchise', 'reference franchise'), Field('lat', 'double'), Field('lon', 'double'), Field('geom', 'geometry()'), ) results in class 'psycopg2.ProgrammingError' function addgeometrycolumn(unknown, unknown, unknown, integer, unknown, integer) does not exist LINE 1: SELECT AddGeometryColumn ('', 'fastfood', 'geom', 4326, 'GEO... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. Assistance appreciated -- 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/groups/opt_out.
Re: [web2py] Re: Restful API with HTTPS and authentication
It turns out I needed to add this to the Apache config: On Tuesday, September 17, 2013 11:23:00 AM UTC+2, Michele Comitini wrote: Fredrik, You should be able to use http basic authentication on ssl. You can also use x509 auth if you want to use client side certificates (still using web2py auth_* tables). I do not understand what is the exact error on your client. Can you post it? mic 2013/9/17 Fredrik fredrik.z...@gmail.com javascript: Hi Larry, thanks for the quick reply. It might have something to do with the certificate. Me calling it a production server is actually not totally correct, it's more of a staging server, and therefore the SSL certificate does not match the domain name. Using basic auth was more of a way to find out what is going wrong. Our goal is to have API authentication based on the auth table in web2py. With basic auth and Apache/WSGI, aren't we restricted to a password-file and therefore a separate user/pass set than in web2py? On Monday, September 16, 2013 6:08:14 PM UTC+2, Larry Weinberg wrote: I'm doing exactly that and not running into troubles. Could it be something about your SSL certificate? If it's not a well trusted certificate sometimes you need to install it on the client side. Does it match the domain name you are calling? I test my server with the following python code and I can use basic authentication with restful calls: import requests from requests.auth import HTTPBasicAuth import json user = 'myn...@my.com' passwd = 'mypassword' url= 'http://mysrver/app/**controller/resfullcall.jsonhttp://mysrver/app/controller/resfullcall.json ' r = requests.get(url, auth=HTTPBasicAuth(user, passwd)) # print r.text # Decode the JSON response and get the access token decodedDict = json.loads(r.text) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- 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/groups/opt_out.
[web2py] Re: LDAP-auth debugging
Never mind - the problem is in a messed-up configuration of different OUs ...there's no default Groups-Key in my environment - I'll have to customize ldap_auth.py all the way for recursive searches etc. -- 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/groups/opt_out.
Re: [web2py] Re: Datetime Issue error
If i code db.define_table('test11', Field('nome'), Field('datt','datetime')) db.test11.datt.requires=[IS_DATE(format=T('%Y/%m/%d %H:%M:%S'), error_message=T(Formato pretendido /mm/dd))] It saves the record with 2012/01/01 00:00:00 in the datt field clearing my time selection in the form and zeroing minutes seconds and hours But if i remove the line *db.test11.datt.requires=[IS_DATE(format=T('%Y/%m/%d %H:%M:%S'), error_message=T(Formato pretendido /mm/dd))]* It saves the record as 01-01-2012 18:08:22 It saves the time as i selected (18:08:22) What do i do? i need the datetime as %Y/%m/%d %H:%M:%S but forcing it with requires clears my time value 2013/9/11 António Ramos ramstei...@gmail.com sorry the copy paste i have this output In [18]: IS_DATE(format=T('%Y/%m/%d %H:%M:%S'),error_message=T(Formato pretendido /mm/dd HH:MM:SS))(2013/09-25 09:54:24) Out[18]: ('2013/09-25 09:54:24', 'Formato pretendido /mm/dd HH:MM:SS') and this In [8] : IS_DATE(format=T('%Y/%m/%d %H:%M:%S'),error_message=T(Formato pretendido /mm/dd HH:MM:SS))(2013/09/25 09:54:24) (datetime.date(2013, 9, 25), None) 2013/9/11 Federico Ferraro fferrar...@gmail.com Test it and validator not error : IS_DATE(format=T('%Y/%m/%d %H:%M:%S'),error_message=T(Formato pretendido /mm/dd HH:MM:SS))(2013/09/25 09:54:24) Out[17]: (datetime.date(2013, 9, 25), None) In [18]: IS_DATE(format=T('%Y/%m/%d %H:%M:%S'),error_message=T(Formato pretendido /mm/dd HH:MM:SS))(2013/09-25 09:54:24) Out[18]: ('2013/09-25 09:54:24', 'Formato pretendido /mm/dd HH:MM:SS') 2013/9/11 António Ramos ramstei...@gmail.com The field was only date and i changed it to datetime afer realised i needed the time 2013/9/11 Niphlod niph...@gmail.com data will always be stored in ISO format. SQLite in addition stores datetimes as strings 'cause there's no datetime native field. Did you change the field after creating it ? Does this error happen also on a clean database ? On Wednesday, September 11, 2013 10:58:56 AM UTC+2, Ramos wrote: my db.py db.define_table('oco', Field('created_on', 'datetime', required=True,label='Data'), ... ... db.oco.created_on.requires=[**IS_DATE(format=T('%Y/%m/%d %H:%M:%S'), error_message=T(Formato pretendido /mm/dd HH:MM:SS))] I create a record with created_on set to 2013/09/25 09:54:24 I get this error 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. Traceback (most recent call last): File C:\web2py2\gluon\restricted.**py, line 209, in restricted exec ccode in environment File C:/web2py2/applications/**empre/controllers/default.py https://apps.cires.pt/admin/default/edit/empre/controllers/default.py, line 1120, in module File C:\web2py2\gluon\globals.py, line 186, in lambda self._caller = lambda f: f() File C:/web2py2/applications/**empre/controllers/default.py https://apps.cires.pt/admin/default/edit/empre/controllers/default.py, line 486, in index for oco in db(db.oco.rel_trab.contains(tr**ab.id)).select(): File C:\web2py2\gluon\dal.py, line 8766, in select return adapter.select(self.query,fiel**ds,attributes) File C:\web2py2\gluon\dal.py, line 2094, in select return super(SQLiteAdapter, self).select(query, fields, attributes) File C:\web2py2\gluon\dal.py, line 1594, in select return self._select_aux(sql,fields,at**tributes) File C:\web2py2\gluon\dal.py, line 1559, in _select_aux self.execute(sql) File C:\web2py2\gluon\dal.py, line 1671, in execute return self.log_execute(*a, **b) File C:\web2py2\gluon\dal.py, line 1665, in log_execute ret = self.cursor.execute(*a, **b) File c:\Python27\lib\sqlite3\**dbapi2.py, line 63, in convert_date return datetime.date(*map(int, val.split(-))) ValueError: invalid literal for int() with base 10: '25 00:00:00' I see that in my sqlite file the date was set to 2013-09-25 00:00:00 instead of 2013/09/25 09:54:54 What i wrong? -- 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/groups/opt_out. -- 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
Re: [web2py] Re: Datetime Issue error
first and foremost if you need a datetime you should use the IS_DATETIME validator :-P Second, either you pass a FIXED format (not dependant on T) or you act on the default %Y-%m-%d translation string (from the languages section in the admin app). It's then easier to track bugs on the localization -- 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/groups/opt_out.
[web2py] Re: Spatial / GIS support in DAL
this is rather a how can I enable GIS support on postgres? question... http://trac.osgeo.org/postgis/wiki/UsersWikiNewbieAddgeometrycolumn Il giorno martedì 17 settembre 2013 12:05:27 UTC+2, Nate ha scritto: I cannot get Postgis to work with web2py™ Version 2.6.3-stable+timestamp.2013.09.15.17.01.20 Python Python 2.7.3: C:\Python27\python.exe (prefix: C:\Python27) pg.define_table('franchise', Field('code', 'string', length=1), Field('name'), ) pg.define_table('fastfood', Field('franchise', 'reference franchise'), Field('lat', 'double'), Field('lon', 'double'), Field('geom', 'geometry()'), ) results in class 'psycopg2.ProgrammingError' function addgeometrycolumn(unknown, unknown, unknown, integer, unknown, integer) does not exist LINE 1: SELECT AddGeometryColumn ('', 'fastfood', 'geom', 4326, 'GEO... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. Assistance appreciated -- 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/groups/opt_out.
Re: [web2py] Re: Datetime Issue error
hell with copy paste. I had a date field and changed to datetime but forgot to change the validator. Thank you a lot Niphold 2013/9/17 Niphlod niph...@gmail.com first and foremost if you need a datetime you should use the IS_DATETIME validator :-P Second, either you pass a FIXED format (not dependant on T) or you act on the default %Y-%m-%d translation string (from the languages section in the admin app). It's then easier to track bugs on the localization -- 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/groups/opt_out. -- 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/groups/opt_out.
[web2py] Changing field type.
Hi, I changed in some table (t_items) a field type from: type='string' to: type='reference t_categories' and replaced: migrate=settings.migrate with: migrate=False,fake_migrate=True I stopped and started the server, but I don't see that the change took place, on the relevant form. (create item.). What should I do? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Changing field type.
Hi, I changed in some table (t_items) a field type from: type='string' to: type='reference t_categories' and replaced: migrate=settings.migrate with: migrate=False,fake_migrate=True I stopped and started the server, but I don't see that the change took place, on the relevant form. (create item.). What should I do? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Scheduler as upstart job
Hi Niphlod, Got my scheduler working correctly. I updated my web2py version to 2.5.1 from 2.2.1 as you mentioned earlier. After that started two upstart jobs, one for my app and another for the scheduler. Still it returned an error error cleaning up.. I couldn't find an appropriate solution for it net so checked the code of scheduler.py file in gluon folder. Found that an exception raises this error at line number 797. The exception doesn't say anything about the error, just prints the message. After calling the Exception class and printing the exception, found out that it was a permission problem. I had not given the DELETE permission to the user. Once that was corrected, everything worked fine as I needed, It would be helpful if you could also log the exception that displays the message from the scheduler.py file. I had to spend lot of time to find this error, maybe my mistake as I am a web2py beginner, but it would really help if the cause of the exception is also logged, On Thursday, 12 September 2013 12:36:33 UTC+5:30, ajith c t wrote: Thank you for the response, will try everything you said and post it if every thing goes correct On Thursday, 12 September 2013 00:34:31 UTC+5:30, Niphlod wrote: On Wednesday, September 11, 2013 5:44:00 PM UTC+2, ajith c t wrote: sorry I am not executing the code in the load balancer. Let me say once more, so it will be clear. I dont have any web2py code in the load balancer. What I meant is I have my code in another server(say X) , to which the user is redirected by the load balancer(say Y). when I execute the webpy application from server X , the index function , where my scheduler.queue_task call comes,in the default.py controller will not be called as I cant access it from X. That is expected. So what I asked was , for breaking down purpose shouldn't I move that call into the scheduler.py file in the models folder as the model file will be called. I really don't get this part. Every controller in web2py gets executed as long as the request comes to the server. If you can reach a page and in your controller for that page you use queue_task(), you should definitely be able to enqueue a task. queue_task() is NOT meant to be used in models, because you'd queue a task for EACH and EVERY request coming in. And I will use the seperation of duties approach. but can you just confirm that the commands are correct. web part: python web2py.py -a yourpassword -p 8000 -i 0.0.0.0 scheduler python web2py.py -K appname let me stress it out once more: serving a web app in production with the included webserver is not going to provide stellar performances, although it definitely works. -- 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/groups/opt_out.
[web2py] Nginx configuration reporting Internal Server Error
Hi guys. I'm using web2py/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh to setup a nginx server in my vagrant box, but I'm receiving Internal Server Error. Where can I see for what's happening? I've never used nginx before. I'd appreciate any 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/groups/opt_out.
[web2py] Using web2py on multiple domains on Dreamhost.
I'm trying to evaluate web2py, and I have no idea what I'm doing. I haven't gotten to the point of doing apps, or anything; I'm just on 'deployment', which the manual's recipes ( http://web2py.com/books/default/chapter/29/13/deployment-recipes) doesn't have any help for me. My hosting is on Dreamhost. Applicable documents: http://wiki.dreamhost.com/Web2py and http://wiki.dreamhost.com/Passenger_WSGI Following those instructions, and linking /web2py/handlers/wsgihandler.py to passenger_wsgi.py gives the following error (when running directly in shell; site error says 'there was an error parsing your passenger_wsgi.py' file): ./passenger_wsgi.py Traceback (most recent call last): File ./passenger_wsgi.py, line 34, in module raise RuntimeError('Running from the wrong folder') RuntimeError: Running from the wrong folder I'm running the passenger_wsgi.py file from /mydomain.com/ directory, and web2py is in the root directory. What I want to do is very simply use web2py for all my domains. Can someone please explain to me how to do this? If I copy the contents of the web2py directory to my domain, it'll run (ie, cp -R /web2py/* /mydomain/), but it can't be right that I'd need to do this for every domain, right? I know this has got to be a simple thing, but I've not been able to find anything searching, and Dreamhost's support for this ends at the two links above. To clarify, I have: domain_one.com domain_two.com etc They're completely unrelated. My local directory structure looks like this: dom1/ dom1/public dom2/ dom2/public with passenger_wsgi.py in each top level (above /public) and web2py/ How does one make web2py work with 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/groups/opt_out.
[web2py] ImportError: No module named gaehandler
Hi, today I downloaded the current web2py source (version 2.6.3-stable+timestamp.2013.09.15.17.01.20) and copied a app.yaml that worked for me to it. When added this existing Application to GoogleAppEngine Laucher (Version 1.8.4.1050) and started there this configuration. First everything looks ok, there no error messages. But calling the URL there are a lot error messages (see below at the end) Perhaps this has to do with the new folder handler where gaehandler.py is located now? With the old source folder everything worked fine. Is this a bug, or do I have to change something? Cheers! pw - *** Running dev_appserver with the following flags: --skip_sdk_update_check=yes --port=8080 --admin_port=7000 Python command: /usr/bin/python2.7 INFO 2013-09-17 09:02:05,890 devappserver2.py:557] Skipping SDK update check. WARNING 2013-09-17 09:02:05,911 api_server.py:327] Could not initialize images API; you are likely missing the Python PIL module. INFO 2013-09-17 09:02:05,920 api_server.py:138] Starting API server at: http://localhost:50187 INFO 2013-09-17 09:02:05,928 dispatcher.py:164] Starting module default running at: http://localhost:8080 INFO 2013-09-17 09:02:05,938 admin_server.py:117] Starting admin server at: http://localhost:7000 ERROR2013-09-17 09:02:21,214 wsgi.py:262] Traceback (most recent call last): File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py, line 239, in Handle handler = _config_handle.add_wsgi_middleware(self._LoadHandler()) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py, line 298, in _LoadHandler handler, path, err = LoadObject(self._handler) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py, line 84, in LoadObject obj = __import__(path[0]) ImportError: No module named gaehandler INFO 2013-09-17 09:02:21,235 module.py:593] default: GET / HTTP/1.1 500 - -- 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/groups/opt_out.
[web2py] Re: Nginx configuration reporting Internal Server Error
internal server error generated by web2py or nginx ? location of errors logs: /var/log/nginx/error.log -- nginx /var/log/uwsgi/uwsgi.log --uwsgi On Tuesday, September 17, 2013 1:57:33 PM UTC+2, viniciusban wrote: Hi guys. I'm using web2py/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh to setup a nginx server in my vagrant box, but I'm receiving Internal Server Error. Where can I see for what's happening? I've never used nginx before. I'd appreciate any 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/groups/opt_out.
[web2py] Re: Scheduler as upstart job
catching those kind of errors is going to be a real PITA... every backend (i.e. database engine) logs the error as it wishes, so we don't have a method for pointing what is going wrong. No logs you reported included error cleaning up: if you told me earlier, I would have pointed you in the right direction. PS: every web2py part is kinda required to have read and write permission everywhere nobody really had any problem with it ^_^ On Tuesday, September 17, 2013 1:47:34 PM UTC+2, ajith c t wrote: Hi Niphlod, Got my scheduler working correctly. I updated my web2py version to 2.5.1 from 2.2.1 as you mentioned earlier. After that started two upstart jobs, one for my app and another for the scheduler. Still it returned an error error cleaning up.. I couldn't find an appropriate solution for it net so checked the code of scheduler.py file in gluon folder. Found that an exception raises this error at line number 797. The exception doesn't say anything about the error, just prints the message. After calling the Exception class and printing the exception, found out that it was a permission problem. I had not given the DELETE permission to the user. Once that was corrected, everything worked fine as I needed, It would be helpful if you could also log the exception that displays the message from the scheduler.py file. I had to spend lot of time to find this error, maybe my mistake as I am a web2py beginner, but it would really help if the cause of the exception is also logged, On Thursday, 12 September 2013 12:36:33 UTC+5:30, ajith c t wrote: Thank you for the response, will try everything you said and post it if every thing goes correct On Thursday, 12 September 2013 00:34:31 UTC+5:30, Niphlod wrote: On Wednesday, September 11, 2013 5:44:00 PM UTC+2, ajith c t wrote: sorry I am not executing the code in the load balancer. Let me say once more, so it will be clear. I dont have any web2py code in the load balancer. What I meant is I have my code in another server(say X) , to which the user is redirected by the load balancer(say Y). when I execute the webpy application from server X , the index function , where my scheduler.queue_task call comes,in the default.py controller will not be called as I cant access it from X. That is expected. So what I asked was , for breaking down purpose shouldn't I move that call into the scheduler.py file in the models folder as the model file will be called. I really don't get this part. Every controller in web2py gets executed as long as the request comes to the server. If you can reach a page and in your controller for that page you use queue_task(), you should definitely be able to enqueue a task. queue_task() is NOT meant to be used in models, because you'd queue a task for EACH and EVERY request coming in. And I will use the seperation of duties approach. but can you just confirm that the commands are correct. web part: python web2py.py -a yourpassword -p 8000 -i 0.0.0.0 scheduler python web2py.py -K appname let me stress it out once more: serving a web app in production with the included webserver is not going to provide stellar performances, although it definitely works. -- 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/groups/opt_out.
[web2py] Re: Changing field type.
if you set migrate=False, what kind of migration you expect ? PS: changing something from integer to string suualy doesn't involve any problem: doing the opposite brings many my totally personal advice is drop those table and recreate them from scratch On Tuesday, September 17, 2013 1:33:54 PM UTC+2, Avi A wrote: Hi, I changed in some table (t_items) a field type from: type='string' to: type='reference t_categories' and replaced: migrate=settings.migrate with: migrate=False,fake_migrate=True I stopped and started the server, but I don't see that the change took place, on the relevant form. (create item.). What should I do? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: ImportError: No module named gaehandler
handlers got moved in the 2.6.1 release... it's clearly stated in the changelog everyone in the need of a specific handler is required to copy it/them in the root folder. On Tuesday, September 17, 2013 1:21:14 PM UTC+2, Python Webdev wrote: Hi, today I downloaded the current web2py source (version 2.6.3-stable+timestamp.2013.09.15.17.01.20) and copied a app.yaml that worked for me to it. When added this existing Application to GoogleAppEngine Laucher (Version 1.8.4.1050) and started there this configuration. First everything looks ok, there no error messages. But calling the URL there are a lot error messages (see below at the end) Perhaps this has to do with the new folder handler where gaehandler.py is located now? With the old source folder everything worked fine. Is this a bug, or do I have to change something? Cheers! pw - *** Running dev_appserver with the following flags: --skip_sdk_update_check=yes --port=8080 --admin_port=7000 Python command: /usr/bin/python2.7 INFO 2013-09-17 09:02:05,890 devappserver2.py:557] Skipping SDK update check. WARNING 2013-09-17 09:02:05,911 api_server.py:327] Could not initialize images API; you are likely missing the Python PIL module. INFO 2013-09-17 09:02:05,920 api_server.py:138] Starting API server at: http://localhost:50187 INFO 2013-09-17 09:02:05,928 dispatcher.py:164] Starting module default running at: http://localhost:8080 INFO 2013-09-17 09:02:05,938 admin_server.py:117] Starting admin server at: http://localhost:7000 ERROR2013-09-17 09:02:21,214 wsgi.py:262] Traceback (most recent call last): File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py, line 239, in Handle handler = _config_handle.add_wsgi_middleware(self._LoadHandler()) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py, line 298, in _LoadHandler handler, path, err = LoadObject(self._handler) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py, line 84, in LoadObject obj = __import__(path[0]) ImportError: No module named gaehandler INFO 2013-09-17 09:02:21,235 module.py:593] default: GET / HTTP/1.1 500 - -- 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/groups/opt_out.
[web2py] Re: Scheduler as upstart job
I got the error cleaning up message after updating the web2py. I had set user specific permissions, thats what happened. Well its resolved now. Thanks for all the support given by the web2py group. On Tuesday, 17 September 2013 17:50:58 UTC+5:30, Niphlod wrote: catching those kind of errors is going to be a real PITA... every backend (i.e. database engine) logs the error as it wishes, so we don't have a method for pointing what is going wrong. No logs you reported included error cleaning up: if you told me earlier, I would have pointed you in the right direction. PS: every web2py part is kinda required to have read and write permission everywhere nobody really had any problem with it ^_^ On Tuesday, September 17, 2013 1:47:34 PM UTC+2, ajith c t wrote: Hi Niphlod, Got my scheduler working correctly. I updated my web2py version to 2.5.1 from 2.2.1 as you mentioned earlier. After that started two upstart jobs, one for my app and another for the scheduler. Still it returned an error error cleaning up.. I couldn't find an appropriate solution for it net so checked the code of scheduler.py file in gluon folder. Found that an exception raises this error at line number 797. The exception doesn't say anything about the error, just prints the message. After calling the Exception class and printing the exception, found out that it was a permission problem. I had not given the DELETE permission to the user. Once that was corrected, everything worked fine as I needed, It would be helpful if you could also log the exception that displays the message from the scheduler.py file. I had to spend lot of time to find this error, maybe my mistake as I am a web2py beginner, but it would really help if the cause of the exception is also logged, On Thursday, 12 September 2013 12:36:33 UTC+5:30, ajith c t wrote: Thank you for the response, will try everything you said and post it if every thing goes correct On Thursday, 12 September 2013 00:34:31 UTC+5:30, Niphlod wrote: On Wednesday, September 11, 2013 5:44:00 PM UTC+2, ajith c t wrote: sorry I am not executing the code in the load balancer. Let me say once more, so it will be clear. I dont have any web2py code in the load balancer. What I meant is I have my code in another server(say X) , to which the user is redirected by the load balancer(say Y). when I execute the webpy application from server X , the index function , where my scheduler.queue_task call comes,in the default.py controller will not be called as I cant access it from X. That is expected. So what I asked was , for breaking down purpose shouldn't I move that call into the scheduler.py file in the models folder as the model file will be called. I really don't get this part. Every controller in web2py gets executed as long as the request comes to the server. If you can reach a page and in your controller for that page you use queue_task(), you should definitely be able to enqueue a task. queue_task() is NOT meant to be used in models, because you'd queue a task for EACH and EVERY request coming in. And I will use the seperation of duties approach. but can you just confirm that the commands are correct. web part: python web2py.py -a yourpassword -p 8000 -i 0.0.0.0 scheduler python web2py.py -K appname let me stress it out once more: serving a web app in production with the included webserver is not going to provide stellar performances, although it definitely works. -- 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/groups/opt_out.
Re: [web2py] Re: Datetime Issue error
yep, every now and then I strip ctrl, c and v directly from the keyboard :P On Tuesday, September 17, 2013 12:39:03 PM UTC+2, Ramos wrote: hell with copy paste. I had a date field and changed to datetime but forgot to change the validator. Thank you a lot Niphold 2013/9/17 Niphlod nip...@gmail.com javascript: first and foremost if you need a datetime you should use the IS_DATETIME validator :-P Second, either you pass a FIXED format (not dependant on T) or you act on the default %Y-%m-%d translation string (from the languages section in the admin app). It's then easier to track bugs on the localization -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- 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/groups/opt_out.
[web2py] Re: Changing field type.
What's the procedure to drop the table? On Tuesday, September 17, 2013 3:22:35 PM UTC+3, Niphlod wrote: if you set migrate=False, what kind of migration you expect ? PS: changing something from integer to string suualy doesn't involve any problem: doing the opposite brings many my totally personal advice is drop those table and recreate them from scratch On Tuesday, September 17, 2013 1:33:54 PM UTC+2, Avi A wrote: Hi, I changed in some table (t_items) a field type from: type='string' to: type='reference t_categories' and replaced: migrate=settings.migrate with: migrate=False,fake_migrate=True I stopped and started the server, but I don't see that the change took place, on the relevant form. (create item.). What should I do? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Using web2py on multiple domains on Dreamhost.
There is a README in /web2py/handlers/README You need to copy /web2py/handlers/wsgihandler.py into /web2py/wsgihandler.py and link the latter. This was a much debated change in web2py 2.6.x. We decided that handlers are examples that users should copy because they may want to modify them. Massimo On Tuesday, 17 September 2013 06:22:39 UTC-5, Epyt Otorp wrote: I'm trying to evaluate web2py, and I have no idea what I'm doing. I haven't gotten to the point of doing apps, or anything; I'm just on 'deployment', which the manual's recipes ( http://web2py.com/books/default/chapter/29/13/deployment-recipes) doesn't have any help for me. My hosting is on Dreamhost. Applicable documents: http://wiki.dreamhost.com/Web2py and http://wiki.dreamhost.com/Passenger_WSGI Following those instructions, and linking /web2py/handlers/wsgihandler.py to passenger_wsgi.py gives the following error (when running directly in shell; site error says 'there was an error parsing your passenger_wsgi.py' file): ./passenger_wsgi.py Traceback (most recent call last): File ./passenger_wsgi.py, line 34, in module raise RuntimeError('Running from the wrong folder') RuntimeError: Running from the wrong folder I'm running the passenger_wsgi.py file from /mydomain.com/ directory, and web2py is in the root directory. What I want to do is very simply use web2py for all my domains. Can someone please explain to me how to do this? If I copy the contents of the web2py directory to my domain, it'll run (ie, cp -R /web2py/* /mydomain/), but it can't be right that I'd need to do this for every domain, right? I know this has got to be a simple thing, but I've not been able to find anything searching, and Dreamhost's support for this ends at the two links above. To clarify, I have: domain_one.com domain_two.com etc They're completely unrelated. My local directory structure looks like this: dom1/ dom1/public dom2/ dom2/public with passenger_wsgi.py in each top level (above /public) and web2py/ How does one make web2py work with 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/groups/opt_out.
[web2py] Re: Changing field type.
Changing it to True, didn't make a change either. On Tuesday, September 17, 2013 3:34:29 PM UTC+3, Avi A wrote: What's the procedure to drop the table? On Tuesday, September 17, 2013 3:22:35 PM UTC+3, Niphlod wrote: if you set migrate=False, what kind of migration you expect ? PS: changing something from integer to string suualy doesn't involve any problem: doing the opposite brings many my totally personal advice is drop those table and recreate them from scratch On Tuesday, September 17, 2013 1:33:54 PM UTC+2, Avi A wrote: Hi, I changed in some table (t_items) a field type from: type='string' to: type='reference t_categories' and replaced: migrate=settings.migrate with: migrate=False,fake_migrate=True I stopped and started the server, but I don't see that the change took place, on the relevant form. (create item.). What should I do? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Changing field type.
There are two different issues. One is the question in your first email about migration. Is the problem that you do not get a dropdown? Is it possible you manually set a validator for the field? Your second question. How to drop a table. 1) enable migrations 2) python web2py.py -S yourapp -M -M 3) type db.yourtable.drop() db.commit() 4) edit the model and remove the table before using the app, else it will be created again. On Tuesday, 17 September 2013 07:46:42 UTC-5, Avi A wrote: Changing it to True, didn't make a change either. On Tuesday, September 17, 2013 3:34:29 PM UTC+3, Avi A wrote: What's the procedure to drop the table? On Tuesday, September 17, 2013 3:22:35 PM UTC+3, Niphlod wrote: if you set migrate=False, what kind of migration you expect ? PS: changing something from integer to string suualy doesn't involve any problem: doing the opposite brings many my totally personal advice is drop those table and recreate them from scratch On Tuesday, September 17, 2013 1:33:54 PM UTC+2, Avi A wrote: Hi, I changed in some table (t_items) a field type from: type='string' to: type='reference t_categories' and replaced: migrate=settings.migrate with: migrate=False,fake_migrate=True I stopped and started the server, but I don't see that the change took place, on the relevant form. (create item.). What should I do? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Re: Nginx configuration reporting Internal Server Error
Thanks, Niphlod. I found errors in uwsgi.log. Probably it's referred to some error we can see from line 58 in this pastebin: http://pastebin.com/jvSCK8e5 Any further help? On Tue, Sep 17, 2013 at 9:17 AM, Niphlod niph...@gmail.com wrote: internal server error generated by web2py or nginx ? location of errors logs: /var/log/nginx/error.log -- nginx /var/log/uwsgi/uwsgi.log --uwsgi On Tuesday, September 17, 2013 1:57:33 PM UTC+2, viniciusban wrote: Hi guys. I'm using web2py/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh to setup a nginx server in my vagrant box, but I'm receiving Internal Server Error. Where can I see for what's happening? I've never used nginx before. I'd appreciate any 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/groups/opt_out. -- 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/groups/opt_out.
Re: [web2py] Re: LDAP-auth debugging
cn:1 and cn:2 works for me : from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.settings.login_methods = [auth, ldap_auth(mode='ad', bind_dn='domain\user', bind_pw='password', manage_groups=False, manage_user=True, user_firstname_attrib='cn:1', user_lastname_attrib='cn:2', server='servername.domain.com', user_mail_attrib='mail', # username_attrib='sAMAccountName', base_dn='dc=domain,dc=com', logging_level='error', db=db)] Also, notice there is this open issue ( https://code.google.com/p/web2py/issues/detail?id=1645) and this thread ( https://groups.google.com/forum/#!topic/web2py/sEpOWYk0mFA) :) Richard On Tue, Sep 17, 2013 at 6:16 AM, D. s54012...@gmail.com wrote: Never mind - the problem is in a messed-up configuration of different OUs ...there's no default Groups-Key in my environment - I'll have to customize ldap_auth.py all the way for recursive searches etc. -- 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/groups/opt_out. -- 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/groups/opt_out.
Re: [web2py] Re: ImportError: No module named gaehandler
Niphlod, this solved the issue with no wsgihandler import error in another thread. Thank you. :-) On Tue, Sep 17, 2013 at 9:23 AM, Niphlod niph...@gmail.com wrote: handlers got moved in the 2.6.1 release... it's clearly stated in the changelog everyone in the need of a specific handler is required to copy it/them in the root folder. On Tuesday, September 17, 2013 1:21:14 PM UTC+2, Python Webdev wrote: Hi, today I downloaded the current web2py source (version 2.6.3-stable+timestamp.2013.09.15.17.01.20) and copied a app.yaml that worked for me to it. When added this existing Application to GoogleAppEngine Laucher (Version 1.8.4.1050) and started there this configuration. First everything looks ok, there no error messages. But calling the URL there are a lot error messages (see below at the end) Perhaps this has to do with the new folder handler where gaehandler.py is located now? With the old source folder everything worked fine. Is this a bug, or do I have to change something? Cheers! pw - *** Running dev_appserver with the following flags: --skip_sdk_update_check=yes --port=8080 --admin_port=7000 Python command: /usr/bin/python2.7 INFO 2013-09-17 09:02:05,890 devappserver2.py:557] Skipping SDK update check. WARNING 2013-09-17 09:02:05,911 api_server.py:327] Could not initialize images API; you are likely missing the Python PIL module. INFO 2013-09-17 09:02:05,920 api_server.py:138] Starting API server at: http://localhost:50187 INFO 2013-09-17 09:02:05,928 dispatcher.py:164] Starting module default running at: http://localhost:8080 INFO 2013-09-17 09:02:05,938 admin_server.py:117] Starting admin server at: http://localhost:7000 ERROR2013-09-17 09:02:21,214 wsgi.py:262] Traceback (most recent call last): File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py, line 239, in Handle handler = _config_handle.add_wsgi_middleware(self._LoadHandler()) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py, line 298, in _LoadHandler handler, path, err = LoadObject(self._handler) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py, line 84, in LoadObject obj = __import__(path[0]) ImportError: No module named gaehandler INFO 2013-09-17 09:02:21,235 module.py:593] default: GET / HTTP/1.1 500 - -- 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/groups/opt_out. -- 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/groups/opt_out.
Re: [web2py] Re: simple button in grid question
Tip: when you are struggling, take something which works and then using 'baby-steps' incrementally change the example until it is transformed into what you need. Here is something which you previously said was working: def view_all_suggestions_and_comments(): query = (db.IdeaComment.ideaID==db.Idea.id) (db.IdeaComment.partyID== db.Party.id) grid = SQLFORM.grid(query, ,links = [dict(header='Virtual Field', body=lambda row: A('Add a comment!',_class=btn btn-mini, _href=URL('comment_on_a_suggestion', vars=dict(filter=row.Idea.id]) return dict(grid = grid) Try isolating the links into a new variable mylistoflinks and make it a list (so you can have multiple links): def view_all_suggestions_and_comments(): query = (db.IdeaComment.ideaID==db.Idea.id) (db.IdeaComment.partyID== db.Party.id) mylistoflinks = [ dict(header='Virtual Field', body=lambda row: A('Add a comment!',_class=btn btn-mini, _href=URL('comment_on_a_suggestion', vars=dict(filter=row.Idea.id, dict(header='Virtual Field', body=lambda row: A('Add a comment!',_class=btn btn-mini, _href=URL('comment_on_a_suggestion', vars=dict(filter=row.Idea.id, ] grid = SQLFORM.grid(query, links = mylistoflinks ) return dict(grid = grid) Hope that works. Good luck with your iterations! -- 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/groups/opt_out.
[web2py] Re: Web2Py compute fields not working on update
On Monday, September 16, 2013 9:07:35 PM UTC-4, Tim Richardson wrote: The importance of definition order is in the book Where specifically? Are you talking about the fact that a computed field can depend on a previously defined computed field (but not a computed field that hasn't been defined yet)? Perhaps that's what Step meant -- I thought he meant that all fields required by a computed field must be defined before the computed field (which does not appear to be the case). 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/groups/opt_out.
Re: [web2py] Re: simple button in grid question
Thanks Villas, it works perfectly. I really appreciate the help. Alex On Tuesday, September 17, 2013 8:04:28 AM UTC-7, villas wrote: Tip: when you are struggling, take something which works and then using 'baby-steps' incrementally change the example until it is transformed into what you need. Here is something which you previously said was working: def view_all_suggestions_and_comments(): query = (db.IdeaComment.ideaID==db.Idea.id) (db.IdeaComment.partyID==db.Party.id) grid = SQLFORM.grid(query, ,links = [dict(header='Virtual Field', body=lambda row: A('Add a comment!',_class=btn btn-mini, _href=URL('comment_on_a_suggestion', vars=dict(filter=row.Idea.id]) return dict(grid = grid) Try isolating the links into a new variable mylistoflinks and make it a list (so you can have multiple links): def view_all_suggestions_and_comments(): query = (db.IdeaComment.ideaID==db.Idea.id) (db.IdeaComment.partyID==db.Party.id) mylistoflinks = [ dict(header='Virtual Field', body=lambda row: A('Add a comment!',_class=btn btn-mini, _href=URL('comment_on_a_suggestion', vars=dict(filter=row.Idea.id, dict(header='Virtual Field', body=lambda row: A('Add a comment!',_class=btn btn-mini, _href=URL('comment_on_a_suggestion', vars=dict(filter=row.Idea.id, ] grid = SQLFORM.grid(query, links = mylistoflinks ) return dict(grid = grid) Hope that works. Good luck with your iterations! -- 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/groups/opt_out.
Re: [web2py] Re: Nginx configuration reporting Internal Server Error
cp web2py/handler/wsgihandler.py web2py/wsgihandler.py On Tuesday, 17 September 2013 10:34:54 UTC-5, Paolo Valleri wrote: Check if in the web2py root directory there is a file called wsgihandler.py if not move it there remember to restart uwsgi after that Paolo On Tuesday, September 17, 2013 3:58:40 PM UTC+2, viniciusban wrote: Thanks, Niphlod. I found errors in uwsgi.log. Probably it's referred to some error we can see from line 58 in this pastebin: http://pastebin.com/jvSCK8e5 Any further help? On Tue, Sep 17, 2013 at 9:17 AM, Niphlod nip...@gmail.com wrote: internal server error generated by web2py or nginx ? location of errors logs: /var/log/nginx/error.log -- nginx /var/log/uwsgi/uwsgi.log --uwsgi On Tuesday, September 17, 2013 1:57:33 PM UTC+2, viniciusban wrote: Hi guys. I'm using web2py/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh to setup a nginx server in my vagrant box, but I'm receiving Internal Server Error. Where can I see for what's happening? I've never used nginx before. I'd appreciate any 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+un...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- 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/groups/opt_out.
Re: [web2py] Re: Nginx configuration reporting Internal Server Error
Check if in the web2py root directory there is a file called wsgihandler.py if not move it there remember to restart uwsgi after that Paolo On Tuesday, September 17, 2013 3:58:40 PM UTC+2, viniciusban wrote: Thanks, Niphlod. I found errors in uwsgi.log. Probably it's referred to some error we can see from line 58 in this pastebin: http://pastebin.com/jvSCK8e5 Any further help? On Tue, Sep 17, 2013 at 9:17 AM, Niphlod nip...@gmail.com javascript: wrote: internal server error generated by web2py or nginx ? location of errors logs: /var/log/nginx/error.log -- nginx /var/log/uwsgi/uwsgi.log --uwsgi On Tuesday, September 17, 2013 1:57:33 PM UTC+2, viniciusban wrote: Hi guys. I'm using web2py/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh to setup a nginx server in my vagrant box, but I'm receiving Internal Server Error. Where can I see for what's happening? I've never used nginx before. I'd appreciate any 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+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- 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/groups/opt_out.
[web2py] Re: New web2py slice: jqGrid in edit mode
On Monday, September 16, 2013 8:13:18 PM UTC-7, Tim Richardson wrote: I added a slice with some rough notes in using jqGrid including edit mode. http://www.web2pyslices.com/slice/show/1714/jqgrid-including-updating-data The example and the exposition both look good! Thank you. /dps -- 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/groups/opt_out.
Re: [web2py] Re: Nginx configuration reporting Internal Server Error
Thank you all, folks. It solved the problem. :-) On Tue, Sep 17, 2013 at 1:02 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: cp web2py/handler/wsgihandler.py web2py/wsgihandler.py On Tuesday, 17 September 2013 10:34:54 UTC-5, Paolo Valleri wrote: Check if in the web2py root directory there is a file called wsgihandler.py if not move it there remember to restart uwsgi after that Paolo On Tuesday, September 17, 2013 3:58:40 PM UTC+2, viniciusban wrote: Thanks, Niphlod. I found errors in uwsgi.log. Probably it's referred to some error we can see from line 58 in this pastebin: http://pastebin.com/jvSCK8e5 Any further help? On Tue, Sep 17, 2013 at 9:17 AM, Niphlod nip...@gmail.com wrote: internal server error generated by web2py or nginx ? location of errors logs: /var/log/nginx/error.log -- nginx /var/log/uwsgi/uwsgi.log --uwsgi On Tuesday, September 17, 2013 1:57:33 PM UTC+2, viniciusban wrote: Hi guys. I'm using web2py/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh to setup a nginx server in my vagrant box, but I'm receiving Internal Server Error. Where can I see for what's happening? I've never used nginx before. I'd appreciate any 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+un...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- 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/groups/opt_out. -- 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/groups/opt_out.
[web2py] Re: Data of 'reference db on select
On Saturday, September 14, 2013 5:54:47 AM UTC-7, Niphlod wrote: the syntax is more or less: db(filter).select(thefieldsyouneed) so, your conditions must be inside the db() and not the select() Wow! That fixed *my* code! Thanks! (I did have a workaround with db.executesql(), but it's nice to comment out as many of those as I can) /dps -- 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/groups/opt_out.
[web2py] Re: All SOAPed up
On Thursday, September 12, 2013 6:30:01 PM UTC-7, Dave S wrote: On Wednesday, August 21, 2013 11:58:36 AM UTC-7, Dave S wrote: One thing I haven't figured out yet is if web2py has logging of its activity (startup, requests seen, etc) other than what I might record in my app's DB. Finally looked a second time at Chapter 14, and found the httpserver.log description. Just checking ... this is compatible with logrotate , correct? /dps -- 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/groups/opt_out.
[web2py] Re: beginner questions about REST
Update to question 2: PUT works now, but DELETE doesn't. I get the following error: type 'exceptions.TypeError' not indexable web2py™ Version 2.6.3-stable+timestamp.2013.09.15.17.01.20Python Python 2.7.4: /usr/bin/python (prefix: /usr) Traceback (most recent call last): File ../gluon/restricted.py, line 217, in restricted exec ccode in environment File ../applications/app/controllers/default.py, line 103, in module File ../gluon/globals.py, line 378, in lambda self._caller = lambda f: f() File ../gluon/globals.py, line 348, in f raise e TypeError: not indexable El lunes, 16 de septiembre de 2013 16:44:10 UTC+3, Dimid Korovev escribió: Hi All, I heard about web2py following this question: http://stackoverflow.com/questions/5899483/generate-rest-based-service-from-database-schema My goal is to create a RESTful web service from a DB, such that when the DB is modified, no code changes would be needed. Questions: 1. When creating the DB schema to be extracted, should I add an 'id' field? If I do, the resulted 'legacy_db_web2py_code' string contains an 'ID' field in 'define_table'. However, the documentation says such field is already created implicitly. If I don't, I need another PK to create relations with foreign keys. 2. I've found an example here: http://www.web2pyslices.com/slice/show/1534/restful-services-with-curl-andor-python but PUT and DELETE won't work (GET and POST do work). any suggestions? 3.I've written a small scitpt (attached) which wraps 'extract_mysql_models'. Feedback would be welcomed. Thanks in advance -- 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/groups/opt_out.
[web2py] Re: Making validators trigger only when data is present
Many EXTREME thanks for your kind help On Tuesday, September 17, 2013 2:56:16 PM UTC-4, Anthony wrote: requires=IS_EMPTY_OR([IS_LENGTH(maxsize=200), IS_MATCH('^[a-zA-Z0-9\s\#\.\$\-\_]+$', error_message='Character Not Allowed.')]) Anthony On Tuesday, September 17, 2013 2:44:14 PM UTC-4, REM wrote: I have a form field which is not required, but when it is submitted with data, I want the data to be validated. The problem is, I get the validator triggering when the form is submitted with no value in that field. I want it to wait until there's data in there to validate it and ignore it if blank. I thought I could get this behavior with required=False and then using requires= validators, but it is failing the validation every time when there's no data in the field. How do you get it to validate data that's present and ignore blanks? The field in question is in the db.py as follows: Field('special_code1', 'string', length=200, required=False, label='Special Code 1', requires=[IS_LENGTH(maxsize=200), IS_MATCH('^[a-zA-Z0-9\s\#\.\$\-\_]+$', error_message ='Character Not Allowed.')] ), There are no other controllers acting on this data, and no combination of anything I try above gets me what I want. -- 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/groups/opt_out.
[web2py] Re: beginner questions about REST
Please open a ticket about this. On Tuesday, 17 September 2013 08:53:10 UTC-5, Dimid Korovev wrote: Update to question 2: PUT works now, but DELETE doesn't. I get the following error: type 'exceptions.TypeError' not indexable web2py™ Version 2.6.3-stable+timestamp.2013.09.15.17.01.20Python Python 2.7.4: /usr/bin/python (prefix: /usr) Traceback (most recent call last): File ../gluon/restricted.py, line 217, in restricted exec ccode in environment File ../applications/app/controllers/default.py, line 103, in module File ../gluon/globals.py, line 378, in lambda self._caller = lambda f: f() File ../gluon/globals.py, line 348, in f raise e TypeError: not indexable El lunes, 16 de septiembre de 2013 16:44:10 UTC+3, Dimid Korovev escribió: Hi All, I heard about web2py following this question: http://stackoverflow.com/questions/5899483/generate-rest-based-service-from-database-schema My goal is to create a RESTful web service from a DB, such that when the DB is modified, no code changes would be needed. Questions: 1. When creating the DB schema to be extracted, should I add an 'id' field? If I do, the resulted 'legacy_db_web2py_code' string contains an 'ID' field in 'define_table'. However, the documentation says such field is already created implicitly. If I don't, I need another PK to create relations with foreign keys. 2. I've found an example here: http://www.web2pyslices.com/slice/show/1534/restful-services-with-curl-andor-python but PUT and DELETE won't work (GET and POST do work). any suggestions? 3.I've written a small scitpt (attached) which wraps 'extract_mysql_models'. Feedback would be welcomed. Thanks in advance -- 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/groups/opt_out.
[web2py] Custom form with jquery acts weird
Hi, I have the same problem as https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/7Meea7Ul0o8/4ZdrD9hP5MEJ https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/E9RyEqh01RQ/6duW4RmALvcJ From the first thread/link above, ...if I use a regular form, {{=form}}, then validation works but not if I use the custom form. Also form.process() works, so the problem seems to be related to custom forms.. Those threads seemed to end without finding a solution. I think the author of those threads didn't realize that the form is actually being validated, but it doesn't seem like it b/c the error messages do not show with the custom form. In my hands, if I use a custom form, it validates OK but form errors do not display and, quite often, any jquery code in the view misbehaves (which is the real problem). This behavior turns on and off depending ONLY on whether I have a custom form. I used {{=custom.form.begin}} and {{=custom.form.end}} and {{=form.custom.widget.xyz}} and {{=form.custom.label.xyz}} in the view. If I replace it with {{=form}} then everything works perfectly. In the controller, I used if form.accepts(request, session, onvalidation=abc): ... Thanks for any help. I love the custom forms and it really stinks not being able to use them with jQuery!! -jl ps - I previously posted with more details about this problem, before I realized the problem seems related more generally to javascript/jquery + custom forms - https://groups.google.com/forum/?fromgroups=#!topic/web2py/rPHKPqqHbsg https://groups.google.com/forum/?fromgroups=#!topic/web2py/0LpfMJPwSsI -- 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/groups/opt_out.
[web2py] Making validators trigger only when data is present
I have a form field which is not required, but when it is submitted with data, I want the data to be validated. The problem is, I get the validator triggering when the form is submitted with no value in that field. I want it to wait until there's data in there to validate it and ignore it if blank. I thought I could get this behavior with required=False and then using requires= validators, but it is failing the validation every time when there's no data in the field. How do you get it to validate data that's present and ignore blanks? The field in question is in the db.py as follows: Field('special_code1', 'string', length=200, required=False, label='Special Code 1', requires=[IS_LENGTH(maxsize=200), IS_MATCH('^[a-zA-Z0-9\s\#\.\$\-\_]+$', error_message='Character Not Allowed.')] ), There are no other controllers acting on this data, and no combination of anything I try above gets me what I want. -- 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/groups/opt_out.
[web2py] Re: Changing field type.
I do not believe the lack of dropdown has anything to do with the migration. Something is changing the validator. On Tuesday, 17 September 2013 13:39:51 UTC-5, Avi A wrote: The first issue, yes I don't get a dropdown list. I only changed the field type and the migration line. I used the wizard to create a new app and there are quite many fixes I have to make, mostly changing the type to reference and replacing strings with uploads. thanks. On Tuesday, September 17, 2013 4:13:46 PM UTC+3, Massimo Di Pierro wrote: There are two different issues. One is the question in your first email about migration. Is the problem that you do not get a dropdown? Is it possible you manually set a validator for the field? Your second question. How to drop a table. 1) enable migrations 2) python web2py.py -S yourapp -M -M 3) type db.yourtable.drop() db.commit() 4) edit the model and remove the table before using the app, else it will be created again. On Tuesday, 17 September 2013 07:46:42 UTC-5, Avi A wrote: Changing it to True, didn't make a change either. On Tuesday, September 17, 2013 3:34:29 PM UTC+3, Avi A wrote: What's the procedure to drop the table? On Tuesday, September 17, 2013 3:22:35 PM UTC+3, Niphlod wrote: if you set migrate=False, what kind of migration you expect ? PS: changing something from integer to string suualy doesn't involve any problem: doing the opposite brings many my totally personal advice is drop those table and recreate them from scratch On Tuesday, September 17, 2013 1:33:54 PM UTC+2, Avi A wrote: Hi, I changed in some table (t_items) a field type from: type='string' to: type='reference t_categories' and replaced: migrate=settings.migrate with: migrate=False,fake_migrate=True I stopped and started the server, but I don't see that the change took place, on the relevant form. (create item.). What should I do? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Changing field type.
The first issue, yes I don't get a dropdown list. I only changed the field type and the migration line. I used the wizard to create a new app and there are quite many fixes I have to make, mostly changing the type to reference and replacing strings with uploads. thanks. On Tuesday, September 17, 2013 4:13:46 PM UTC+3, Massimo Di Pierro wrote: There are two different issues. One is the question in your first email about migration. Is the problem that you do not get a dropdown? Is it possible you manually set a validator for the field? Your second question. How to drop a table. 1) enable migrations 2) python web2py.py -S yourapp -M -M 3) type db.yourtable.drop() db.commit() 4) edit the model and remove the table before using the app, else it will be created again. On Tuesday, 17 September 2013 07:46:42 UTC-5, Avi A wrote: Changing it to True, didn't make a change either. On Tuesday, September 17, 2013 3:34:29 PM UTC+3, Avi A wrote: What's the procedure to drop the table? On Tuesday, September 17, 2013 3:22:35 PM UTC+3, Niphlod wrote: if you set migrate=False, what kind of migration you expect ? PS: changing something from integer to string suualy doesn't involve any problem: doing the opposite brings many my totally personal advice is drop those table and recreate them from scratch On Tuesday, September 17, 2013 1:33:54 PM UTC+2, Avi A wrote: Hi, I changed in some table (t_items) a field type from: type='string' to: type='reference t_categories' and replaced: migrate=settings.migrate with: migrate=False,fake_migrate=True I stopped and started the server, but I don't see that the change took place, on the relevant form. (create item.). What should I do? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Making validators trigger only when data is present
In further exploration, there's some inconsistencies in behavior. Sometimes it triggers the error and sometimes it doesn't. I haven't yet figured out what the determining factor is. On Tuesday, September 17, 2013 4:02:53 PM UTC-4, REM wrote: Actually, in checking out this solution, there is no change. It *still*always triggers the validator. What could be causing this? On Tuesday, September 17, 2013 2:56:16 PM UTC-4, Anthony wrote: requires=IS_EMPTY_OR([IS_LENGTH(maxsize=200), IS_MATCH('^[a-zA-Z0-9\s\#\.\$\-\_]+$', error_message ='Character Not Allowed.')]) Anthony On Tuesday, September 17, 2013 2:44:14 PM UTC-4, REM wrote: I have a form field which is not required, but when it is submitted with data, I want the data to be validated. The problem is, I get the validator triggering when the form is submitted with no value in that field. I want it to wait until there's data in there to validate it and ignore it if blank. I thought I could get this behavior with required=False and then using requires= validators, but it is failing the validation every time when there's no data in the field. How do you get it to validate data that's present and ignore blanks? The field in question is in the db.py as follows: Field('special_code1', 'string', length=200, required=False, label='Special Code 1', requires=[IS_LENGTH(maxsize=200), IS_MATCH('^[a-zA-Z0-9\s\#\.\$\-\_]+$',error_message ='Character Not Allowed.')] ), There are no other controllers acting on this data, and no combination of anything I try above gets me what I want. -- 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/groups/opt_out.
[web2py] Re: Making validators trigger only when data is present
Actually, in checking out this solution, there is no change. It *still*always triggers the validator. What could be causing this? On Tuesday, September 17, 2013 2:56:16 PM UTC-4, Anthony wrote: requires=IS_EMPTY_OR([IS_LENGTH(maxsize=200), IS_MATCH('^[a-zA-Z0-9\s\#\.\$\-\_]+$', error_message='Character Not Allowed.')]) Anthony On Tuesday, September 17, 2013 2:44:14 PM UTC-4, REM wrote: I have a form field which is not required, but when it is submitted with data, I want the data to be validated. The problem is, I get the validator triggering when the form is submitted with no value in that field. I want it to wait until there's data in there to validate it and ignore it if blank. I thought I could get this behavior with required=False and then using requires= validators, but it is failing the validation every time when there's no data in the field. How do you get it to validate data that's present and ignore blanks? The field in question is in the db.py as follows: Field('special_code1', 'string', length=200, required=False, label='Special Code 1', requires=[IS_LENGTH(maxsize=200), IS_MATCH('^[a-zA-Z0-9\s\#\.\$\-\_]+$', error_message ='Character Not Allowed.')] ), There are no other controllers acting on this data, and no combination of anything I try above gets me what I want. -- 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/groups/opt_out.
[web2py] Recording audio through web browser
Hey guys, do you know a way to record audio files through the web browser? Best regards Andreas -- 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/groups/opt_out.
[web2py] Re: Making validators trigger only when data is present
requires=IS_EMPTY_OR([IS_LENGTH(maxsize=200), IS_MATCH('^[a-zA-Z0-9\s\#\.\$\-\_]+$', error_message='Character Not Allowed.')]) Anthony On Tuesday, September 17, 2013 2:44:14 PM UTC-4, REM wrote: I have a form field which is not required, but when it is submitted with data, I want the data to be validated. The problem is, I get the validator triggering when the form is submitted with no value in that field. I want it to wait until there's data in there to validate it and ignore it if blank. I thought I could get this behavior with required=False and then using requires= validators, but it is failing the validation every time when there's no data in the field. How do you get it to validate data that's present and ignore blanks? The field in question is in the db.py as follows: Field('special_code1', 'string', length=200, required=False, label='Special Code 1', requires=[IS_LENGTH(maxsize=200), IS_MATCH('^[a-zA-Z0-9\s\#\.\$\-\_]+$', error_message='Character Not Allowed.')] ), There are no other controllers acting on this data, and no combination of anything I try above gets me what I want. -- 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/groups/opt_out.
[web2py] Re: Changing field type.
Sure, thanks. On Tuesday, September 17, 2013 10:57:25 PM UTC+3, Massimo Di Pierro wrote: Can you email me your app (confindentially)? On Tuesday, 17 September 2013 14:49:07 UTC-5, Avi A wrote: i changed some fileds type to :type='upload', notnull=True, and I do see the changes, but not with the dropdwon . On Tuesday, September 17, 2013 10:27:27 PM UTC+3, Massimo Di Pierro wrote: I do not believe the lack of dropdown has anything to do with the migration. Something is changing the validator. On Tuesday, 17 September 2013 13:39:51 UTC-5, Avi A wrote: The first issue, yes I don't get a dropdown list. I only changed the field type and the migration line. I used the wizard to create a new app and there are quite many fixes I have to make, mostly changing the type to reference and replacing strings with uploads. thanks. On Tuesday, September 17, 2013 4:13:46 PM UTC+3, Massimo Di Pierro wrote: There are two different issues. One is the question in your first email about migration. Is the problem that you do not get a dropdown? Is it possible you manually set a validator for the field? Your second question. How to drop a table. 1) enable migrations 2) python web2py.py -S yourapp -M -M 3) type db.yourtable.drop() db.commit() 4) edit the model and remove the table before using the app, else it will be created again. On Tuesday, 17 September 2013 07:46:42 UTC-5, Avi A wrote: Changing it to True, didn't make a change either. On Tuesday, September 17, 2013 3:34:29 PM UTC+3, Avi A wrote: What's the procedure to drop the table? On Tuesday, September 17, 2013 3:22:35 PM UTC+3, Niphlod wrote: if you set migrate=False, what kind of migration you expect ? PS: changing something from integer to string suualy doesn't involve any problem: doing the opposite brings many my totally personal advice is drop those table and recreate them from scratch On Tuesday, September 17, 2013 1:33:54 PM UTC+2, Avi A wrote: Hi, I changed in some table (t_items) a field type from: type='string' to: type='reference t_categories' and replaced: migrate=settings.migrate with: migrate=False,fake_migrate=True I stopped and started the server, but I don't see that the change took place, on the relevant form. (create item.). What should I do? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Changing field type.
i changed some fileds type to :type='upload', notnull=True, and I do see the changes, but not with the dropdwon . On Tuesday, September 17, 2013 10:27:27 PM UTC+3, Massimo Di Pierro wrote: I do not believe the lack of dropdown has anything to do with the migration. Something is changing the validator. On Tuesday, 17 September 2013 13:39:51 UTC-5, Avi A wrote: The first issue, yes I don't get a dropdown list. I only changed the field type and the migration line. I used the wizard to create a new app and there are quite many fixes I have to make, mostly changing the type to reference and replacing strings with uploads. thanks. On Tuesday, September 17, 2013 4:13:46 PM UTC+3, Massimo Di Pierro wrote: There are two different issues. One is the question in your first email about migration. Is the problem that you do not get a dropdown? Is it possible you manually set a validator for the field? Your second question. How to drop a table. 1) enable migrations 2) python web2py.py -S yourapp -M -M 3) type db.yourtable.drop() db.commit() 4) edit the model and remove the table before using the app, else it will be created again. On Tuesday, 17 September 2013 07:46:42 UTC-5, Avi A wrote: Changing it to True, didn't make a change either. On Tuesday, September 17, 2013 3:34:29 PM UTC+3, Avi A wrote: What's the procedure to drop the table? On Tuesday, September 17, 2013 3:22:35 PM UTC+3, Niphlod wrote: if you set migrate=False, what kind of migration you expect ? PS: changing something from integer to string suualy doesn't involve any problem: doing the opposite brings many my totally personal advice is drop those table and recreate them from scratch On Tuesday, September 17, 2013 1:33:54 PM UTC+2, Avi A wrote: Hi, I changed in some table (t_items) a field type from: type='string' to: type='reference t_categories' and replaced: migrate=settings.migrate with: migrate=False,fake_migrate=True I stopped and started the server, but I don't see that the change took place, on the relevant form. (create item.). What should I do? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Changing field type.
Can you email me your app (confindentially)? On Tuesday, 17 September 2013 14:49:07 UTC-5, Avi A wrote: i changed some fileds type to :type='upload', notnull=True, and I do see the changes, but not with the dropdwon . On Tuesday, September 17, 2013 10:27:27 PM UTC+3, Massimo Di Pierro wrote: I do not believe the lack of dropdown has anything to do with the migration. Something is changing the validator. On Tuesday, 17 September 2013 13:39:51 UTC-5, Avi A wrote: The first issue, yes I don't get a dropdown list. I only changed the field type and the migration line. I used the wizard to create a new app and there are quite many fixes I have to make, mostly changing the type to reference and replacing strings with uploads. thanks. On Tuesday, September 17, 2013 4:13:46 PM UTC+3, Massimo Di Pierro wrote: There are two different issues. One is the question in your first email about migration. Is the problem that you do not get a dropdown? Is it possible you manually set a validator for the field? Your second question. How to drop a table. 1) enable migrations 2) python web2py.py -S yourapp -M -M 3) type db.yourtable.drop() db.commit() 4) edit the model and remove the table before using the app, else it will be created again. On Tuesday, 17 September 2013 07:46:42 UTC-5, Avi A wrote: Changing it to True, didn't make a change either. On Tuesday, September 17, 2013 3:34:29 PM UTC+3, Avi A wrote: What's the procedure to drop the table? On Tuesday, September 17, 2013 3:22:35 PM UTC+3, Niphlod wrote: if you set migrate=False, what kind of migration you expect ? PS: changing something from integer to string suualy doesn't involve any problem: doing the opposite brings many my totally personal advice is drop those table and recreate them from scratch On Tuesday, September 17, 2013 1:33:54 PM UTC+2, Avi A wrote: Hi, I changed in some table (t_items) a field type from: type='string' to: type='reference t_categories' and replaced: migrate=settings.migrate with: migrate=False,fake_migrate=True I stopped and started the server, but I don't see that the change took place, on the relevant form. (create item.). What should I do? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Recording audio through web browser
what do you mean? Record a online radio stream? There is downloadhelper extension for firefox that can help download youtube or other media : https://addons.mozilla.org/fr/firefox/addon/video-downloadhelper/ About recording audio stream I don't know there is surely a solution, but I only had works with podcast or that kind of stuff. Richard On Tue, Sep 17, 2013 at 4:17 PM, Andreas Wienes itsys...@gmail.com wrote: Hey guys, do you know a way to record audio files through the web browser? Best regards Andreas -- 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/groups/opt_out. -- 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/groups/opt_out.
[web2py] CAS Question
I´m planning on having multiple apps in my web2py server. I think i should use CAS but seems correct to create a CAS app only for that purpose,Authentication. I tried using some of the apps as a CAS provider but using it from another app only allows the user to log in, not to register. Is this ok? Also should i have an app only for CAS purposes? Pros/cons? Thank you Also where is that CAS appliance with a fancy login screen? Thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to 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/groups/opt_out.
[web2py] Re: Using web2py on multiple domains on Dreamhost.
There is a README in /web2py/handlers/README Doh; completely missed that. However, it still won't work! You need to copy /web2py/handlers/wsgihandler.py into /web2py/wsgihandler.py and link the latter. I did this. I have: /home/username/web2py/wsgihandler.py /home/username/mydomain.com/passenger_wsgi.py passenger_wsgi.py - /home/username/web2py/wsgihandler.py And I get the exact same error about running from the wrong folder. What am I doing wrong? (I get the error trying to test by doing /home/username/web2py/passenger_wsgi.py --- in the browser, I have this: An error occurred importing your passenger_wsgi.py) This was a much debated change in web2py 2.6.x. We decided that handlers are examples that users should copy because they may want to modify them. Is there any reason, beyond choosing the python version, a complete newbie user (me) would ever need to modify it? Or is web2py targeted more towards experienced developers? (After much research, and especially the 'security' section of web2py's manual, it really seemed usable for complete newbies, in addition to experts who might want to modify handlers! ;-) ) -- 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/groups/opt_out.
[web2py] Re: Using web2py on multiple domains on Dreamhost.
Edit the file and at the top add: import os; os.chdir(' /home/username/web2py') On Tuesday, 17 September 2013 17:09:20 UTC-5, Epyt Otorp wrote: There is a README in /web2py/handlers/README Doh; completely missed that. However, it still won't work! You need to copy /web2py/handlers/wsgihandler.py into /web2py/wsgihandler.py and link the latter. I did this. I have: /home/username/web2py/wsgihandler.py /home/username/mydomain.com/passenger_wsgi.py passenger_wsgi.py - /home/username/web2py/wsgihandler.py And I get the exact same error about running from the wrong folder. What am I doing wrong? (I get the error trying to test by doing /home/username/web2py/passenger_wsgi.py --- in the browser, I have this: An error occurred importing your passenger_wsgi.py) This was a much debated change in web2py 2.6.x. We decided that handlers are examples that users should copy because they may want to modify them. Is there any reason, beyond choosing the python version, a complete newbie user (me) would ever need to modify it? Or is web2py targeted more towards experienced developers? (After much research, and especially the 'security' section of web2py's manual, it really seemed usable for complete newbies, in addition to experts who might want to modify handlers! ;-) ) -- 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/groups/opt_out.
[web2py] Re: Using web2py on multiple domains on Dreamhost.
Correction edit the file and change path = os.path.dirname(os.path.abspath(__file__)) into path = '/home/username/web2py/' This file does not like to be symlinked. On Tuesday, 17 September 2013 17:17:38 UTC-5, Massimo Di Pierro wrote: Edit the file and at the top add: import os; os.chdir(' /home/username/web2py') On Tuesday, 17 September 2013 17:09:20 UTC-5, Epyt Otorp wrote: There is a README in /web2py/handlers/README Doh; completely missed that. However, it still won't work! You need to copy /web2py/handlers/wsgihandler.py into /web2py/wsgihandler.py and link the latter. I did this. I have: /home/username/web2py/wsgihandler.py /home/username/mydomain.com/passenger_wsgi.py passenger_wsgi.py - /home/username/web2py/wsgihandler.py And I get the exact same error about running from the wrong folder. What am I doing wrong? (I get the error trying to test by doing /home/username/web2py/passenger_wsgi.py --- in the browser, I have this: An error occurred importing your passenger_wsgi.py) This was a much debated change in web2py 2.6.x. We decided that handlers are examples that users should copy because they may want to modify them. Is there any reason, beyond choosing the python version, a complete newbie user (me) would ever need to modify it? Or is web2py targeted more towards experienced developers? (After much research, and especially the 'security' section of web2py's manual, it really seemed usable for complete newbies, in addition to experts who might want to modify handlers! ;-) ) -- 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/groups/opt_out.
[web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ
Hi Massimo- I took a look in gluon/tools.py as you recommended, and I do not see class Config! So I'm not sure why that might be. Could it be that the command line updating (unzipping web2py_src) works fine, but the GUI-based button updater on the admin interface halts partway through or something? Thanks, -Matt On Saturday, September 14, 2013 10:02:46 PM UTC-4, Massimo Di Pierro wrote: This is the error in the ticket you posted: Traceback (most recent call last):\n File /home/mattspence/web2py/gluon/restricted.py, line 212, in restricted\n exec ccode in environment\n File /home/mattspence/web2py/applications/admin/controllers/default.py, line 14, in module\nfrom gluon.tools import Config\nImportError: cannot import name Config You can see in /home/mattspence/web2py/applications/admin/controllers/default.py line from gluon.tools import Config Now check if gluon/tools.py contains class Config. I know it is there in 2.6.1 and 2.6.2. The issue is if PythonAnywhere reloading failing? Or is there a path issue and it is looking at the wrong gluon/tools.py somewhere else? On Saturday, 14 September 2013 18:55:08 UTC-5, Matthew Spence wrote: Hi guys- I just tried a fresh install of web2py on PythonAnywhere. (So, only the stock applications of welcome, admin, and examples.) It auto-installs with 2.5.1, so I hit the button to upgrade to 2.6.2. It looks like it starts to install, but then I get Internal Error again. I pasted the error message here: http://pastebin.com/uABGmGgV Thanks!! On Thursday, September 12, 2013 6:27:37 PM UTC-4, Massimo Di Pierro wrote: Web2py 2.6.1 is finally OUT. It needs some more testing. READ BELOW BEFORE UPGRADING Attention all users: For pre 2.6 applications to work with web2py =2.6, you must copy static/js/web2py.js, controllers/appadmin.py, and views/appadmin.html from the welcome app to your own apps (all of them). Attention production users: The updated handlers and examples are in handlers/ and examples/. The updated ones will not override the existing ones. To use the new ones it is not sufficient to upgrade web2py, you also need to copy the desired handler/example in the root web2py/ folder. Attention MySQL users: The length of string fields changed from 255 to 512 bytes. If you have migrations enabled this will trigger a large migration. To prevent it, first set migrate_enabled=False, upgrade, check everything is ok, then add length=255 to your string Fields, then re-enable migrations with migrate_enabled=True if needed. - better directory structure: handlers/ extras/ examples/ - better MongoDb support, thanks Alan - better Admin editor interface, thanks Paolo, Roberto (codemirror 3), and Lightdot - better layout.html and web2py_bootstrap.css, thanks Paolo - refactored web2py.js makes code more readable, thanks Niphlod - compute fields can depend on other compute(d) fields - more functions in appadmin (/manage/auth), thanks Anthony - support for CAST in SQL generation - new API jQuery('#component').reload() - new API rows.render() - new API table.field.referent, table._references - new API db(...).validate_and_update(...) - new API Wiki(..., force_render=True) renders the page source again instead of using cached - Wiki now automatically parses named component arguments @{f:a=1,b='twp',c=variable} - auth.get_or_create_user(login=False) - auth = Auth(crsf_protection = False) prevents creating sessions in login/register forms. - enable multiple renderers in wiki, thanks Alan - log messages from Auth are no longer translated (for speed and readability) - update jQuery mobile to 1.3.1 - reduced memory footprint by conditionally loading Tk - faster pbkdf2 uses OpenSSL, thanks Michele - many speed improvements, thanks Michele - better session logic, prevents false positive when detecting session changes. - scripts/import_static.py converts a static site to a web2py app (experimental) - support for new http error code 451 - profiler saves dump in dir, thanks Niphlod - upgraded pyfpdf, thanks Mariano - gluon/contrib/pdfinvoice.py for generating PDF invoices (assumes reportlab) - no more double submission of forms (even without crsf protection), thanks Niphlod - speedup for define_table, thanks Michele - settings.cfg to admin, thanks Paolo - many bugs fixed, thanks Niphlod, Michele, Roberto, Jonathan, and many others -- 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/groups/opt_out.
Re: [web2py] Re: Making validators trigger only when data is present
Well, by now I have tested the heck out of this thing, and the ill behavior has gone away and I can't get it to come back. My natural curiosity wants to know why but, in any case, good riddance! On Tue, Sep 17, 2013 at 4:12 PM, REM 32variati...@gmail.com wrote: In further exploration, there's some inconsistencies in behavior. Sometimes it triggers the error and sometimes it doesn't. I haven't yet figured out what the determining factor is. On Tuesday, September 17, 2013 4:02:53 PM UTC-4, REM wrote: Actually, in checking out this solution, there is no change. It *still*always triggers the validator. What could be causing this? On Tuesday, September 17, 2013 2:56:16 PM UTC-4, Anthony wrote: requires=IS_EMPTY_OR([IS_**LENGTH(maxsize=200), IS_MATCH('^[a-zA-Z0-9\s\#\.\$**\-\_]+$',error_message ='Character Not Allowed.')]) Anthony On Tuesday, September 17, 2013 2:44:14 PM UTC-4, REM wrote: I have a form field which is not required, but when it is submitted with data, I want the data to be validated. The problem is, I get the validator triggering when the form is submitted with no value in that field. I want it to wait until there's data in there to validate it and ignore it if blank. I thought I could get this behavior with required=False and then using requires= validators, but it is failing the validation every time when there's no data in the field. How do you get it to validate data that's present and ignore blanks? The field in question is in the db.py as follows: Field('special_code1', 'string', length=200, required=False, label='Special Code 1', requires=[IS_LENGTH(maxsize=2**00), IS_MATCH('^[a-zA-Z0-9\s\#\.\$**\-\_]+$',error_message ='Character Not Allowed.')] ), There are no other controllers acting on this data, and no combination of anything I try above gets me what I want. -- 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/HiTi-ofCemA/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/groups/opt_out. -- 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/groups/opt_out.
[web2py] Re: Using web2py on multiple domains on Dreamhost.
path = os.path.dirname(os.path.abspath(__file__)) into path = '/home/username/web2py/' This file does not like to be symlinked. Thank you! It seems to be working; I ran passenger by hand with no errors, and hitting my domain in a browser gives the welcome (and of course, I can read the documentation to know what to do next.) The Dreamhost wiki's only example explicitly shows doing a symlink. The set up for passenger there is that you have ~/username/yourdomain, where you put the passenger_wsgi.py, and ~/username/yourdomain/public where... I guess something's supposed to go? But, if I understand web2py correctly, everything I do will be under ~/username/web2py/applications, for however many domains I set up? Is there a more proper way of doing things than symlinking the passenger_wsgi.py file? (ie, importing instead? copying the wsgihandler and using absolute paths?) Whatever the case, no error, so, thank you again for your help. Web2py really looks like exactly what I want in a framework and I'm itching to learn. ;-) -- 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/groups/opt_out.
[web2py] Re: Using web2py on multiple domains on Dreamhost.
This is why we moved the wsgihandler.py to the handlers subfolder, so that people can copy and edit it to accommodate the requirements of their own hosting provider. On Tuesday, 17 September 2013 17:31:36 UTC-5, Epyt Otorp wrote: path = os.path.dirname(os.path.abspath(__file__)) into path = '/home/username/web2py/' This file does not like to be symlinked. Thank you! It seems to be working; I ran passenger by hand with no errors, and hitting my domain in a browser gives the welcome (and of course, I can read the documentation to know what to do next.) The Dreamhost wiki's only example explicitly shows doing a symlink. The set up for passenger there is that you have ~/username/yourdomain, where you put the passenger_wsgi.py, and ~/username/yourdomain/public where... I guess something's supposed to go? But, if I understand web2py correctly, everything I do will be under ~/username/web2py/applications, for however many domains I set up? Is there a more proper way of doing things than symlinking the passenger_wsgi.py file? (ie, importing instead? copying the wsgihandler and using absolute paths?) Whatever the case, no error, so, thank you again for your help. Web2py really looks like exactly what I want in a framework and I'm itching to learn. ;-) -- 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/groups/opt_out.
[web2py] Re: Web2Py compute fields not working on update
On Wednesday, 18 September 2013 01:05:28 UTC+10, Anthony wrote: On Monday, September 16, 2013 9:07:35 PM UTC-4, Tim Richardson wrote: The importance of definition order is in the book Where specifically? Are you talking about the fact that a computed field can depend on a previously defined computed field (but not a computed field that hasn't been defined yet)? Yes, this is what I meant was my interpretation of the problem. -- 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/groups/opt_out.
[web2py] Re: Spatial / GIS support in DAL
Absolutely! Thank you very much. On Tuesday, September 17, 2013 8:38:31 PM UTC+10, Niphlod wrote: this is rather a how can I enable GIS support on postgres? question... http://trac.osgeo.org/postgis/wiki/UsersWikiNewbieAddgeometrycolumn Il giorno martedì 17 settembre 2013 12:05:27 UTC+2, Nate ha scritto: I cannot get Postgis to work with web2py™ Version 2.6.3-stable+timestamp.2013.09.15.17.01.20 Python Python 2.7.3: C:\Python27\python.exe (prefix: C:\Python27) pg.define_table('franchise', Field('code', 'string', length=1), Field('name'), ) pg.define_table('fastfood', Field('franchise', 'reference franchise'), Field('lat', 'double'), Field('lon', 'double'), Field('geom', 'geometry()'), ) results in class 'psycopg2.ProgrammingError' function addgeometrycolumn(unknown, unknown, unknown, integer, unknown, integer) does not exist LINE 1: SELECT AddGeometryColumn ('', 'fastfood', 'geom', 4326, 'GEO... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. Assistance appreciated -- 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/groups/opt_out.
[web2py] Postgresql and timestamp
Hi I've looked through the forum and can find nothing. my code db.define_table('franchise', Field('code', 'string', length=1), Field('name'), Field('recorddate','timestamp with time zone'), ) the error type 'exceptions.SyntaxError' Field: unknown field type: timestamp with time zone for recorddate Assistance appreciated. -- 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/groups/opt_out.
Re: [web2py] Recording audio through web browser
What I mean is to record audio through the browser using the build in microphone. Imagine you visit a website and are able to record your own voice. Am Dienstag, 17. September 2013 23:23:18 UTC+2 schrieb Richard: what do you mean? Record a online radio stream? There is downloadhelper extension for firefox that can help download youtube or other media : https://addons.mozilla.org/fr/firefox/addon/video-downloadhelper/ About recording audio stream I don't know there is surely a solution, but I only had works with podcast or that kind of stuff. Richard On Tue, Sep 17, 2013 at 4:17 PM, Andreas Wienes itsy...@gmail.comjavascript: wrote: Hey guys, do you know a way to record audio files through the web browser? Best regards Andreas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- 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/groups/opt_out.