[web2py] Re: Multiple tables with record_versioning; one view where history of multiple record versioning is in i

2014-10-18 Thread Leonel Câmara
You could make an application wide changelog table. Something like: db.define_table('changelog', Field('table'), Field('record', 'integer'), Field('modified_on', 'datetime', default=request.now), Field('modified_by', 'reference auth_user', default=auth.user_id), ) Then you could

[web2py] Re: Apostrophe causes new column in PYFPDF

2014-10-18 Thread Leonel Câmara
Fix for web2py's side of the problem submitted: https://github.com/web2py/web2py/pull/531 This fixes web2py's escaping of '#x27;'. On to fpdf unquoting stuff. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Customizing generated columns from SQLFROM.grid

2014-10-18 Thread Francisco Ribeiro
hello everyone, I believe I have ran into a dead end but maybe one of you may find a way for what I'm trying to do. So, please consider this model: db.define_table('house', Field('location_type', requires=IS_IN_SET(['city', 'country', 'sea'])), Field('location_type_msg'),

[web2py] Re: Error reading email

2014-10-18 Thread Leonel Câmara
It's possible that one of your mailboxes has a name that after removing all characters that should not be in table names becomes an empty string. imap.py does this # remove unwanted characters and store original names # Don't allow leading non alphabetic characters mailbox_name =

[web2py] Image not showing: NetworkError: 404 NOT FOUND

2014-10-18 Thread Spokes
I'm doing something pretty routine in defining a db table in a class within a file in modules, and later, attempting to display an image associated with that table. The table is defined like so: class Image: def __init__(self, db, auth_signature, session, request, response): ...

[web2py] Re: Image not showing: NetworkError: 404 NOT FOUND

2014-10-18 Thread Leonel Câmara
This can be simplified: cl__image = Image(db = db, auth_signature = auth.signature, session = session, request = request, response = response) to: cl__image = Image(db, auth.signature, session, request, response) Consider using current in your module so you don't have to pass

[web2py] Re: Image not showing: NetworkError: 404 NOT FOUND

2014-10-18 Thread Spokes
Consider using current in your module so you don't have to pass everything as an argument. Awesome - thanks! I had no idea about that; was previously just using current to access current.T(). Anyway, if you change this does it work Thanks, Leonel. The suggested changes didn't fix it,

[web2py] Re: Image not showing: NetworkError: 404 NOT FOUND

2014-10-18 Thread Leonel Câmara
I think I figured it out. The problem is that the table t_image isn't defined in the download function. Because it's only defined when you instantiate an Image. Consider making a @staticmethod define_tables in Image that will define the table and call it in the models. -- Resources: -

[web2py] Deployment

2014-10-18 Thread Jigar Mistry
Hello everyone, Is this possible to deploy single web2py app on nginx without web2py? Thanks, Jigar Mistry -- 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)

[web2py] Re: Error starting up scheduler with postgresql - type oid 114 not mapped to py

2014-10-18 Thread Sebastian Echeverria
Ok, so installing psycopg2 did make web2py use it instead of pg8000. And I stopped getting the error I was seeing before. However, when trying to start the scheduler, I get another error, which from what I see comes from the line right after the one generating the previous error:

[web2py] Change to postgresql database issue

2014-10-18 Thread Tony Huang
Recently, I start to research web2py. I type 'python web2py.py' to run web2py application, and create a new application name 'myapp'. The default database is SQLite, and I can sing up new user successful. However, it will crash when I change the database to postgresql. The error is: type

Re: [web2py] Re: Apostrophe causes new column in PYFPDF

2014-10-18 Thread Richard Warg
I haven't had time to dig into this myself, but the solution needs to also handle the following case: {{mytext= a is than b c is b}} trtd {{=mytext}}/tdtdThis goes in column 2 /td/tr The '', '', and '' should not start a new column. Richard Warg On Oct 17, 2014 5:51 AM, Leonel Câmara

