[web2py:13443] can i add vars to request from SQLFORM and then use form.accepts()

2008-12-12 Thread zhaopeng
Hello everybody, I display some fields of a table use SQLFORM to view.when i get the request data from SQLFORM, I add some vars to request.vars,then add the data to db by form.accepts(request.vars,session),but i found the vars i added in db is None.so i must use db.table.insert() to add the

[web2py:13444] Re: can i add vars to request from SQLFORM and then use form.accepts()

2008-12-12 Thread billf
I think you should be able to do what you ask but it would help to see your define_table and controller method. On Dec 12, 10:02 am, zhaopeng zhaopen...@gmail.com wrote: Hello everybody,   I display some fields of a table use SQLFORM to view.when i get the request data from SQLFORM, I add

[web2py:13446] Re: can i add vars to request from SQLFORM and then use form.accepts()

2008-12-12 Thread DenesL
Use form.vars.fieldname=fieldvalue before form.accepts --~--~-~--~~~---~--~~ 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@googlegroups.com To unsubscribe from

[web2py:13447] Re: WEB2PYCHAT

2008-12-12 Thread DenesL
It looks really good, nice job! --~--~-~--~~~---~--~~ 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@googlegroups.com To unsubscribe from this group, send email to

[web2py:13449] Not-so-intuitive behavior when search in boolean field

2008-12-12 Thread Iceberg
Hi there, I encounter a not-so-intuitive behavior when search in boolean field, named Giving the definition: SQLField('special', 'boolean', default=False) And bear in mind that there are THREE kinds of value in this field: True, False, and (None)! When I search:

[web2py:13450] Re: Not-so-intuitive behavior when search in boolean field

2008-12-12 Thread achipa
I might be very wrong on this, but it's actually correct that way. None is NOT a value (it is a const identifier) and hence you cannot/ should not compare it by value or use logic operators on it. The same goes for databases' NULL. Take a look for example at mysql, when you do 'WHERE id = NULL'

[web2py:13445] WEB2PYCHAT

2008-12-12 Thread ceej
Hey all, I've created a site http://www.web2pychat.com which will let you chat to people in the irc web2py room without downloading anything. I'ts built on the new T3, it's very early beta and I will be adding a lot more soon. Special thanks to Mibbit :) So there is no excuse for any web2py

[web2py:13451] Monitor a User

2008-12-12 Thread KapilG604
Hi Everybody, Being an owner of a firm, I would like remotely see, what my users are upto and if they are comprmising anywhre. (Without Intruding their Work). PLease suggest if there are anyways, I can remotely see their screens for the purpose. Thanks

[web2py:13452] Re: new web2py wiki

2008-12-12 Thread mdipierro
you account seems active On Dec 12, 2:26 am, Grahack christophegrag...@yahoo.fr wrote: Mmmmf, the activation url I received is said to be invalid. The problem could be on my side since FF bugged at the very moment I clicked this url (note that the FF bug is not related to the wiki). So now

[web2py:13457] Re: new web2py wiki

2008-12-12 Thread mdipierro
You can now add pages. Sorry the link was not there before. --~--~-~--~~~---~--~~ 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@googlegroups.com To unsubscribe from

[web2py:13454] Re: WEB2PYCHAT

2008-12-12 Thread mdipierro
Really Nice! On Dec 12, 5:14 am, DenesL denes1...@yahoo.ca wrote: It looks really good, nice job! --~--~-~--~~~---~--~~ 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:13453] Re: new web2py wiki

2008-12-12 Thread Grahack
Ok, sorry, I think I didn't even try to login... On 12 déc, 14:27, mdipierro mdipie...@cs.depaul.edu wrote: you account seems active On Dec 12, 2:26 am, Grahack christophegrag...@yahoo.fr wrote: Mmmmf, the activation url I received is said to be invalid. The problem could be on my side

[web2py:13458] Re: Can I do this in Web2Py?

