[web2py] Re: SQLTABLE problem with 2.15.4

2017-11-08 Thread Donatas Burba
The ticket is opened on this bug already without any attention, https://github.com/web2py/web2py/issues/1735 2017 m. lapkritis 7 d., antradienis 15:34:07 UTC+2, DaneW rašė: > > I have upgraded from 2.14.6 to 2.15.4 (in PythonAnywhere using Python 2.7 > and MySQL) and I now get AttributeError*: *

[web2py] Re: Virtual fields disapeared from select() results (v2.11.2)

2015-06-10 Thread Donatas Burba
Thank you. Will be waiting for stable release with this fix. Reverting to v2.10.4 for now. -- 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 t

[web2py] Re: Virtual fields disapeared from select() results (v2.11.2)

2015-06-08 Thread Donatas Burba
This is failing example: db=DAL('sqlite:memory') db.define_table('tt', Field('vv', 'integer'), Field.Virtual('x', lambda row: row.tt.vv * 10)) db.define_table('tt2', Field('ttref', 'reference tt'), Field('vv2', 'integer')) tt1 = db.tt.insert(vv='1') tt2 = db.tt.insert(vv=

[web2py] Re: Virtual fields disapeared from select() results (v2.11.2)

2015-06-07 Thread Donatas Burba
So I must take some more testing and if it fails, I will paste sample source. -- 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 b

[web2py] Is it new feature?

2015-06-06 Thread Donatas Burba
Hello everybody. I am testing my products on web2py v2.11.2 base and have error. I want to ask is it new feature that virtual fields no more exist in Row after select? It means if I have Field.Virtual('x', ...) in my model, after doing db(db.tablename).select() I had this 'x' in results (with w

[web2py] SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Donatas Burba
Hello, everyone. I have a project running on web2py v2.9.5 and an form where SQLFORM shows defined virtual fields. After trying to migrate to v2.9.6 (even up to 2.9.11), I get error ticket in this form, because (if I correctly understand) virtual fields are no more in table.fields list. After e

[web2py] Re: web2py v2.9.3: KeyError: 'Cannot resolve reference subject_subject in contract_contract definition'

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

[web2py] Re: web2py v2.9.3: KeyError: 'Cannot resolve reference subject_subject in contract_contract definition'

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

[web2py] Re: web2py v2.9.3: KeyError: 'Cannot resolve reference subject_subject in contract_contract definition'

2014-03-05 Thread Donatas Burba
Nothing changed after v2.9.4 update. Any ideas or remarks? 2014 m. kovas 4 d., antradienis 19:46:44 UTC+2, Donatas Burba rašė: > > > After upgrading to v2.9.3 (from 2.8.2), error is thrown: > > Traceback (most recent call last): > File "/vagrant/grand/web2py/gluon/restr

[web2py] web2py v2.9.3: KeyError: 'Cannot resolve reference subject_subject in contract_contract definition'

2014-03-04 Thread Donatas Burba
After upgrading to v2.9.3 (from 2.8.2), error is thrown: Traceback (most recent call last): File "/vagrant/grand/web2py/gluon/restricted.py", line 217, in restricted exec ccode in environment File "/vagrant/grand/web2py/applications/grand/models/db_contract.py", line 13, in Field('a

[web2py] Re: only one session/login per user?

2014-02-18 Thread Donatas Burba
I need solution for allowing only one session for one username (not relying on IPs, just one username == one session). This is my quick solution, maybe it helps someone :) So in models/db.py: auth.settings.login_onvalidation.append(lambda form: delete_user_sessions(form.vars.username)) Somewh

[web2py] Re: app-level module no longer found before sys.path modules

2013-07-09 Thread Donatas Burba
The same for me. I have a file called "validators.py" in modules folder. And when I try import it web2py imports gluon/validators.py 2013 m. liepa 9 d., antradienis 19:38:30 UTC+3, Frederick Yankowski rašė: > > I have an app with a modules/utils.py file that I would import into the > controllers

[web2py] Re: Again: virtual field requires type-attribute

2013-02-26 Thread Donatas Burba
I have a workaround for this issue. Just a little helper function in modules: def virtual_field(db, table_name, field_name, field_type, compute=lambda row: None, label='', represent=None): db[table_name][field_name] = Field.Virtual(compute) db[table_name][field_name].type = field_type

[web2py] Re: How do you manage db migrations in application running in production?

2012-11-12 Thread Donatas Burba
I copy all (well, almost all) auto migrations from my development instance (with migrate_enabled=True) to migration file which is run in production (migrate_enabled=False). I prepared a plugin which is responsible for migrations in production, so everything runs automatically. --

[web2py] Re: How do you manage db migrations in application running in production?

2012-11-12 Thread Donatas Burba
I have a folder called 'migrations' inside app, where all required db (structure and data) changes are placed. After source update and apache restart, application checks if any migration is needed (by checking version saved in database and available migration versions). If so, every required mi

[web2py] Re: Reloading modules stops working after some time ...

2012-10-22 Thread Donatas Burba
My problem (with appy.pod) still persists in v2.2.1 so I'm locked to v2.0.9... --

[web2py] Re: Reloading modules stops working after some time ...

2012-10-18 Thread Donatas Burba
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. Traceback (most recent call last): File "/var/www/advokatai/gluon/restricted.py", line 209, in restricted exec ccode in environment File "/home/web2py/advokatai/web2py/applications/bow_law/controllers/plugin_

[web2py] Re: Reloading modules stops working after some time ...

2012-10-18 Thread Donatas Burba
In the app modules 2012 m. spalis 18 d., ketvirtadienis 15:36:17 UTC+3, Massimo Di Pierro rašė: > > Also, where is appy.pod installed? In python site-packages, in web2py > site-packages, or in the app modules? > > On Wednesday, 17 October 2012 22:59:43 UTC-5, Donatas Burba wrot

[web2py] Re: Reloading modules stops working after some time ...

2012-10-17 Thread Donatas Burba
I have noticed another issue. With version 2.1.1 I can't use appy.pod anymore. It means I can generate only one pdf file, every other try gives me error (that I'm using python which can't access uno). I think that problem is in custom_import.py, so I was forced to return back to 2.0.9, where ap

[web2py] Re: Error deleting picture

2012-09-11 Thread Donatas Burba
at all? 2012 m. rugsėjis 12 d., trečiadienis 07:24:42 UTC+3, Donatas Burba rašė: > > Using web2py 2.0.8 and submitting form with attached photo file (standard > widget) and 'delete' (photo) checked I get such error: > > Traceback (most recent call last): > File "/home/dona

[web2py] Error deleting picture

2012-09-11 Thread Donatas Burba
Using web2py 2.0.8 and submitting form with attached photo file (standard widget) and 'delete' (photo) checked I get such error: Traceback (most recent call last): File "/home/donatas/ProCursus/projects/web2py/gluon/restricted.py", line 209, in restricted exec ccode in environment File

[web2py] Re: Is it bug or feature?

2012-09-01 Thread Donatas Burba
I have resolved the problem by creating VirtualField and this is part of previous source: query = ... records = db(query).select(..., db.auth_user.first_name, db.auth_user.last_name, join=[..., db.auth_user.on(db.auth_user.id==...)]) for i, r in enumerate(records):

[web2py] Self referencing with lazy_tables

2012-09-01 Thread Donatas Burba
I noticed a problem with self referencing tables and option lazy_tables=True. This is my code: - model - db.define_table('biography_available_award', Field('title', label=T('biography_available_award__title')), Field('parent_id', 'reference biography_available_award'), Field

[web2py] Is it bug or feature?

2012-09-01 Thread Donatas Burba
Hello, I'm testing new web2py release and not all my code works on it. So the question: is ir bug or feature that in lines (gluon/sqlhtml.py, lines 2419-2422) try: field = sqlrows.db[tablename][fieldname] except KeyError: field = None I got: ... File "/home/donatas/ProCursus/projects/