[web2py] Re: fyi: web2py 1.96.4 breaks with pywin32-2.16 - fine with pywin32-2.14

2011-06-16 Thread baloan
6:28 2011] [error] [client 192.168.178.24] ImportError: DLL load failed: The specified module could not be found. Regards, Andreas On Jun 16, 10:24 am, baloan wrote: > No, this is a fresh install from the Windows source version ofwww.web2py.com. > The error occured when a

[web2py] Re: fyi: web2py 1.96.4 breaks with pywin32-2.16 - fine with pywin32-2.14

2011-06-16 Thread baloan
s.OVERLAPPED() > > Did you change the code? > > On Jun 15, 3:39 pm, baloan wrote: > > > > > > > > > After a system upgrade I found that web2py 1.96.4 breaks with pywin32 > > 2.16. It works fine with pywin32 2.14. The installation features > > mercu

[web2py] fyi: web2py 1.96.4 breaks with pywin32-2.16 - fine with pywin32-2.14

2011-06-15 Thread baloan
After a system upgrade I found that web2py 1.96.4 breaks with pywin32 2.16. It works fine with pywin32 2.14. The installation features mercurial 1.7.5. I can't use mercurial 1.8.4 because it breaks my trac 0.12.2 installation. With web2py 1.96.4, pywin32 2.16, mercurial 1.7.5 I see the following e

[web2py] Field update attribute broken?

2010-11-12 Thread baloan
me', default=request.now, writable=False), Field('change_user', 'string', update=username, writable=False), Field('change_date', 'datetime', update=request.now, writable=False), ) and get the following form on

[web2py] Bug(?): CRUD delete ignores record versioning

2010-11-06 Thread baloan
Hello, when using crud.delete(db.table, id) there is no insert to the corresponding db.table_archive. Regards, Andreas balo...@gmail.com

[web2py] Re: Confirm deletion of record

2010-11-06 Thread baloan
Hi, 1. when I try this I get a: "NameError: global name 'BUTTON' is not defined". 2. In addition I'd like to show the record that is to be deleted: form = crud.read(db.email, request.args(0)) form += FORM('Confirm delete', INPUT(_type='submit')) Is there a way to append to a form? Regards, And

[web2py] Re: CRUD select with autosort headers

2010-11-04 Thread baloan
ssion[orderby_key][0] = 'desc' else: session[orderby_key][0] = 'asc' else: session[orderby_key] = ['asc', request.vars.orderby] # convert to DAL orderby key = db.email_archive[session[orderby_key][1]] if session

[web2py] Re: CRUD select with autosort headers

2010-11-04 Thread baloan
derby[1]] if session.email_archive_orderby[0] == 'desc': key = ~key emails = crud.select(db.email_archive, headers=headers, orderby=key) return dict(emails=emails) On Nov 4, 10:06 pm, baloan wrote: > When I say ugly I mean: > 1. too much duplication, > 2. too much bo

[web2py] Re: CRUD select with autosort headers

2010-11-04 Thread baloan
When I say ugly I mean: 1. too much duplication, 2. too much boilerplate code. Just imagine what happens if I apply my solution to more than a few tables. Regards, Andreas On Nov 4, 10:00 pm, baloan wrote: > This is my feeble attempt at the problem - but it does the job: > >

[web2py] Re: CRUD delete with user confirmation

2010-11-04 Thread baloan
On Nov 4, 3:28 pm, baloan wrote: > > > Hello, > > > crud.delete(table, id) in 1.87.3 deletes the record right away. I'd > > like to implement a view of the record (as produced by > > crud.read(table, id) with a delete button in the bottom. > > > How

[web2py] Re: CRUD select with autosort headers