2008-12-12 Thread Fran
On Dec 11, 5:49 pm, mdipierro mdipie...@cs.depaul.edu wrote: 1) use your html instead of {{=form}} for but in the form include {{if form.errors.email:}}{{=form.errors.email}}{{pass}} {{=form.hidden_field()}} I'm trying to do the same kind of thing. I tried using form=SQLFORM(db.gis_layer)

[web2py:13459] Re: New Genshi4web2py.py

2008-12-12 Thread Timothy Farrell
Now there is. Thanks for pointing that out. http://genshi.edgewall.org/wiki/GenshiRecipes/web2py Grahack wrote: Hi, I think there could be an entry+page for web2py+genshi here: http://genshi.edgewall.org/wiki/GenshiRecipes Sorry, I'm not good enough to put some info here. --

[web2py:13460] Re: WEB2PYCHAT

2008-12-12 Thread Wes James
that's interesting - put mibbit in a window with web2py as the back end ceej, your having too much fun :) -wj On Fri, Dec 12, 2008 at 3:39 AM, ceej cjlaz...@googlemail.com wrote: Hey all, I've created a site http://www.web2pychat.com which will let you chat to people in the irc web2py

[web2py:13462] Re: Can I do this in Web2Py?

2008-12-12 Thread Wes James
i have: input name=id type=hidden value={{=form.record.id}}/ will that be fine? On Fri, Dec 12, 2008 at 8:02 AM, mdipierro mdipie...@cs.depaul.edu wrote: You are using a manual HTML form instead of {{=form}}. For an update form you need to include 1) input type=hidden name=id

[web2py:13464] Validate multiple fields

2008-12-12 Thread Timothy Farrell
It seems that we discussed this a while ago, but I can't find the discussion. Can we have a validator based on multiple unique fields? Basically, I would like uniqueness to be defined by multiple fields instead of just one on a validator level. This would be to simulate a complex primary

[web2py:13467] Re: T3 clean install - problems

2008-12-12 Thread Wes James
ceej, i just tried it again. new svn, new copy of t3, copied t3 in via admin, reg'd, then went in to settings and it saved my admin email fine. what python are you using? python -V and try which python to see where python is. btw, -M means load models not modules. (ver ./web2py.py

[web2py:13468] Re: Validate multiple fields

2008-12-12 Thread DenesL
You can probably tailor this to your needs: db.mytable.field2.requires=IS_EXPR('value==%s' % repr (request.vars.field1),error_message='oops!') or the equivalent (and more flexible): db.mytable.field2.requires=IS_EXPR('True' ),error_message='oops!')

[web2py:13472] Sqlalchemy and its autoload feature

2008-12-12 Thread Iraklis
Hi web2py group! Is there something similar to SQLalchemy and its autoload function. For example, if there is already a DatabaseModell? Kind Regards Iraklis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py

[web2py:13473] Re: Email problem with T3 on GAE

2008-12-12 Thread mdipierro
did you edit the settings? You are supposed to configure your smtp server. If you use gmail you need to setup auth params. massimo On Dec 12, 10:10 am, Vidul Petrov vidul.r...@gmail.com wrote: I am trying to use T3 email sending on GAE with no luck (T3 keeps on saying unable to send email).

[web2py:13474] Re: Big Datatype in Postgres

2008-12-12 Thread mdipierro
SQLField('fielname','text') SQLField('fielname','blob') do not have size limitations on postgres. You cannot use the BIG datatype because it has not equivalent on other databases. Massimo On Dec 12, 10:07 am, Iraklis i.kordoma...@gmail.com wrote: Dear web2py community! How I can use the big

[web2py:13475] Re: t2.display in lambda

2008-12-12 Thread Wes James
funny thing though, using itemize to show several pics on the page the zoom magic only shows the first pic on on the list, even when clicking on any other pic on the list - the zoom always does just the first one :) On Thu, Dec 11, 2008 at 11:24 PM, mdipierro mdipie...@cs.depaul.edu wrote:

[web2py:13477] Re: Email problem with T3 on GAE

2008-12-12 Thread Vidul Petrov
yes I tried with different settings (with and without authentication/ with smtp.gmail.com:587 and different smtp server). I guess it is the well known GAE problem that prevents smtplib because some low-level socket functions? On Dec 12, 7:30 pm, mdipierro mdipie...@cs.depaul.edu wrote: did you

