[web2py] py4web and webkit

2019-12-14 Thread leone
Unable to use _dashboard using webkit by python gi.repository. ** Message: 08:21:43.542: console message: http://localhost:8000/_dashboard/static/js/index.js @5: SyntaxError: Unexpected token '>' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] GeneratorExit on admin application with mobile

2016-12-10 Thread leone
Hello everyone. I'm using pythonanywhere where I uploaded a web2py application. Everything is fine on my pc. But, if you use a tablet Android 4.4 with firefox, I noticed a strange behavior. It all works EXCEPT ADMIN application. I could see in the error pythonanywhere log this warning:

[web2py] admin does not work with tablet on pythonanywhere

2016-11-28 Thread leone
Goodmorning everyone. I downloaded an application on pythonanywhere. It works both on the tablet and on PC. But if I try to perform admin it works perfectly on PC while on the tablet shows a blank page. You can give me some information about it? -- Resources: - http://web2py.com -

[web2py] widget: unexpected error

2013-02-18 Thread leone
Hi all! I built a widget that scans the local server file system. I attach the code of the widget. The content of form.vars and request.vars when the form is submitted is inexplicable for me: form = SQLFORM.factory( Field('tree2','string',

[web2py] Re: Querying on 1:M Relationships in SQLFORM.grid and SQLFORM.smartgrid

2012-11-28 Thread Mike Leone
Di Pierro wrote: Hello Mike, thanks for your patch? Would you please attach it to a google code issue so we do not forget. We cannot add new feaures until all 2.0.x issues have been resolved. On Friday, August 31, 2012 2:41:30 PM UTC-5, Mike Leone wrote: Hello, We're building a web2py

[web2py] Querying on 1:M Relationships in SQLFORM.grid and SQLFORM.smartgrid

2012-08-31 Thread Mike Leone
. I've really enjoyed using the framework and hope to help out as much as I can. Thanks, Mike Leone Principal, Engineering Panoptic Development, Inc. --

[web2py] new web2py application

2012-02-06 Thread leone
Fine! http://www.globaleaks.org/

[web2py] Re: fluxflex - how to?

2011-08-27 Thread leone
Hi, sameone knows how to see server error log informations in fluxflex? I receive internal server errors in uploading a plugin file. Thanks On 27 Ago, 13:39, Ray (a.k.a. Iceberg) iceb...@21cn.com wrote: On Aug 27, 10:03 am, MidGe degreef.mic...@gmail.com wrote: I am trying to use

[web2py] Re: ajax function

2011-04-06 Thread leone
I need to use ajax web2py function passing a costant, es.: ajax(url,[ 'namefld1', 'namefld2', 'costant-value'], ':eval') Exploring code I see that I must insert an input tag with desidered value and call it by name. There is a smarter way? Thanks On 5 Apr, 16:06, Ross Peoples

[web2py] ajax function

2011-04-05 Thread leone
Hi, sometimes I need to use ajax function passing as second argument a list of ids and costants. There is a way to pass to callback values of elements by id, AND string costants? Thanks for help.

[web2py] sqlite:memory

2011-01-21 Thread leone
Hi, have you test 'sqlite:memory' with new DAL? Using db = DAL('sqlite:memory:') (is the syntax correct?) I can insert a new row, but I can't retrieve it when I select the next request. It seems the db is too much volatile... Thanks. leone

[web2py] auth - some help in settings

2010-12-30 Thread leone
in book??? Have you a code example? Thanks in advance and happy new year leone

[web2py] Re: auth - some help in settings

2010-12-30 Thread leone
, now it is clear - but @auth.requires_login() forbids the access until I set profile? Thanks, leone On Dec 30, 1:49 pm, Kaer kaerbu...@gmail.com wrote: On Dec 30, 1:10 pm, leone handja...@gmail.com wrote: Hi. I need some help in auth settings: I define auth.settings.controller

[web2py] auth.settings.controller doesn't run

2010-12-30 Thread leone
to update auth.settings.logout_next = URL(r=request,c='newcontroller',f='index') etc. Setting auth.settings.controller to 'newcontroller', the value of self.settings.controller in def url of Auth class is always 'default'. Is it ok??? Thanks leone

[web2py] Re: auth.settings.controller doesn't run

2010-12-30 Thread leone
informations about pending authorization. Is it correct? I am missing something? On Dec 31, 7:07 am, leone handja...@gmail.com wrote: Hi all! Happy new year! I have put user func in a controller other than 'default' and i set auth.settings.controller='newcontroller' but web2py continue

[web2py] Re: redirect using a new window

2010-11-26 Thread leone
I need to redirect to a new page (for example as a new tab in chrome). On Nov 25, 4:30 pm, mdipierro mdipie...@cs.depaul.edu wrote: I do not understand what you want to do. On Nov 25, 7:13 am, leone handja...@gmail.com wrote: Thanks for suggest, but I need something redirect(URL

[web2py] Re: redirect using a new window

2010-11-26 Thread leone
...@freezable.com wrote: Like so?: A('Open in new window',_href=URL('...'),_target='_blank') On Nov 26, 11:42 am, leone handja...@gmail.com wrote: I need to redirect to a new page (for example as a new tab in chrome). On Nov 25, 4:30 pm, mdipierro mdipie...@cs.depaul.edu wrote: I

[web2py] Re: redirect using a new window

2010-11-25 Thread leone
...@gmail.com wrote: do you mean like this? {{=A('click me!', _href=URL(...), _target='new')}} 2010/11/24 leone handja...@gmail.com: Hi, there is a way to redirect to a new page simulating A , target='new' using URL() or a controller function??? Thanks leone

[web2py] redirect using a new window

2010-11-24 Thread leone
Hi, there is a way to redirect to a new page simulating A , target='new' using URL() or a controller function??? Thanks leone

[web2py] cron

2010-11-20 Thread leone
Hi, what means WARNING:web2py.cron:WEB2PY CRON: Stale cron.master detected? My crontab: #crontab 1 * * * * root *plugin_CRONTAB/test (ubuntu os, last rel web2py) Thanks in advance

[web2py] Re: cron

2010-11-20 Thread leone
Thanks. I discovered an error in script, as probable cause of that warning. I will follow your suggests! leone On Nov 20, 5:12 pm, Jonathan Lundell jlund...@pobox.com wrote: On Nov 20, 2010, at 6:43 AM, mdipierro wrote: Not 100% sure but I think this means that a cron task did not complete

[web2py] ajax and FieldStorage

2010-11-14 Thread leone
stream? Thanks in advance. leone

[web2py] ajax and redirect

2010-11-14 Thread leone
Hi all, how can I use redirect() inside a ajax callback? Thanks in advance leone

[web2py] web2py Version 1.89.1 bug?

2010-11-14 Thread leone
Hi, I have now installed web2py Version 1.89.1. From /admin/default/index it return Internal error Ticket issued: admin/ 127.0.0.1.2010-11-14.10-27-16.28da5829-363a-47d4-8295-814808f71b52 It is impossible to open ticket, that calls another ticket in deadlock loop. (ubuntu os)

[web2py] Re: crud settings

2010-11-14 Thread leone
') On Nov 12, 6:52 am, leone handja...@gmail.com wrote: Hi, peraphs a bias in def mycontroller():       crud.settings.update_next = URL(c=request,f='select')       return dict(crud=crud.update(db.balance, request.args(0))) that redirect to: http://.../../Storage%20{'function':%20

[web2py] Re: ajax and redirect

2010-11-14 Thread leone
Thanks, i understand. On Nov 14, 6:24 pm, mdipierro mdipie...@cs.depaul.edu wrote: depends how you make the ajax callback. If you use LOAD() the redirect should work. If you use ajax(...,':eval') you can return document.location='%s' % URL(...) On Nov 14, 3:23 am, leone handja

[web2py] crud settings

2010-11-12 Thread leone
'wsgi':%20Storage%20{'start_response':%20function%20lambda%20at%200x9f890d4,%20'middleware':%20function%20lambda%20at%200x9f8910c,%20'environ':%20{'wsgi.multiprocess':%20False,%20'HTTP_COOKIE':%20'rootCA= Bye leone

[web2py] cas incorrect address in email

2010-11-10 Thread leone
? Thanks leone

[web2py] httplib2 request

2010-10-20 Thread leone
), headers={'content-type':'text/plain'}, ) return resp, content The web2py function return the correct value in content var, but I cannot retrieve posted dictdata values in request.vars, that is empty. Can someone help me? Thanks, leone

[web2py] sqltable behaviour

2010-10-18 Thread leone
, linkto=mylink) ... I can see mylink called for every row in rows-set when I load controller function. Is this behaviour correct? I supposed that mylink was called only when I click on row-id. Thanks in advance leone

[web2py] Re: sqltable behaviour

2010-10-18 Thread leone
,                                                    linkto=URL('mylink')) On Oct 18, 5:13 am, leone handja...@gmail.com wrote: Hi, I have this code: def something():        ...        def mylink(field,  type, ref):              ...              print I am in mylink at row %s % str(field

[web2py] CRUD.UPDATE

2010-09-17 Thread leone
Why crud.update(..) shows admin, request, session, request and response buttons at bottom page? How can I drop this? Thanks leone

[web2py] crud.update

2010-09-17 Thread leone
Solved. I forgot to create the view. Sorry. leone

[web2py] Re: widgets

2010-06-13 Thread leone
existing in form becames form.var, but apparently it is false. So, to debug my error, I need know how form.vars are built and where in web2py code. Can you suggest where i can address my attenction? Thanks leone On 13 Giu, 03:44, Iceberg iceb...@21cn.com wrote: On Jun12, 12:47pm, leone handja

[web2py] Re: widgets

2010-06-13 Thread leone
. def my_widget(f,v):     inp = SQLFORM.widgets.string.widget(f,v) #or another depending on field     scr = SCRIPT('...',_type=''text/javascript')     return DIV(inp,scr) On Jun 11, 11:47 pm, leone handja...@gmail.com wrote: I coded a widget to use with a Field object. Because I need

[web2py] widgets

2010-06-11 Thread leone
defined by SQLFORM.widgets...? Thanks in advance leone

[web2py] Re: One click start for local development?

2010-03-14 Thread leone
#!/bin/sh cd ./web2py cat /dev/null httpserver.log python web2py.py -a password -i 127.0.0.1 -p 8000 -f /home// web2py leone On 14 Mar, 18:28, Hillman hillma...@gmail.com wrote: Is there a way to start up the local server without needing to use the GUI? Something like: $ python

[web2py] DAL connect string

2010-02-05 Thread leone
I need to resume the connect string from db object. There is a way? Thanks L -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to

[web2py] Re: DAL connect string

2010-02-05 Thread leone
, 8:20 am, leone handja...@gmail.com wrote: I need to resume the connect string from db object. There is a way? Thanks L -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com

[web2py] Re: plug-in webfolder

2010-01-30 Thread leone
plugin_webfolder_files', default=0, requires = IS_IN_DB(db,'plugin_webfolder_files.id','%(name)s')) this is what i used but leone  said that with postgres he get IntegrityError: insert or update on table plugin_webfolder_files violates foreign key constraint plugin_webfolder_files_parent_fkey

[web2py] Re: plug-in webfolder

2010-01-29 Thread leone
Using postgres i debug IntegrityError: insert or update on table plugin_webfolder_files violates foreign key constraint plugin_webfolder_files_parent_fkey DETAIL: Key (parent)=(0) is not present in table plugin_webfolder_files. Have you a suggest? On 29 Gen, 10:38, selecta

[web2py] Question about SQLFORM flow

2010-01-27 Thread leone
I have a question. In flow SQLFORM, accepts etc. when SQLFORM (and the its field values) is rendered as html script so that is updatable only by javascript functions added to returned code? Thanks leone -- You received this message because you are subscribed to the Google Groups web2py-users

[web2py] Re: Question about SQLFORM flow

2010-01-27 Thread leone
are asking? -Thadeus On Wed, Jan 27, 2010 at 8:27 AM, mdipierro mdipie...@cs.depaul.edu wrote: Please ask again. I do not understand. On Jan 27, 4:54 am, leone handja...@gmail.com wrote: I have a question. In flow SQLFORM, accepts etc. when SQLFORM (and the its field values) is rendered

[web2py] widgets

2010-01-24 Thread leone
Have sameone an example about SQLFORM.widgets.options.widget(...)? I am no able to obtain a select-option widget. Thanks leone -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com

[web2py] Re: update a form field after validation

2010-01-23 Thread leone
Sorry. How can I force a value in a field of SQLFORM.factory after its validation? Thanks leone On 22 Gen, 20:03, mdipierro mdipie...@cs.depaul.edu wrote: I still do not understand. I want to know what you try to accomplish, not how you do it. On Jan 22, 12:38 pm, leone handja...@gmail.com

[web2py] update a form field after validation

2010-01-22 Thread leone
I have a SQLFORM.factory with a Field that requires a custom class to incremet a value. It runs, but I can't understand how I can udate the field value after form.accepts and before form is exposed. Have same example? Thanks leone -- You received this message because you are subscribed

[web2py] update a form field after validation

2010-01-22 Thread leone
I have a SQLFORM.factory with a Field that requires a custom class to incremet a value. It runs, but I can't understand how I can udate the field value after form.accepts and before form is exposed. Have same example? Thanks leone -- You received this message because you are subscribed

[web2py] Re: update a form field after validation

2010-01-22 Thread leone
I done it, but when I update forms.vars. with the new value it is not update in the form. Have you a suggest? leone On 22 Gen, 17:03, DenesL denes1...@yahoo.ca wrote: If I understand correctly you could use onvalidation. Example: def your_action():   def funcx():     # code that runs

[web2py] Re: update a form field after validation

2010-01-22 Thread leone
if form.accepts(request.vars, session, keepvalues=True, onvalidation=upd_auto): pass return dict(form=form) Thanks leone On 22 Gen, 17:34, DenesL denes1...@yahoo.ca wrote: Can you post your code? On Jan 22, 11:14 am, leone handja...@gmail.com wrote: I done it, but when I

[web2py] Re: update a form field after validation

2010-01-22 Thread leone
too and I dont' understand how! Probably is very simple, but i have no idea ... Thanks leone On 22 Gen, 18:34, mdipierro mdipie...@cs.depaul.edu wrote: Not sure I understand what this supposed to do. Would you explain it once more. On Jan 22, 10:47 am, leone handja...@gmail.com wrote: I

[web2py] sql replace

2010-01-20 Thread leone
Exist db.replace(...) and db.exists(query) functions in datadase layer? Thanks leone -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email

[web2py] Re: sql replace

2010-01-20 Thread leone
Simply to use sql REPLACE statement. leone On 20 Gen, 16:02, mdipierro mdipie...@cs.depaul.edu wrote: Sorry I do not understand the question. What do you want to do? On Jan 20, 3:49 am, leone handja...@gmail.com wrote: Exist db.replace(...) and db.exists(query) functions in datadase

[web2py] Troubles with migrate

2010-01-18 Thread leone
Several times I receive errors from auth.define_tables() , telling me that relation auth_user already exists. Where is my error? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To

[web2py] Re: Troubles with migrate

2010-01-18 Thread leone
Solved with auth.define_tables(migrate=False) On 18 Gen, 10:56, leone handja...@gmail.com wrote: Several times I receive errors from auth.define_tables() , telling me that relation auth_user already exists. Where is my error? -- You received this message because you are subscribed

[web2py] Re: Troubles with migrate

2010-01-18 Thread leone
, 2010 at 7:37 AM, leone handja...@gmail.com wrote: Solved with auth.define_tables(migrate=False) On 18 Gen, 10:56, leone handja...@gmail.com wrote: Several times I receive errors from auth.define_tables() , telling me that relation auth_user already exists. Where is my error? -- You

[web2py] Re: widget and its form

2010-01-14 Thread leone
the web2py way to solution. Thanks leone On 13 Gen, 19:26, mdipierro mdipie...@cs.depaul.edu wrote: How a widget can know the name and id of the form in which it resides? The built-in widgets do not know. You can make your own widget and pass the information to it. What do you have in mind

[web2py] Re: widget and its form

2010-01-14 Thread leone
vs.append(sql_represent(value, ft, fd, self._db._db_codec)) File /web2py/web2py/gluon/sql.py, line 497, in sql_represent if fieldtype[0] == 'i': TypeError: 'NoneType' object is unsubscriptable Any idea about my error? On 14 Gen, 09:19, leone handja...@gmail.com wrote: I am making

[web2py] Re: widget and its form

2010-01-14 Thread leone
Ach! Thanks. Now it runs. leone On 14 Gen, 15:13, mdipierro mdipie...@cs.depaul.edu wrote: You have Field('name',type=None) and this cannot be. On Jan 14, 7:35 am, leone handja...@gmail.com wrote: I am trying to build a complex widget that mixes helpers (an INPUT helper) and plain html

[web2py] widget and its form

2010-01-13 Thread leone
How a widget can know the name and id of the form in which it resides? Is it possible to use javascript function on submit? Thanks leone -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com

[web2py] import table

2010-01-09 Thread leone
I must import tables from a database manteining the id value of original tables. How can I do? It seems not possible force a value in rowid. Is it possible have more than one autonumber Field (not as rowid) in a table? Thanks leone -- You received this message because you are subscribed

[web2py] Re: import table

2010-01-09 Thread leone
Thanks for yours suggests. I have already created a new colum as integer valorized with rowids of old table. But I have to set it with the new value (in progress) when I insert a new row. There is a smart way to do it? leone On 9 Gen, 09:56, Philip Kilner phil.kil...@gmail.com wrote: Hi Leone

[web2py] Re: import table

2010-01-09 Thread leone
I resolved with a new validator IS_AUTONUMBER On 9 Gen, 11:07, leone handja...@gmail.com wrote: Thanks for yours suggests. I have already created a new colum as integer valorized with rowids of old table. But I have to set it with the new value (in progress) when I insert a new row

[web2py:38202] SQLFORM

2010-01-02 Thread leone
Good morning. Using SQLFORM I must update a row with defined values that i want push in the input tags programmatically. There is a way? Thanks. leone -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web

[web2py:38213] Re: SQLFORM

2010-01-02 Thread leone
When SQLFORM is called with record parm valorized, a row is loaded to be updated. I want set the value of a column by code BEFORE submit it so that it is visible in input field. Default doesn't work (it is not a new row...). How can I do? Is it possible? Thanks leone On 2 Gen, 16:37, mdipierro

[web2py:38217] Re: SQLFORM

2010-01-02 Thread leone
Very simple!!! Thanks. leone On 2 Gen, 17:09, mdipierro mdipie...@cs.depaul.edu wrote: Invece di form=crud.update(table,record_id) Try this: record=table[record_id] record.fieldname = 'newvalue' form=crud.update(table,record) On Jan 2, 9:51 am, leone handja...@gmail.com wrote

[web2py:38219] Re: SQLFORM

2010-01-02 Thread leone
A suggest for documentation: explicit that record argument can be the rowid or the row object. I had not understud it before. By and new thanks. leone On 2 Gen, 17:48, leone handja...@gmail.com wrote: Very simple!!! Thanks. leone On 2 Gen, 17:09, mdipierro mdipie...@cs.depaul.edu wrote

[web2py:35538] web2py and postgresql

2009-11-18 Thread leone
Grrr. I can't uderstand. I have code that runs in sqlite bat non in postgresql. Apparently it is very simple. Where is my error?? db.define_table('secretnum', Field('primocod','string', length=8), Field('secondocod','string', length=5),

[web2py:35548] Re: web2py and postgresql

2009-11-18 Thread leone
Sob, sob... Thanks On 18 Nov, 18:19, annet annet.verm...@gmail.com wrote: I cut and paste your code in a db.py and the default.py index function and it ran without problem. I work on a Mac and use Postgres Plus 8.3 and Web2py 1.72.3 Kind regards, Annet

[web2py:35549] Re: web2py and postgresql

2009-11-18 Thread leone
Strange, very strange. The code runs in db.py module but not in plugin_secretnum.py module in models. Have you notice about plugin problem? On 18 Nov, 18:19, annet annet.verm...@gmail.com wrote: I cut and paste your code in a db.py and the default.py index function and it ran without problem.

[web2py:35562] Re: web2py and postgresql

2009-11-18 Thread leone
:01, mdipierro mdipie...@cs.depaul.edu wrote: what is in sql.log? On Nov 18, 10:54 am, leone handja...@gmail.com wrote: Grrr. I can't uderstand. I have code that runs in sqlite bat non in postgresql. Apparently it is very simple. Where is my error?? db.define_table('secretnum

[web2py:35564] Re: web2py and postgresql

2009-11-18 Thread leone
, leone handja...@gmail.com wrote: If I put DAL and table definition in db.py all is Ok and sql.log report: CREATE TABLE secretnum(         id SERIAL PRIMARY KEY,         primocod VARCHAR(8),         secondocod VARCHAR(5),         terzocod VARCHAR(5),         username VARCHAR(20

[web2py:35572] Re: web2py and postgresql

2009-11-18 Thread leone
Yes, I understand. Thanks On 18 Nov, 21:11, leone handja...@gmail.com wrote: If I put DAL and table definition in db.py all is Ok and sql.log report: CREATE TABLE secretnum(         id SERIAL PRIMARY KEY,         primocod VARCHAR(8),         secondocod VARCHAR(5),         terzocod VARCHAR

[web2py:35481] plugins

2009-11-17 Thread leone
I try to understand and build a plugin. I have a silly question: how can I compress the code in a package?? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send

[web2py:35399] plugin

2009-11-15 Thread leone
There is a developer-manual to build plugins? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send

[web2py:35328] CRUD

2009-11-14 Thread leone
I have no success to customize submit button in crud_create and crud_update. I can't redirect crud_update too. Where is my error? My code: def add(): form = crud.create(db.address, message='Row added') crud.settings.keepvalues = True

[web2py:35330] Re: CRUD

2009-11-14 Thread leone
],                         message='Row updated')     return dict(form=form) On Nov 14, 3:40 am, leone handja...@gmail.com wrote: I have no success to customize submit button in crud_create and crud_update. I can't redirect crud_update too. Where is my error? My code: def add():     form

[web2py:35338] Re: CRUD

2009-11-14 Thread leone
no effect...neither session.flash='' or message = '' On 14 Nov, 12:52, Iceberg iceb...@21cn.com wrote: Use session.flash instead. On Nov14, 7:06pm, leone handja...@gmail.com wrote: Ooops... It runs but .update_next interferes with message in response.flash and redirect

[web2py:35339] Re: CRUD

2009-11-14 Thread leone
= crud.update(db.address,                         request.args[0],                         message='Row updated')     return dict(form=form) On Nov 14, 3:40 am, leone handja...@gmail.com wrote: I have no success to customize submit button in crud_create and crud_update. I can't redirect

[web2py:34896] SQLTABLE

2009-11-08 Thread leone
Where can I find documentation about SQLTABLE? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send

[web2py:33582] A newbie question

2009-10-24 Thread leone
I can't understand as web2py renders input text='file' name='pippo'... in request object. request.var.pippo is filename; where is fileobject? Somewhere your manual has the answer, but I have no success to find it. Thanks PS. I learn very much reading plugin approach

[web2py:33592] Re: A newbie question

2009-10-24 Thread leone
done? Thanks On 24 Ott, 17:24, mdipierro mdipie...@cs.depaul.edu wrote: request.vars.pippo would be a cgi.FieldStorage object: http://docs.python.org/library/cgi.html On Oct 24, 10:20 am, leone handja...@gmail.com wrote: I can't understand as web2py renders input text='file' name

[web2py:33606] Re: A newbie question

2009-10-24 Thread leone
: request.vars.filepath is a str object, not FieldStorage Where my error? On 24 Ott, 17:24, mdipierro mdipie...@cs.depaul.edu wrote: request.vars.pippo would be a cgi.FieldStorage object: http://docs.python.org/library/cgi.html On Oct 24, 10:20 am, leone handja...@gmail.com wrote: I can't understand

[web2py:33618] Re: A newbie question

2009-10-24 Thread leone
I have no words. On 24 Ott, 20:24, mdipierro mdipie...@cs.depaul.edu wrote: haha, the  form tag is missing form enctype=multipart/form-data On Oct 24, 1:14 pm, leone handja...@gmail.com wrote: Dear Massimo, I write a view: form action='' method='post' input type='file' name

[web2py:32996] import module from modules

2009-10-16 Thread leone
I try to import a module of py files (initialized by __init__.py) and that is set in applications/myapp/modules folder, but I receive errors about import. from applications/myapp/modules/mymodule import * fails! Is it possible this approach or I have to put py files directly under /

[web2py:33026] Re: import module from modules

2009-10-16 Thread leone
Yes I know. I use it to import single module. I receive errors when I try to import applications.myapp.modules.widgets.pippo as pippo where widgets is a directory ( with __init__.py) located in myapp/ modules and contain pippo.py. I can import only modules as files under /modules? leone On 16

[web2py:33033] Re: import module from modules

2009-10-16 Thread leone
Thanks leone On 16 Ott, 22:05, mdipierro mdipie...@cs.depaul.edu wrote: No this should work. I do it all the time. There must a bypo somewhere On Oct 16, 2:15 pm, leone handja...@gmail.com wrote: Yes I know. I use it to import single module. I receive errors when I try to import

[web2py:32654] Re: SELECT - UTF-8 errors

2009-10-11 Thread leone
Yes, I have added .encode('utf8') to my default Field('subject','text', default=u''.encode('utf8')), On 11 Ott, 01:53, Iceberg iceb...@21cn.com wrote: On Oct11, 3:42am, leone handja...@gmail.com wrote: I have same string inserted in a table. When I select them, I debug this error

[web2py:32634] SELECT - UTF-8 errors

2009-10-10 Thread leone
I have same string inserted in a table. When I select them, I debug this error: File /xx/xx/web2py/web2py/gluon/sql.py, line 2235, in response return self._db._cursor.fetchall() OperationalError: Could not decode to UTF-8 column 'subject' with text 'x � i�xxx'

[web2py:32536] Re: SQLFORM

2009-10-09 Thread leone
{     width: 450px; } or go crazy... db.define_table('mytable',Field('myfield','string')) db.mytable.myfield.widget = lambda f,v: INPUT(_type=text, _value=v, _class=crazy_input,_name=myfield,_id=mytable_myfield, _size=100) On Oct 8, 11:40 pm, leone handja...@gmail.com wrote: I know

[web2py:32546] SQLFORM onvalidate

2009-10-09 Thread leone
I have questions about SQLFORM onvalidate. Before inserting a row I have to resize an image by PIL and push b64encoded bytes on a blob field. So I have defined onvalidate=DoSomething in SQLFORM. DoSomething has form as input arg, resize image as thumbnails, encode it and push in form.vars.myblob

[web2py:32547] Re: SQLFORM

2009-10-09 Thread leone
, _value=v, _class=crazy_input,_name=myfield,_id=mytable_myfield, _size=100) On Oct 8, 11:40 pm, leone handja...@gmail.com wrote: I know, but no effect. Strange. Do you know if SQLFORM's argument onvalidation is executed before inserting row? On 8 Ott, 22:51, Thadeus Burgess thade

[web2py:32548] Re: SQLFORM onvalidate

2009-10-09 Thread leone
excuse me: onvalidation not onvalidate. On 9 Ott, 14:20, leone handja...@gmail.com wrote: I have questions about SQLFORM onvalidate. Before inserting a row I have to resize an image by PIL and push b64encoded bytes on a blob field. So I have defined onvalidate=DoSomething in SQLFORM

[web2py:32556] Re: SQLFORM onvalidate

2009-10-09 Thread leone
),Image.ANTIALIAS) im.save(o,'jpeg') form.vars.thumbnail = base64.b64encode(o.getvalue()) o.close() i.close() img src=data:image/jpeg;base64,{{=row['thumbnail']}} alt=Thumbnail photo / On 9 Ott, 14:48, leone handja...@gmail.com wrote: excuse me