[web2py] Re: Error starting up scheduler with postgresql - type oid 114 not mapped to py

2014-10-18 Thread Sebastian Echeverria
Perfect, that is exactly what I needed to know. Thanks! On Friday, October 17, 2014 12:43:59 PM UTC-3, Niphlod wrote: if ou're using a DAL uri as postgresql://blablabla the only thing to do is to install psycopg2 on the system: if available, it takes precedence. On Thursday, October 16,

[web2py] Re: Image not showing: NetworkError: 404 NOT FOUND

2014-10-18 Thread Spokes
I've tried the following: def download(): print \ndb.tables:, db.tables print \ndb.tables fields:, db['t_image'].fields return response.download(request,db) It does show that t_image is part of the db definition, and that all the fields that should be there are present. On

[web2py] Re: Error starting up scheduler with postgresql - type oid 114 not mapped to py

2014-10-18 Thread Niphlod
update web2py to 2.9.11 please. On Saturday, October 18, 2014 5:13:46 AM UTC+2, Sebastian Echeverria wrote: Ok, so installing psycopg2 did make web2py use it instead of pg8000. And I stopped getting the error I was seeing before. However, when trying to start the scheduler, I get another

[web2py] Re: Change to postgresql database issue

2014-10-18 Thread Niphlod
if you change the database uri, you NEED to let web2py migration on, at least for the very first request. Your migrate_enabled=False is making web2py think a table is already created. On Saturday, October 18, 2014 4:26:11 AM UTC+2, Tony Huang wrote: Recently, I start to research web2py. I

[web2py] Re: Deployment

2014-10-18 Thread Niphlod
the question is RY strange. goes on the same line as is it possible to deploy a single python app without python ? if you have a web2py app, you need web2py to let the app run. On Saturday, October 18, 2014 4:20:17 AM UTC+2, Jigar Mistry wrote: Hello everyone, Is this

Re: [web2py] Re: How to delete session file on logout

2014-10-18 Thread Niphlod
that's why the whole thing goes away behind SSL. Expiring a session on logout is better than leaving it as it is, but even in that case while userA is logged in there's NO way to prevent a MITM from someone else. On Saturday, October 18, 2014 12:18:30 AM UTC+2, Anthony wrote: On Friday,

[web2py] Re: float field search and grid/smartgrid

2014-10-18 Thread Mirko
Up... Anybody else had this issue ? Thanks, -Mirko On Friday, October 17, 2014 8:44:41 AM UTC+2, Mirko wrote: Hi all, maybe I should elaborate a little bit more: here's my model: db.define_table('myTable', Field('myDate','datetime'),

Re: [web2py] pg8000 driver that comes with web2py 2.8.2 is not supporting JSON field type?

2014-10-18 Thread Niphlod
PR sent to fix the behaviour with pg8000 On Friday, October 17, 2014 9:02:08 PM UTC+2, Anthony wrote: If the only problem is with JSON support, you might try the following: db._adapter.types['JSON'] = 'TEXT' The above is the default when the driver doesn't support JSON (it gets changed to

[web2py] Re: Image not showing: NetworkError: 404 NOT FOUND

2014-10-18 Thread Spokes
Tried the approach of adding the table in the modules as well; it didn't produce any change in the results. Any other possibilities for what could be going on? Could it be a windows filesystem issue (although I've got uploads with more unwieldy names associated with other tables)? On

Re: [web2py] Re: SQLFORM.grid search with custom request.vars

2014-10-18 Thread Alfonso de la Guarda Reyes
Hi, Any change about this? or at lesat how to solve? El jueves, 8 de mayo de 2014 03:22:14 UTC-5, Paolo Valleri escribió: I opened an issue https://code.google.com/p/web2py/issues/detail?id=1931 On Wednesday, May 7, 2014 3:24:38 PM UTC+2, Anthony wrote: On Wednesday, May 7, 2014 4:00:33