[web2py:13480] Re: print function

2008-12-12 Thread Vidul Petrov
redirect(URL(r=request,c='myPrint',f='myPrint',args=[myDict])) # and not f='lprProvv' On Dec 12, 8:03 pm, pmate pmateh...@gmail.com wrote: Hi, using pyrtf i created a new controller called printings.py. In it i have a function: def myPrint():     myDict = request.args[0]     ...     ...  

[web2py:13481] Re: print function

2008-12-12 Thread pmate
edit: redirect(URL(r=request,c='printings',f='myPrint',args=[myDict])) On 12 Dic, 19:03, pmate pmateh...@gmail.com wrote: Hi, using pyrtf i created a new controller called printings.py. In it i have a function: def myPrint():     myDict = request.args[0]     ...     ...     return

[web2py:13483] Re: WEB2PYCHAT

2008-12-12 Thread ceej
Thank you everyone :) Shame the in-built translation is only visible to other Mibbit clients Everyone one can see the translated text, just not the english part in the () brackets :) On Dec 12, 8:18 am, Fran francisb...@googlemail.com wrote: Shame the in-built translation is only visible to

[web2py:13484] Re: T3 clean install - problems

2008-12-12 Thread ceej
@Massimo, thank you @Wes James, I'm running python 2.5.2. It's doesn't have to do with that though as I'm working on multiple other web2py projects and I'm not getting the same issues. I can save settings fine now, it's just things like models, procedures etc... that won't save. Everything else

[web2py:13485] Re: Validate multiple fields

2008-12-12 Thread DenesL
Oops, I misunderstood your goal. Actually I wrote a ROW_NOT_IN_DB validator which did not get Massimo's approval, but looking back it might have been because I used a bad example to make the case. Anyways, just coding the validator was not enough, I had to modify a few things in gluon too. On

[web2py:13487] Re: Email problem with T3 on GAE

2008-12-12 Thread mdipierro
I do not know. I use it on GAE and it works. Massimo On Dec 12, 11:37 am, Vidul Petrov vidul.r...@gmail.com wrote: yes I tried with different settings (with and without authentication/ with smtp.gmail.com:587 and different smtp server). I guess it is the well known GAE problem that prevents

[web2py:13488] Re: exposes and search in t3

2008-12-12 Thread mdipierro
exposes limits what you can modify, not what you can search. at this time you cannot change that. On Dec 12, 12:33 pm, Wes James compte...@gmail.com wrote: if i have: db.foto.exposes=['title','image'] in my models and on a page do {{=self.search(db.foto)}} should the search field

[web2py:13489] Re: T3 clean install - problems

2008-12-12 Thread mdipierro
try restart server and clear cache. On Dec 12, 12:45 pm, ceej cjlaz...@googlemail.com wrote: @Massimo, thank you @Wes James, I'm running python 2.5.2. It's doesn't have to do with that though as I'm working on multiple other web2py projects and I'm not getting the same issues. I can save

[web2py:13491] Re: Validate multiple fields

2008-12-12 Thread Timothy Farrell
Yes, this would require changing some things in gluon.validators and gluon.html. I'm of the mindset that this sort of validator is very important. However, I'll have to look into it later. Could you send me your code if you still have it? Thanks, tim DenesL wrote: Oops, I misunderstood

[web2py:13492] Re: Validate multiple fields

2008-12-12 Thread mdipierro
you do not need this because you can already do it. requires=IS_NOT_IN_DB(db (db.table.field1==request.vars.field1),'table.field2') Massimo On Dec 12, 2:20 pm, Timothy Farrell tfarr...@swgen.com wrote: Yes, this would require changing some things in gluon.validators and gluon.html. I'm

[web2py:13495] Re: warning

2008-12-12 Thread Timothy Farrell
Oh man, you put up a public wiki and now you're gonna be gone for a couple of days?!?!?! PARTY ON THE WIKI! mdipierro wrote: I may not be able to answer emails in the next couple of days. Massimo -- Timothy Farrell tfarr...@swgen.com Computer Guy Statewide General