[web2py:32557] Re: SQLFORM onvalidate

2009-10-09 Thread leone
I forget: from PIL import Image On 9 Ott, 15:49, leone handja...@gmail.com wrote: Solved: if form.accepts(request.vars, session, keepvalues=True, onvalidation=WriteThumb):          . def WriteThumb(form):     i = cStringIO.StringIO()     o = cStringIO.StringIO()     i.write

[web2py:32474] SQLFORM

2009-10-08 Thread leone
Two questions: 1) how can I set the length of an html input field generated by SQLFORM? They have all the same size. 2) It needs same commit() using SQLite? My submits seem to generate no rows. Thanks in advance. --~--~-~--~~~---~--~~ You received this message

[web2py:32532] Re: SQLFORM

2009-10-08 Thread leone
I know, but no effect. Strange. Do you know if SQLFORM's argument onvalidation is executed before inserting row? On 8 Ott, 22:51, Thadeus Burgess thade...@thadeusb.com wrote: leone, To change the size in css you have to use the width property, there is no size property in css. input

[web2py:32379] Re: FORM factory

2009-10-07 Thread leone
, mdipierro mdipie...@cs.depaul.edu wrote: Let us know when you find out. Massimo On Oct 6, 2:43 pm, leone handja...@gmail.com wrote: Acc.!! It works fine, but form.accets(request.vars) returns always False. I have a button type=submit with an image before {{=form.custom.end}}. I suppose

[web2py:32288] FORM factory

2009-10-06 Thread leone
I want use FORM object and helpers objects, but I need complete control over html code. Exists a factory method as in SQLFORM, so I can code HTML .. {{=form.begin}} {{=form.widget.x}} {{=form.widget.y}} {{=form.submit}} {{=form.end}} .. /HTML ??? If not, exist an alternative way

[web2py:32294] Re: FORM factory

2009-10-06 Thread leone
}}  {{=form.custom.submit}}  {{=form.custom.end}}   ..  /HTML On Oct 6, 9:51 am, leone handja...@gmail.com wrote: I want use FORM object and helpers objects, but I need complete control over html code. Exists a factory method as in SQLFORM, so I can code HTML ..  {{=form.begin

[web2py:32302] Re: FORM factory

2009-10-06 Thread leone
manual, but it is my problem. On 6 Ott, 19:58, mdipierro mdipie...@cs.depaul.edu wrote: It is automatic. You just need Field('name',requires=IS_IN_SET(('a','b','c'))) or requires IS_IN_DB On Oct 6, 11:32 am, leone handja...@gmail.com wrote: How can I render a select option sequence

  1   2   >