2010-11-04 Thread baloan
This is my feeble attempt at the problem - but it does the job: def index(): add_submenu() headers = {'email.id': A('Id', _href=URL(vars=dict(orderby='id'))), 'email.email': A('Email address', _href=URL(vars=dict(orderby='email'))), 'email.active':A('Active',

[web2py] CRUD delete with user confirmation

2010-11-04 Thread baloan
Hello, crud.delete(table, id) in 1.87.3 deletes the record right away. I'd like to implement a view of the record (as produced by crud.read(table, id) with a delete button in the bottom. How would I implement this? Regards, Andreas balo...@gmail.com

[web2py] CRUD select with autosort headers

2010-11-04 Thread baloan
Hello, is there a way to make CRUD.select() build a table that allows to sort (alternately ascending, descending) when clicking the column header? In 1.87.3 the column headers are non-clickable. Best regards, Andreas balo...@gmail.com

[web2py] Record Versioning findings

2010-10-29 Thread baloan
First of all, CRUD is the hell of a productivity tool. Some findings: 1. Definiton of the archive table like given in the book: db.define_table('mytable_arcvhive', Field('current_record',db.mytable), db.mytable) breaks deletion of records in db.mytable. The foreign key constraint in db.myt

[web2py] Record Versioning

2010-10-27 Thread baloan
I am trying to use versioning in an authenticated section of a website. Instead of this: db.define_table('my_table', Field('saved_by',auth.user, default=auth.user_id,update=auth.user_id,writable=False) I was trying this: db.define_table('my_table', Field('saved_by','string', default=auth

[web2py] Re: Best practise to render tables

2010-06-19 Thread baloan
nt(row_b[1]), ...) rows_c.append(row_c) colnames = ('Datetime', 'float', 'n/sec', ...) # How will I create an SQLTABLE here? -- Andreas > Isn't this what SQLTABLE and crud.select is for? > > -- > Thadeus > > On Sat, Jun 19, 2010 at 8:06 AM, baloan wrote: > >

[web2py] Best practise to render tables

2010-06-19 Thread baloan
Since my web application needs to render more than two tables I was too lazy to write/copy/paste table html code over and over again. Instead I implemented render_table which does the job nicely. Everything starts out with one or more database query result sets. Columns are reordered and reassigned

[web2py] auth.settings.registration_requires_approval

2010-02-25 Thread baloan
When setting auth.settings.registration_requires_approval = True new user registration seem to keep sitting in pending state. The admin needs a user interface to approve or reject new registrations. Is there any preconfigured approval pages/process built into web2py or do I have to implement one

[web2py] Re: how to NOT IN with DAL?

2010-02-16 Thread baloan
Hi Tiago, you mean like this? SELECT DAY FROM T WHERE DAY < '2007-12-04' ORDER BY DAY DESC LIMITBY 1 I remember this not working on Oracle 7.3.4 (yeah it is somewhat outdated) because Oracle would sort only AFTER limiting the result set. So, as a workaround this might not work on all databases.

[web2py] Re: how to NOT IN with DAL?

2010-02-16 Thread baloan
Thanks, Massimo. Are you sure about the "[db.t.day.max()]"? I'll also check dal.py if I don't find it in the book. ;-) @Thadeus: on a Sybase ASE MAX returns one row only. See below. CREATE TABLE "mt_mytable" ( id int not null, text varchar ) insert into "tempdb"."guest"."mt_mytable" (id, text)

[web2py] Re: how to NOT IN with DAL?

2010-02-15 Thread baloan
Now I'm trying to do SELECT MAX(DAY) FROM T WHERE DAY < '2007-12-04' and I fail to find an operator for "MAX" in the web2py book. Is it supported? Regards, Andreas PS: The online book is splendid. I like it. Much easier to work with. Now web2py is a truly "free" application. Note: In section

[web2py] how to NOT IN with DAL?

2010-02-12 Thread baloan
Hello, given two tables: >>> db.define_table('A', Field('asof'), Field('data')) >>> db.define_table('B', Field('asof'), Field('other')) I'd like to to identify all rows in A having no row with the same 'asof' in B. SELECT A.ASOF FROM A, B WHERE A.ASOF NOT IN (SELECT B.ASOF FROM B) What is the

[web2py] Re: DAL migration problem

2010-02-02 Thread baloan
Thanks David for the reference. Btw, DATE is not marked as a reserved keyword on PostgreSQL and I can create DATE columns using SQL or the admin tools (pgadmin). Consequently I was doubly confused as DATE appears as a web2py reserved word to me. @Massimo: in your leisure time ;-) you may conside

[web2py] DAL migration problem

2010-02-01 Thread baloan
Hello, I'm using PostgreSQL. Changing db.py from db.define_table('position', Field("day", 'date', unique = True), Field("quantity", "double"), ) to db.define_table('position', Field("date", 'date', unique = True), F

[web2py] Re: online docs crippled?

2010-01-23 Thread baloan
This is how it looks now http://www.baloghs.de/tmp/screenshot1.gif Yesterday the window would occupy all of my firefox and IE screen real estate. Andreas On Jan 23, 5:29 pm, baloan wrote: > Yes. The ones onhttp://www.web2py.com/examples/default/docs. > > On Jan 23, 5:14 pm, mdipier

[web2py] Re: online docs crippled?

2010-01-23 Thread baloan
Yes. The ones on http://www.web2py.com/examples/default/docs. On Jan 23, 5:14 pm, mdipierro wrote: > No. Do you refer to the scribd docs? > > On Jan 23, 9:55 am, baloan wrote: > > > Hello, > > > today I noticed that on both IE and Firefox the online Scribd > >

[web2py] online docs crippled?

2010-01-23 Thread baloan
Hello, today I noticed that on both IE and Firefox the online Scribd documentation only expands to a fraction of the height of my browser window when selecting Fullscreen. Effectively it renders the online docs unusable for me. Is this intentional? Regards, Andreas -- You received this message

[web2py] Auth when using DAL from Windows "Task Scheduler" started scripts

2010-01-22 Thread baloan
By searching for "exec_environment limitations" I found a recent thread pointing out to use import os os.chdir('/path/to/web2py/') from gluon.shell import env globals().update(env('you_app_name', import_models=True)) # now do whatever you need you can use request, db, helpers, etc. when accessing

[web2py:33128] auth() form customization

2009-10-18 Thread baloan
Hello, during authorisation the auth() method generates form html code like this: ...blabla... I'd like to customize the html to fit a css template like this: ...blabla... How would I do this? Regards, Andreas baloand at gmail dot com --~--~-~--~~~---~--~