[web2py:13496] Re: Validate multiple fields

2008-12-12 Thread DenesL
Yes, this would require changing some things in gluon.validators and gluon.html. In my case they were: validators, sql, sqlhtml compileapp; but that was back on rev.341 I'm of the mindset that this sort of validator is very important. They become important as the need arises. My need had an

[web2py:13497] Re: Can I do this in Web2Py?

2008-12-12 Thread Fran
On Dec 12, 3:02 pm, mdipierro mdipie...@cs.depaul.edu wrote: You are using a manual HTML form instead of {{=form}}. For an update form you need to include 1) input type=hidden name=id value={{=form.latest.id}} 2) {{=form.hidden_field()}} I had form.hidden.fields() but not form.latest.id, now

[web2py:13499] refine checkbox on search

2008-12-12 Thread Wes James
what is the refine checkbox supposed to do on a search? -wj --~--~-~--~~~---~--~~ 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@googlegroups.com To unsubscribe

[web2py:13500] Re: warning

2008-12-12 Thread mdipierro
We could have a party on second life instead. May be more fun! On Dec 12, 2:43 pm, Timothy Farrell tfarr...@swgen.com wrote: Oh man, you put up a public wiki and now you're gonna be gone for a couple of days?!?!?! PARTY ON THE WIKI! mdipierro wrote:I may not be able to answer

[web2py:13501] Re: refine checkbox on search

2008-12-12 Thread mdipierro
refine the pervious search instead of creating a new search On Dec 12, 2:57 pm, Wes James compte...@gmail.com wrote: what is the refine checkbox supposed to do on a search? -wj --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[web2py:13503] Re: Validate multiple fields

2008-12-12 Thread Timothy Farrell
The page in question is sorta like an SQLtable, it displays a full table and allows for updates to each record without branching off to a separate page. When the user is done making changes the wraps up the changes made and POSTs a JSON object to the web2py controller. This is a custom built

[web2py:13502] Re: refine checkbox on search

2008-12-12 Thread Yarko Tymciurak
refine takes the current result set, and applies the next search condition to it... you should be able to logically consider it as an incrementally built AND On Fri, Dec 12, 2008 at 2:57 PM, Wes James compte...@gmail.com wrote: what is the refine checkbox supposed to do on a search? -wj

[web2py:13504] Re: Can I do this in Web2Py?

2008-12-12 Thread mdipierro
As I mentioned before, this: form=FORM(INPUT(_name=id,_value=layer.id),INPUT (_name=modified_on,_value=layer.modified_on),INPUT (_name=name,_value=layer.name),INPUT (_name=description,_value=layer.description),SELECT (_name=type,_value=layer.type),SELECT (_name=subtype,_value=subtype),INPUT

[web2py:13505] Re: Validate multiple fields

2008-12-12 Thread mdipierro
I still do not see why you cannot use IS_NOT_IN_DB(sqlset,) You must have access to the variables that you want to validate. Massimo On Dec 12, 3:01 pm, Timothy Farrell tfarr...@swgen.com wrote: The page in question is sorta like an SQLtable, it displays a full table and allows for

[web2py:13506] Re: Big Datatype in Postgres

2008-12-12 Thread Yarko Tymciurak
Well - you cannot use the BUT datatype portably you can set it up w/ SQL;I think the point is understanding if you really need to... For example, if you're looking at legacy / existing database, and want to manipulate results, then yes you can - with work SQL But you cannot use BIG with

[web2py:13508] t3 form text

2008-12-12 Thread Wes James
I used {{=self.search(db.foto)}} in a t3 page. I then copied and pasted the html and changed to: div form action= enctype=multipart/form-data method=post select name=cond option value=foto.title containstitle contains/option

[web2py:13509] Re: Can I do this in Web2Py?

2008-12-12 Thread Fran
On Dec 12, 9:02 pm, mdipierro mdipie...@cs.depaul.edu wrote: you must do the insert manually after accept. Is this not what I'm already doing here? if form.accepts(request.vars,session,keepvalues=True): layer.update( name=form.vars.name, description=form.vars.description,

[web2py:13511] Re: t3 foto gallery

2008-12-12 Thread Wes James
ok in t3 db.py there IS is_admin :) -wj On Thu, Dec 11, 2008 at 5:04 PM, Wes James compte...@gmail.com wrote: Massimo, t3 is cool. In the last hour (following your t3 video), I've made a basic foto gallery with CRUD (create, read, update, delete). In my lambda, how do i do:

