[web2py:24870] Re: Multipe create forms on same page.

2009-06-23 Thread Trollkarlen
Acually that wont work either because that dont change the _formname variable. Also all the internal fields and rows get the same names. I solved it with this fix(without the form_prefix set it should work as before): --- web2py.org/gluon/sqlhtml.py 2009-06-11 14:29:55.0 +0200 +++ web2py/

[web2py:24869] Re: web2py 1.64.4 is out

2009-06-23 Thread Hans Donner
You can, but you can still use the old method (backwards compatible) On Wed, Jun 24, 2009 at 8:18 AM, annet wrote: > > Massimo, > >> - SQLFORM.factory instead of form_factory > > Does that mean that instead of: > > from gluon.sqlhtml import form_factory > > ... I import > > from gluon.sqlhtml imp

[web2py:24868] Re: web2py 1.64.4 is out

2009-06-23 Thread annet
Massimo, > - SQLFORM.factory instead of form_factory Does that mean that instead of: from gluon.sqlhtml import form_factory ... I import from gluon.sqlhtml import SQLFORM.factory ... and in function, replace: form=form_factory(SQLField('') ... with: form=SQLFORM.factory('') Kind regard

[web2py:/] web2py 1.64.4 is out

2009-06-23 Thread mdipierro
I posted web2py 1.64.4 - Some bug fixes - Informix Support - response.render(s) where s can be filename OR file stream - SQLFORM.factory instead of form_factory - SQLFORM.widgets.radio and SQLFORM.widgets.checkboxes I also re-posted the slides on scribd, added some about latest features. Massim

[web2py:24865] Re: form.accepts problem

2009-06-23 Thread mdipierro
you pass the session when you want to prevent double form submission. If you do this in an iframe I do not know in which order your frames are called and what else happens to this may not work. Massimo On Jun 24, 12:41 am, "Sebastian E. Ovide" wrote: > Thanks, > > not passing session to accept

[web2py:24866] Re: SQLDB.executesql doesn't work in doctest?

2009-06-23 Thread 小谢
On 6月24日, 上午10时06分, mdipierro wrote: > Can you tell us step by step what you are doing and which version of > web2py? > > massimo > > On Jun 23, 8:35 pm, Сл wrote: > > > Whenever I try to execute directly an sql, the test failed with > > "syntax error". Meanwhile the code works well when acces

[web2py:24864] Re: form.accepts problem

2009-06-23 Thread Sebastian E. Ovide
Thanks, not passing session to accept made the trick ! when should be session be passed to accept? Sebastian E. Ovide On Wed, Jun 24, 2009 at 1:06 PM, mdipierro wrote: > > Hard to say without the details. I suggest setting formname=None and > not passing session to accept. > > Massimo >

[web2py:24863] Re: form.accepts problem

2009-06-23 Thread mdipierro
Hard to say without the details. I suggest setting formname=None and not passing session to accept. Massimo On Jun 23, 11:49 pm, "Sebastian E. Ovide" wrote: > in the same page there are more IFrames with the same form inside an JQuery > accordion... > > I have got an improvement adding formname

[web2py:24862] Re: form.accepts problem

2009-06-23 Thread Sebastian E. Ovide
in the same page there are more IFrames with the same form inside an JQuery accordion... I have got an improvement adding formname="default%"%id now I can work on different forms... on the same page (using IFrames) but the first time that I submit a form is sill NOT working... (The problem happen

[web2py:24861] Re: form.accepts problem

2009-06-23 Thread Sebastian E. Ovide
in the same page there are more IFrames with the same form inside an JQuery accordion... Sebastian E. Ovide On Wed, Jun 24, 2009 at 12:15 PM, Sebastian E. Ovide < sebastianov...@gmail.com> wrote: > Hi > > I have a function serving a form (for updates) that is working perfectly. > Nevertheles

[web2py:24860] form.accepts problem

2009-06-23 Thread Sebastian E. Ovide
Hi I have a function serving a form (for updates) that is working perfectly. Nevertheless it doesn't work correctly if it is included inside another page as an IFrame. The first time that I press submit, form.accept returns false, an therefore the controller doesn't update the db. After that it s

[web2py:24859] Re: SQLDB.executesql doesn't work in doctest?

2009-06-23 Thread mdipierro
Can you tell us step by step what you are doing and which version of web2py? massimo On Jun 23, 8:35 pm, Сл wrote: > Whenever I try to execute directly an sql, the test failed with > "syntax error". Meanwhile the code works well when accessed from a > browser. --~--~-~--~~--

[web2py:24858] Re: Row average

2009-06-23 Thread mdipierro
No pretty but possible. s=db.tablename.colname.sum() c=db.tablename.colname.count() rows=db().select(s,c,groupby=db.tablename.somecolname) for row in rows: print row._extra[s]/row._extra[c] On Jun 23, 8:26 pm, "mr.freeze" wrote: > How would I execute this sqlite statement with the existing

[web2py:24857] Re: web2py job

2009-06-23 Thread JohnMc
A testament that Web2Py is gaining traction. On Jun 23, 5:35 pm, mdipierro wrote: > http://uk.huxley.com/en/job/425633/1/Python-Developer/ > > this is a very serious employment company. I do not know anything more > than posted online but I know the employment company by reputation. > > Massimo

[web2py:24856] SQLDB.executesql doesn't work in doctest?

2009-06-23 Thread 小谢
Whenever I try to execute directly an sql, the test failed with "syntax error". Meanwhile the code works well when accessed from a browser. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group.

[web2py:24855] Row average

2009-06-23 Thread mr.freeze
How would I execute this sqlite statement with the existing DAL?: select avg(columnname) from table; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to

[web2py:24854] Re: in trunk RadioWidget, CheckboxWidget

2009-06-23 Thread mdipierro
I do not know what it should do but now they return TABLE. I will change the docstrings accordingly. Massimo On Jun 23, 7:36 pm, DenesL wrote: > Nice. > But the docstrings need some TLC. > > Should the widgets return DIV or TABLE?. --~--~-~--~~~---~--~~ You rece

[web2py:24853] Re: new example/default/index

2009-06-23 Thread mdipierro
thank you On Jun 23, 7:16 pm, "mr.freeze" wrote: > Typos: > Missing period on "Easy to run. It requires no installation and no > configuration" > Interface is misspelled on link "a web-based integrated development > environment and web-based management intreface" > Internationalization if misspe

[web2py:24852] Re: Authentication for services

2009-06-23 Thread mdipierro
You cannot mix authorization and services this way. It is complicated an there are many cases If you have @auth.requires_login() def acceptme(): return 'accepted' you can call "http:///acceptme.json"; and you will get a JSON response. You do not need the decorator. @auth.requires_l

[web2py:24851] Re: in trunk RadioWidget, CheckboxWidget

2009-06-23 Thread DenesL
Nice. But the docstrings need some TLC. Should the widgets return DIV or TABLE?. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegro

[web2py:24850] Re: Authentication for services

2009-06-23 Thread Hasanat Kazmi
Here is an interesting behavior. i have following function @auth.requires_login() @service.json @service.jsonrpc def acceptme(): return "accepted" in this case, whatever username and password I give, I get returned "accepted" but if I put @auth.requires_login() after @service.jsonrpc, it alw

[web2py:24849] Re: new example/default/index

2009-06-23 Thread mr.freeze
Typos: Missing period on "Easy to run. It requires no installation and no configuration" Interface is misspelled on link "a web-based integrated development environment and web-based management intreface" Internationalization if misspelled on "Abstraction Layer that writes SQL for you in real time

[web2py:24848] I discovered these "Two Choices"

2009-06-23 Thread Steve Shepherd
What would you do? You make the choice. Don't look for a punch line, there isn't one.. Read it anyway. My question is: Would you have made the same choice? At a fundraising dinner for a school that serves learning-disabled children, the father of one of the students delivered a speech that wou

[web2py:24846] Re: Having an 'upgrade' distribution?

2009-06-23 Thread mdipierro
Probably not becasue I do not know how to do it, except one by one, in the apps. On Jun 23, 6:46 pm, Richard wrote: > On Jun 23, 10:53 am, mdipierro wrote:> You can > force rereading of modules with the python "reload" command. > > Currently I use reload(module) in development, but then have

[web2py:24847] new example/default/index

2009-06-23 Thread mdipierro
I changed the text in examples/default/index.html in trunk. Could you please help me proofread it and fill-in the broken links ? I am trying to simplify and make it more readable. Massimo --~--~-~--~~~---~--~~ You received this message because you are subscribed t

[web2py:24845] Re: response.flash

2009-06-23 Thread mdipierro
when you set response.flash='' it is displayed in the current page if you set instead session.flash='' the flash is stored in the session and displayed immediately after redirection. Massimo On Jun 23, 6:16 pm, pk wrote: > hi, > how can i send response.flash to another view

[web2py:24844] Re: Having an 'upgrade' distribution?

2009-06-23 Thread Richard
On Jun 23, 10:53 am, mdipierro wrote: > You can force rereading of modules with the python "reload" command. Currently I use reload(module) in development, but then have to remember to comment them out when I push to the release server. Is there a better way? > I doubt it will automatically rest

[web2py:24843] Re: I think they call it a join... not sure which kind of join it is I need...

2009-06-23 Thread DenesL
If you want the tag names, you can do nested selects: rows=db(db.tag.id.belongs(db(db.user_tags.user_id==theuserid)._select (db.user_tags.tag_id))).select(db.tag.name) Note that the inner selection uses _select (starts with an underscore). Denes. --~--~-~--~~~---~--~

[web2py:24842] response.flash

2009-06-23 Thread pk
hi, how can i send response.flash to another view the view is in menu/member and the controller which i would send the response calls invite and in the function sendit i will send the response to the menu/ member.html page thanks --~--~-~--~~~---~--~~ You received

[web2py:24841] web2py job

2009-06-23 Thread mdipierro
http://uk.huxley.com/en/job/425633/1/Python-Developer/ this is a very serious employment company. I do not know anything more than posted online but I know the employment company by reputation. Massimo --~--~-~--~~~---~--~~ You received this message because you ar

[web2py:24840] Re: Sessions and flash

2009-06-23 Thread mdipierro
say you have the old session_id in request.vars.mysession_id instead of a cookie. You should be able to do: request.cookies[response.session_id_name] =request.vars.mysession_id session.connect(request,response) (place this code at the top of your first model) Massimo in order to retrie

[web2py:24839] Re: Sessions and flash

2009-06-23 Thread Trollkarlen
Any more input on this ? /R On Jun 21, 10:28 pm, mdipierro wrote: > The requested session id is in request.sesssion_id and the response > session id is in response.session_id. The two should match if the > requested session is found. > > Anyway, why don't you explain what you are trying to acco

[web2py:24838] Re: Multipe create forms on same page.

2009-06-23 Thread mdipierro
That is because you have two create form for the same table. Form processing would not work either. If the form where about different tables, the html "id" attributes would be different. If you need to customize them anyway, you can do one step lower level: form1=SQLFORM(somedb,_id="") if fo

[web2py:24837] Multipe create forms on same page.

2009-06-23 Thread Robert Marklund
I have some problem with multiple create forms on the same page. def index(): form1 = crud.create(somedb) form2 = crud.create(somedb) return dict(form1=form1, form2=form2) The problem here is that all the rows and the inputs gets the same html id and thats not good for jQuery manipulation.

[web2py:24836] Re: Difficulty with mysql migration

2009-06-23 Thread weheh
1.64.3 On Jun 23, 1:08 am, mdipierro wrote: > which python version are you running? > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googleg

[web2py:24834] Re: Stupid question about web2py behavior in Google App Engine

2009-06-23 Thread ProfessionalIT
This is my site: http://www.professionalit.com.br (for now, without access to the Google database.) This is my blog: http://www.professionalit.com.br/blog (with access to the Google database.) If not logged in Google Account, this link redirect to login in a Google Account. I think th

[web2py:24835] also in trunk auth.requires(...)

2009-06-23 Thread mdipierro
Some of you have asked this: @auth.requires(auth.is_logged_in() and 1<2 and (auth.has_membership (auth.id_group('group1')) or auth.has_membership(auth.is_group ('group2' def index(): return "you are logged in, 1 is less than 2 and you a memeber of 'group1' or 'group2'" It is in trunk, pl

[web2py:24832] Re: Stupid question about web2py behavior in Google App Engine

2009-06-23 Thread ProfessionalIT
Only more a question: - any visitor who comes to my blog will need to login? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroup

[web2py:24829] in trunk RadioWidget, CheckboxWidget

2009-06-23 Thread mdipierro
Example: from gluon.sqlhtml import CheckboxesWidget, RadioWidget db.define_table('test', SQLField('field1'), SQLField('field2')) db.test.field1.requires=IS_IN_SET(('a','b','c')) db.test.field1.widget = RadioWidget.widget db.test.field2.requires=IS_IN_SET(('a','b','c'),multiple=True) db.test.f

[web2py:24831] Re: in trunk RadioWidget, CheckboxWidget

2009-06-23 Thread mdipierro
or better: db.define_table('test', SQLField('field1'), SQLField('field2')) db.test.field1.requires=IS_IN_SET(('a','b','c')) db.test.field1.widget = SQLFORM.widgets.radio.widget db.test.field2.requires=IS_IN_SET(('a','b','c'),multiple=True) db.test.field2.widget = SQLFORM.widgets.checkboxes.w

[web2py:24830] Re: form_factory and radio buttons

2009-06-23 Thread mdipierro
Nothing but these are better, don't you think? http://groups.google.com/group/web2py/browse_thread/thread/39db0a06f0d4badf# On Jun 23, 3:11 pm, DenesL wrote: > On Jun 23, 1:01 pm, mdipierro wrote: > > > you can also do > > > form=form_factory(SQLField('name')) > > form.table.name.widget=radio

[web2py:24828] Re: form_factory and radio buttons

2009-06-23 Thread DenesL
On Jun 23, 1:01 pm, mdipierro wrote: > you can also do > > form=form_factory(SQLField('name')) > form.table.name.widget=radioboxes Are you sure? that gives me a drop-down not radio boxes. The form field is created with the default widget for IS_IN_SET (drop- down) and setting the widget afterwar

[web2py:24827] Re: I think they call it a join... not sure which kind of join it is I need...

2009-06-23 Thread Jason Brower
But I have 3 tables. db.user, db.tags, db.user_tags At least that I see, this doesn't work. (I tried anyway.) Regards, Jason On Mon, 2009-06-22 at 12:07 -0700, mdipierro wrote: > db.define_table('user',SQLField('name')) > db.define)table('tag',SQLField('name'),SQLField('user_id',db.user)) > > us

[web2py:24826] Re: Possible to render view template from db blob/text/string instead of file?

2009-06-23 Thread mdipierro
Uploading to trunk now. Please give it a try: $ python web2py.py -S welcome >>> import StringIO >>> a=StringIO.StringIO('{{for i in range(10):}}{{=i}}{{pass}}') >>> response.render(a) '0123456789' This means in view you can do {{=response.render(s)}} and {{=cache.ram('key',lambda: response.rend

[web2py:24825] named scopes in web2py

2009-06-23 Thread mdipierro
http://www.reddit.com/r/programming/comments/8uzok/named_scopes_in_the_the_web2py_database/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@goo

[web2py:24823] Re: Difficulty with mysql migration

2009-06-23 Thread mdipierro
I think I fixed this in trunk but it may be python version dependent. Please give it a try and let us know. On Jun 22, 1:15 am, weheh wrote: > I downloaded the latest version. Now the error message is: > > Traceback (most recent call last): >   File "", line 1, in >   File "gluon/sql.py", line

[web2py:24822] Re: form.append repetition

2009-06-23 Thread mdipierro
def update_form(table,nxt) form=crud.update(table,request.args[0],next=(URL (r=request,f=nxt))) form[0][-1][1].append(INPUT (_type='button',_value='Cancel',_onclick='javascript:history.go(-1)')) return form On Jun 23, 1:20 pm, annet wrote: > Massimo, > > Perfect. > > I also had a look

[web2py:24821] Re: Maemo 2009

2009-06-23 Thread mdipierro
You may want to point out that here http://fisl.vidanerd.com/usuario/phnet despite the variety of subjects, web2py scores 6th out of 42 talk proposals. Massimo On Jun 23, 12:59 pm, fpp wrote: > On 23 juin, 02:01, mdipierro wrote: > > > Well done fpp and Attila. > > >http://wiki.maemo.org/Mae

[web2py:24820] message to html page

2009-06-23 Thread pk
hi, how can i get the successfully send message for email sending without form? def einladen(): if auth.is_logged_in(): email_empfaenger=db(db.projectmember.id==request.args (0)).select()[0] empfaengermail=email_empfaenger.memberemail subject='Einladung als Projektteil

[web2py:24819] Re: form.append repetition

2009-06-23 Thread annet
Massimo, Perfect. I also had a look at my update functions form=crud.update(db.adres,request.args[0],next=(URL (r=request,f='crud_address'))) form[0][-1][1].append(INPUT (_type='button',_value='Cancel',_onclick='javascript:history.go (-1)')) I tried: def update_form(table,nxt) form=crud.u

[web2py:24818] Re: form_factory and radio buttons

2009-06-23 Thread DenesL
radioboxes is not part of web2py. You can place the radioboxes function definition in your controller, in the model, or import it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To pos

[web2py:24817] Re: Maemo 2009

2009-06-23 Thread fpp
On 23 juin, 02:01, mdipierro wrote: > Well done fpp and Attila. > > http://wiki.maemo.org/Maemo_Summit_2009/Submissions Now we need to wait and see if the proposals are accepted... and if so, more work for the holidays :-) I intend to be there no matter what, though. --~--~-~--~~--

[web2py:24815] Re: I think they call it a join... not sure which kind of join it is I need...

2009-06-23 Thread Jason Brower
I did this for the tags with this from what you gave me: userTags = db(db.user_tags.user_id == current_user_id).select('user_tags.tag_id') should I actually run the query for each one? Shouldn't I be able to get the rows of the tags too? On Mon, 2009-06-22 at 12:12 -0700, DenesL wrote: > So if

[web2py:24816] Re: form_factory and radio buttons

2009-06-23 Thread annet
Hi Denes, I tried: gender=SQLField('gender',requires=IS_IN_SET(['Mr.','Mrs.'])) gender.widget=radioboxes form=form_factory(SQLField('...'),gender,SQLField('...')) When I expose the function an error ticket is issued: Traceback (most recent call last): File "/Library/Python/2.5/site-packages/

[web2py:24814] Re: Connect to Firebird

2009-06-23 Thread mdipierro
So I guess we do not need SET NAMES. Massimo On Jun 23, 12:31 pm, Alexei Vinidiktov wrote: > Here's some info I've dug up: > > SET NAMES specifes the client character set > (http://www.destructor.de/firebird/charsets.htm). It is used by > scripts. > > DEFAULT CHARACTER SET specified the Connect

[web2py:24813] Re: form.append repetition

2009-06-23 Thread mdipierro
def myform(table): form=crud.create(table) form[0][-1][1].append(INPUT(_type='reset',_value='Reset')) form[0][-1][1].append(INPUT (_type='button',_value='Cancel',_onclick="window.location='%s';"%URL (r=request,f='index'))) return form form=myform(db.openingstijd) On Jun 23, 12:29

[web2py:24812] Re: funny error rendering a page

2009-06-23 Thread samwyse
I made your suggested change to all of my tables (and also to the places where I used IS_NOT_IN_DB), but it doesn't seem to have helped. I've wrapped everything in a {{try:}} block and started poking around. I've noticed that while records.colnames = ('host.id', 'host.name', 'host.site') when ev

[web2py:24811] Re: simple wysiwyg editor for SQLFORM

2009-06-23 Thread David Zejda
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I just see nicEdit and the correspodning thread http://groups.google.com/group/web2py/browse_thread/thread/f8922ebf566f3f1c sorry for asking. I'll give it a try. D. David Zejda napsal(a): > Hello, > > thanks for web2py, I still feel the fresh air

[web2py:24810] Re: Connect to Firebird

2009-06-23 Thread Alexei Vinidiktov
Here's some info I've dug up: SET NAMES specifes the client character set (http://www.destructor.de/firebird/charsets.htm). It is used by scripts. DEFAULT CHARACTER SET specified the Connection Character Set. This page ( http://www.destructor.de/firebird/isql.htm ) says, "Scripts should also us

[web2py:24809] form.append repetition

2009-06-23 Thread annet
In my cms application I have a number of functions which all have the same structure, i.e: form=crud.create(db.openingstijd) form[0][-1][1].append(INPUT(_type='reset',_value='Reset')) form[0][-1][1].append(INPUT (_type='button',_value='Cancel',_onclick="window.location='%s';"%URL (r=request,f='in

[web2py:24808] Re: simple wysiwyg editor for SQLFORM

2009-06-23 Thread mdipierro
look into the admin app, specifically applications/admin/views/default/ htmledit.html. It does what you want and uses nicEdit (which comes with web2py). Massimo On Jun 23, 11:57 am, David Zejda wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hello, > > thanks for web2py, I still fe

[web2py:24807] Re: Firebird migrations

2009-06-23 Thread Alexei Vinidiktov
Here goes: timestamp: 2009-06-23T20:07:10.834950 CREATE TABLE todo( id INTEGER PRIMARY KEY, task VARCHAR(32) ); success! timestamp: 2009-06-23T20:46:15.842106 ALTER TABLE todo ADD task__tmp VARCHAR(256); success! UPDATE todo SET task__tmp=task; timestamp: 2009-06-23T20:54:33.73808

[web2py:24806] Re: form_factory and radio buttons

2009-06-23 Thread mr.freeze
Massimo, what do you think about putting the rating widget from T3 in web2py? On Jun 23, 12:01 pm, mdipierro wrote: > you can also so > > form=form_factory(SQLField('name')) > form.table.name.widget=radioboxes > > has anybody made a radioboxes widget? I was about to make one now. > > On Jun 23,

[web2py:24805] simple wysiwyg editor for SQLFORM

2009-06-23 Thread David Zejda
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, thanks for web2py, I still feel the fresh air of a productive development :) And now the question. There is a table with a "text" field. I'd like to integrate SQLFORM and a wysiwyg editor of some kind to operate on the field. I do not have an

[web2py:24804] Re: Firebird migrations

2009-06-23 Thread mdipierro
what is in sql.log? On Jun 23, 11:53 am, Alexei Vinidiktov wrote: > Hello, > > After successfully connecting to the database I tried altering the > definition of a table from this: > > db.define_table('todo'', db.Field('task')) > > to this: > > db.define_table('todo', db.Field('task', type='str

[web2py:24803] Re: Connect to Firebird

2009-06-23 Thread mdipierro
> If, on the other hand, connect(...charset) works fine (I haven't > tested the trunk version yet), then it should replace SET NAMES. It is not obvious to me that they are equivalent. Are they? Massimo --~--~-~--~~~---~--~~ You received this message because you ar

[web2py:24802] Re: form_factory and radio buttons

2009-06-23 Thread mdipierro
you can also so form=form_factory(SQLField('name')) form.table.name.widget=radioboxes has anybody made a radioboxes widget? I was about to make one now. On Jun 23, 11:37 am, DenesL wrote: > Yes but you have to pre-define the fields that need widgets before > calling form_factory. > > gender=SQ

[web2py:24801] Stupid question about web2py behavior in Google App Engine

2009-06-23 Thread ProfessionalIT
Hello, I'm porting my blog(a web2py app) to Google App Engine. When I run my blog application and open my browser(http://localhost: 8080/blog), I receive this message: Sign in with your google account.(point to authentication link of google ) Well, how to avoid this behavior? --

[web2py:24800] Firebird migrations

2009-06-23 Thread Alexei Vinidiktov
Hello, After successfully connecting to the database I tried altering the definition of a table from this: db.define_table('todo'', db.Field('task')) to this: db.define_table('todo', db.Field('task', type='string', length='256')) Then I refreshed the page, and I got this error: Traceback (mo

[web2py:24799] Re: Connect to Firebird

2009-06-23 Thread Alexei Vinidiktov
First I wanted to correct the regex that I sent previously. It didn't work with connection strings which didn't specify the character set. Instead of removing the last '?' symbol I added one such symbol in the db group to make it non-greedy: (?P.+?) I've tested it a bit and it appears to work f

[web2py:24798] Re: Architecture question: can I use Web2py template engine to generate emails?

2009-06-23 Thread mdipierro
My mistake. Should have been >>> response.render('default/index.html2',dict(message="hello")) or >>> response.render('default/index.html2',message="hello") No "context=dict(...)". read more here http://www.web2py.com/AlterEgo/default/show/225 On Jun 23, 11:14 am, Greg wrote: > I'm tryi

[web2py:24797] Re: Appadmin - query as a table

2009-06-23 Thread __Kyo__
Hi Massimo, thank you very much. I was trying to change the id (number) of the table instead the field name. I think I may have to do it in a separate form. I am pleased with the response and admire you greatly for all your inputs. On 21 jun, 15:23, mdipierro wrote: > Hi Kyo, > > appadmin igno

[web2py:24796] Re: form_factory and radio buttons

2009-06-23 Thread DenesL
Yes but you have to pre-define the fields that need widgets before calling form_factory. gender=SQLField('gender', requires=...) gender.widget=radioboxes #e.g. form=form_factory(..., gender, ...) Denes. --~--~-~--~~~---~--~~ You received this message because you

[web2py:24795] Re: Architecture question: can I use Web2py template engine to generate emails?

2009-06-23 Thread Greg
I'm trying to do this from the web2py shell, and I get the following error: >>> response.render('default/index.html2',context=dict(message="hello")) Traceback (most recent call last): File "", line 1, in File "/home/gwarner/web2py/gluon/globals.py", line 128, in render run_view_in(self._

[web2py:24794] Re: form_factory and radio buttons

2009-06-23 Thread mdipierro
Not yet. Possibly today. I am going to spend the day adding a lot of small things and this in the list. On Jun 23, 10:55 am, annet wrote: > In a controller I have a function that generates a form_factory form. > > form=form_factory(SQLField('company'),\ >     SQLField('gender',requires=IS_IN_SET

[web2py:24793] Re: mod_python, htaccess on a shared host with Apache2

2009-06-23 Thread mdipierro
oops. thanks for reporting about the grave accent. I gather these are instructions. Would you make an AlterEgo page about this? I will fix the accent in trunk. On Jun 23, 1:43 am, Niktar wrote: > For run web2py I needed the following: > > 1.  Place contents of web2py in a htdocs folder > > 2. Fr

[web2py:24792] Re: Possible to render view template from db blob/text/string instead of file?

2009-06-23 Thread mdipierro
This could be a possibility. I will experiment. On Jun 23, 6:45 am, AchipA wrote: > Could response.view also be a handle (or maybe response.viewhandle ?). > That way we could throw a (c)StringIO at response view, and StringIO > can wrap db fields, python strings or whatever we want. > > Note tha

[web2py:24791] Re: funny error rendering a page

2009-06-23 Thread mdipierro
db.port.hba.requires = IS_IN_DB(db, 'hba.name') db.port.switch.requires = IS_IN_DB(db, 'switch.name') should be db.port.hba.requires = IS_IN_DB(db, 'hba.id' '%(name)s') db.port.switch.requires = IS_IN_DB(db, 'switch.id','%(name)s') Let us know if it fixes the problem. There may be something els

[web2py:24790] form_factory and radio buttons

2009-06-23 Thread annet
In a controller I have a function that generates a form_factory form. form=form_factory(SQLField('company'),\ SQLField('gender',requires=IS_IN_SET(['Mr.','Mrs']), SQLField(...), The IS_IN_SET() renders as a drop box, I would like it to render as radio buttons. I read this AlterEgo item:

[web2py:24789] Re: Request.now.hour

2009-06-23 Thread annet
Chris, I hope you don't mind me bothering you again, but your posts made me reconsider other parts of my applications as well. I now have a module widgets.py: from gluon.sqlhtml import * def timeplain(field,value): if value == None: value = '' elif 'strftime' in dir(value):

[web2py:24788] Re: mod_python, htaccess on a shared host with Apache2

2009-06-23 Thread JorgeR
Is that a question? On Jun 23, 1:43 am, Niktar wrote: > For run web2py I needed the following: > > 1.  Place contents of web2py in a htdocs folder > > 2. From modpythonhandler.py remove Grave Accent (`) symbol at the end > of file. > > 3. Create web2py_modpython.py file: > >     from mod_python

[web2py:24787] Re: web2py v 1.64.3

2009-06-23 Thread mdipierro
I will take a look at those now. The specific problem is different but there was a major rewrite of widgets and that may have caused more than one issue. Massimo On Jun 23, 8:38 am, Yannick wrote: > Hello Massimo, > Don't you also think this following two issues that i still have is > maybe rel

[web2py:24786] Re: Request.now.hour

2009-06-23 Thread cjparsons
> In my case, I would create a widgets.py file in the modules folder of > my application, put the widget code in widgets.py, in my model import > the widgets (from modules import widgets) and use it like this: > widget=timeplain. Wouldn't I? Very nearly! Since your web site is running as part of w

[web2py:24785] Re: web2py v 1.64.3

2009-06-23 Thread Yannick
Hello Massimo, Don't you also think this following two issues that i still have is maybe related to something broken in this new release of Web2py: Problem Displaying images on the view: http://groups.google.com/group/web2py/browse_thread/thread/56387ad2056ce027/9edcdd2854a1f763?hl=en#9edcdd2854

[web2py:24784] Re: web2py v 1.64.3

2009-06-23 Thread mdipierro
Fixed in trunk. Please check it. Massimo NikG wrote: > The following view used to generate a multi-select box instead of a > dropdown, and was working in the previous version I was using (1.62.3) > but not on versions I upgraded to: 1.64.2 or 1.64.3. > > msg_form=form_factory( > SQLField('Tag',

[web2py:24783] Re: Connect to Firebird

2009-06-23 Thread mdipierro
should we leave the SET NAMES of leave the "connect(...charset)" as in trunk now? On Jun 23, 4:18 am, Alexei Vinidiktov wrote: > I think I've found the bug. There was a superfluous '?' symbol at the > end of the regex statement at line 837 in sql.py of web2py 1.64.3: > > re.compile('^(?P[^:@]+)

[web2py:24782] Re: web2py v 1.64.3

2009-06-23 Thread mdipierro
Ouch! Yes it is broken. I will fix this today. Massimo On Jun 23, 1:01 am, NikG wrote: > The following view used to generate a multi-select box instead of a > dropdown, and was working in the previous version I was using (1.62.3) > but not on versions I upgraded to: 1.64.2 or 1.64.3. > > msg_fo

[web2py:24781] Re: Request.now.hour

2009-06-23 Thread annet
Chris, > Do you have the web2py book? Yes, I do, however, since I am no Python programmer, I don't always get my head around things. Learning Python is high on my priority list. > Documentation on the newer features is available on the web site > e.g.http://www.scribd.com/doc/16085263/web2py-sli

[web2py:24780] Re: How to simulate a JOIN in Google App Engine ?

2009-06-23 Thread ProfessionalIT
Dan, Thanks, your suggestion save my work for now. On Jun 22, 3:26 pm, Dan wrote: > Here's a suggestion - there might be better ways to get where you want > to go, of course. This tries to minimize the changes to your existing > code. > > Since you can't work with more than one table at a t

[web2py:24779] Re: How to simulate a JOIN in Google App Engine ?

2009-06-23 Thread ProfessionalIT
On Jun 22, 3:08 pm, Hans Donner wrote: > Hi, in GAE it's better to denormalize, so place the post_category > fields directly as a fields on the the posts db, and write the values > when the post is made. > This way you only have to work wth the post table and there is no need > to perform a join

[web2py:24778] Re: Possible to render view template from db blob/text/string instead of file?

2009-06-23 Thread AchipA
Could response.view also be a handle (or maybe response.viewhandle ?). That way we could throw a (c)StringIO at response view, and StringIO can wrap db fields, python strings or whatever we want. Note that response.stream already works this way so it would be perhaps more consequential, too. On

[web2py:24777] Re: Possible to render view template from db blob/text/string instead of file?

2009-06-23 Thread samwyse
I'm also interested, albeit with a slightly different use-case. During development, I'd like to be able to have my view defined as a triple-quoted string in my controller's .py file, so I don't have to flip between two files as I'm coding/debugging. Once I'm satisfied with my work, I'd delete the

[web2py:24776] funny error rendering a page

2009-06-23 Thread samwyse
I have a database with three tables, switch, hba and port. The latter is defined as: db.define_table('port', SQLField('switch', db.switch), SQLField('name', 'string'), SQLField('hba', db.hba), ) db.port.name.requires = IS_NOT_EMPTY() db.port.hba.requires = IS_IN_DB(db, 'hba.name')

[web2py:24775] Re: Reddish GAE setup instructions?

2009-06-23 Thread Yarko Tymciurak
it is not likely that the redish (if you got it from http://www.web2py.com/appliances) works - this is still a 200K size redish which is incomplete - the redish Massimo had on GAE was lost with his apple hard drive crash in the spring, and this looks like it hasn't been changed since then. Just so

[web2py:24774] Shove as cache backend ?

2009-06-23 Thread AchipA
I was wondering whether there would be interest to extend web2py caching with shove ( http://pypi.python.org/pypi/shove ). Shove probably wouldn't be directly exposed to the user, but wrapped in the current cache module (just like mem, disk or memcache is now). By using shove for caching, we could

[web2py:24773] Re: Connect to Firebird

2009-06-23 Thread Alexei Vinidiktov
On Tue, Jun 23, 2009 at 10:08 AM, Jose wrote: > > > > On 22 jun, 22:23, Alexei Vinidiktov > wrote: >> Thanks, Massimo! >> >> The auth.settings.password_field='password2' thing did the trick! >> >> I'm afraid the '?set_encoding=None' thing doesn't work. >> >> As I said earlier I tried using the st

[web2py:24772] Re: Connect to Firebird

2009-06-23 Thread Alexei Vinidiktov
I think I've found the bug. There was a superfluous '?' symbol at the end of the regex statement at line 837 in sql.py of web2py 1.64.3: re.compile('^(?P[^:@]+)(\:(?P[...@]*))?@(?P[^\:/]+)(\:(?P[0-9]+))?/(?P.+)(\?set_encoding=(?P\w+))?$' should be re.compile('^(?P[^:@]+)(\:(?P[...@]*))?@(?P[^\:

[web2py:24771] error while installing web2py app

2009-06-23 Thread pk
hi, my app is about 350 MB great and my friend can`t install the app (error: unable to install ...) i packed what can be the problem? thanks peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework

[web2py:24770] Re: Table in a view

2009-06-23 Thread annet
Hi Denes, Perfect. I used the colspan to let the day stand out from the rest. Thanks. Kind regards, Annet --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send e

[web2py:24769] Re: Request.now.hour

2009-06-23 Thread cjparsons
> In my model I also have a widget which reads like: > > db.event.plaats.widget=lambda self,value:INPUT > (_type='text',_id='place',_class='ac_input',_name='plaats',value=str > (value),requires=self.requires) > > The widget Chris provided me with reads like: > > def timeplain(field,value): >     i

  1   2   >