[web2py:13513] lambda with if is_admin

2008-12-12 Thread Wes James
Is there a way to do this on my model in t3: db.foto.represent=lambda foto: \ if is_admin: \ TABLE( A(foto.title,_href=t2.action('wiki/edit',foto.id)),\ A(IMG(_width=200,_src=URL(r=request,f='download',args=[foto.image])),_class='zoom' ,_href='#zoom-me'+str(foto.id)),\

[web2py:13514] Re: Validate multiple fields

2008-12-12 Thread DenesL
On Dec 12, 4:07 pm, mdipierro mdipie...@cs.depaul.edu wrote: I still do not see why you cannot use IS_NOT_IN_DB(sqlset,) You must have access to the variables that you want to validate. Correct me if I am wrong but IS_NOT_IN_DB only looks at the value of one field. From validators.py:

[web2py:13516] Re: Can I do this in Web2Py?

2008-12-12 Thread mdipierro
I only see update, no insert. Moreover I do know what layer is. Is it a table? On Dec 12, 3:31 pm, Fran francisb...@googlemail.com wrote: On Dec 12, 9:02 pm, mdipierro mdipie...@cs.depaul.edu wrote: you must do the insert manually after accept. Is this not what I'm already doing here? if

[web2py:13517] Re: free surveys for everybody

2008-12-12 Thread mdipierro
how should branching be handled? On Dec 12, 3:36 pm, Fran francisb...@googlemail.com wrote: On Dec 12, 7:59 pm, mdipierro mdipie...@cs.depaul.edu wrote: http://web2py.appspot.com/survey Looks very sweet :) Really need to be able to have branching options though - i.e. sub-options that

[web2py:13518] Re: Validate multiple fields

2008-12-12 Thread mdipierro
No. validators are associated to one field in the sense that only one field will report the error. db.define_table('t',SQLField('f1'),SQLField('f'2')) db.t.f2.requires=IS_NOT_IN_DB(db(db.t.f1==request.vars.f1),'t.f2') OR db.t.f1.requires=IS_NOT_IN_DB(db(db.t.f2==request.vars.f2),'t.f1') are

[web2py:13519] Re: free surveys for everybody

2008-12-12 Thread pedro
Worked like a charm to me. I like it. I got an error somewhere when creating a survey, but unfortunately I am not being able to replicate it. On 12 Dec, 23:19, mdipierro mdipie...@cs.depaul.edu wrote: how should branching be handled? On Dec 12, 3:36 pm, Fran francisb...@googlemail.com wrote:

[web2py:13521] Re: free surveys for everybody

2008-12-12 Thread mdipierro
GAE produces strange errors once in a while. I have seen it too. They are not web2py errors they do not show up in the logs. Massimo On Dec 12, 4:28 pm, pedro pedro...@gmail.com wrote: Worked like a charm to me. I like it. I got an error somewhere when creating a survey, but unfortunately I

[web2py:13522] Re: Can I do this in Web2Py?

2008-12-12 Thread Fran
On Dec 12, 10:18 pm, mdipierro mdipie...@cs.depaul.edu wrote: I only see update, no insert. Right, since this is an Update method, not an Insert method (I did the initial Insert via appadmin to get sample data into the system) Moreover I do know what layer is. Is it a table? It was

[web2py:13525] FORM Table horizontal

2008-12-12 Thread ed
Hi, I wanted to create a horizontal search prompt using the code below. I tried using TD tag after TR on all the fields but unfortunately the display was still vertical. Can somebody help me, please? Thanks form = FORM(TABLE(TR(, INPUT(_name=submit, _type=submit, _value=Search)),\