[web2py:14609] Re: web2py.exe can not start as windows service

2009-01-05 Thread Yarko Tymciurak
This seems to work fine as a service for me from source, current tree (as of tonight). A couple of notes: >From the FAQ, http://mdp.cti.depaul.edu/AlterEgo/default/show/77 I just didn't like the look of "ip = socket.gethostname()" --> I left this as 127.0.0.1 for my test; also, left port as 800

[web2py:14608] Re: web2py.exe can not start as windows service

2009-01-05 Thread Iceberg
--- Original Message --- Date:Mon, 5 Jan 2009 20:46:37 -0800 (PST) Subject: [web2py:14607] Re: web2py.exe can not start as windows service --- > I do not know what this means. Meanwhile I have incorporated Tim's > patch into > > http://

[web2py:14607] Re: web2py.exe can not start as windows service

2009-01-05 Thread mdipierro
I do not know what this means. Meanwhile I have incorporated Tim's patch into http://mdp.cti.depaul.edu/examples/static/1.55rc2/web2py_win.zip Hope that helps with tests. Massimo On Jan 5, 9:02 pm, Iceberg wrote: > On Jan6, 5:26am, Fran wrote: > > > > > On Jan 5, 5:22 pm, Timothy Farrell wr

[web2py:14606] Re: Debugging GAE

2009-01-05 Thread Jonathan Benn
Hi Notabene, On Jan 4, 6:25 pm, notabene wrote: > The log only has warnings of "no cache.disk". Sorry! It sounds like something is seriously broken in your code base. Here's what I suggest: try downloading a fresh copy of web2py and uploading it without modification to GAE. If there is a prob

[web2py:14605] Re: gae - web2py performance

2009-01-05 Thread Jonathan Benn
Hi Sudhakar, On Jan 4, 3:25 pm, "sudhakar m" wrote: > > > *Here's my results* > > > time/request : 1.02669 sec > > > time/request : 0.81934 sec > So the processing time is in ms. I guess 52ms is the db response time. Ah, that sounds much better. I only have database experience with Oracle, a

[web2py:14604] Re: findT() doesn't handle %s substitions

2009-01-05 Thread Jonathan Benn
On Jan 4, 5:26 pm, Fran wrote: > On Jan 4, 1:08 pm, mdipierro wrote: > > There is no way you ca translate 'Add %s' % single because at the > > moment of translation you do know know the value of the variable > > single. > > Is there no possibility of creating an EarlyT type (vs LazyT) so that >

[web2py:14603] Re: Small request for SQLFORM default label when employing IS_IN_DB

2009-01-05 Thread mr.freeze
That'll work. Thanks! On Jan 5, 9:05 pm, mdipierro wrote: > db.album.artist_id.label='Artist Name' > > On Jan 5, 8:36 pm, "mr.freeze" wrote: > > > I know I can simply use thelabelparameter but thought it would be > > nice if by default SQLFORM used the referenced field name when using > > IS_I

[web2py:14602] Re: T3 IF and FOR doubt

2009-01-05 Thread drayco
Thank's a lot. On 5 ene, 21:04, mdipierro wrote: > yes, here is another example > > {{=DIV(*[DIV(db.display(db.dog,query=db.dig.id==id)) for id in > [1,2,3]])}} > > Massimo > > On Jan 5, 7:46 pm, drayco wrote: > > > Ok, I understand. > > > However in your example 1 on the web site of t3, you ha

[web2py:14601] Re: Small request for SQLFORM default label when employing IS_IN_DB

2009-01-05 Thread mdipierro
db.album.artist_id.label='Artist Name' On Jan 5, 8:36 pm, "mr.freeze" wrote: > I know I can simply use the label parameter but thought it would be > nice if by default SQLFORM used the referenced field name when using > IS_IN_DB validator. For example, if I have: > > db.album.artist_id.requires=

[web2py:14600] Re: T3 IF and FOR doubt

2009-01-05 Thread mdipierro
yes, here is another example {{=DIV(*[DIV(db.display(db.dog,query=db.dig.id==id)) for id in [1,2,3]])}} Massimo On Jan 5, 7:46 pm, drayco wrote: > Ok, I understand. > > However in your example 1 on the web site of t3, you have this: > > {{=TABLE(*[TR(IMG(_width="200px",_src=self.action > ("dow

[web2py:14599] Re: web2py.exe can not start as windows service

2009-01-05 Thread Iceberg
On Jan6, 5:26am, Fran wrote: > On Jan 5, 5:22 pm, Timothy Farrell wrote: > > > That's normal.  What was the error in the traceback?  Was it anything that > > we should code around? > > I didn't get one - as I say, it's all working for me now with latest > src & your new winservice.py :) > All I

[web2py:14598] Small request for SQLFORM default label when employing IS_IN_DB

2009-01-05 Thread mr.freeze
I know I can simply use the label parameter but thought it would be nice if by default SQLFORM used the referenced field name when using IS_IN_DB validator. For example, if I have: db.album.artist_id.requires=IS_IN_DB(db,db.artist.id,db.artist.name) The label will be Artist Id but I would like i

[web2py:14597] Re: How can I use in t3 private procedures?

2009-01-05 Thread drayco
Thank's in advance. On 5 ene, 14:11, mdipierro wrote: > This is not a stupid question. But the answer depends on the details. > So I am going to provide multiple answers. > > First of all next=... must be the name of an action, not a complete > URL as returned by t2.action. > Second you should t

[web2py:14596] Re: T3 IF and FOR doubt

2009-01-05 Thread drayco
Ok, I understand. However in your example 1 on the web site of t3, you have this: {{=TABLE(*[TR(IMG(_width="200px",_src=self.action ("download",image.file))) for image in db().select(db.image.ALL)])}} My question is this: Can i use something like that whith self.display()? Because I want to d

[web2py:14595] Re: Postgres error

2009-01-05 Thread Kirby Turner
Here is a link to the Postgres documentation that talks about identifiers and key words. http://www.postgresql.org/docs/8.3/interactive/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS I didn't have the URL handy when I sent the previous reply. -KIRBY On Jan 5, 2009, at 8:25 PM, Kirby Turner

[web2py:14594] Re: Postgres error

2009-01-05 Thread Kirby Turner
Enclosing the name in double quotes is Postgres's way of allowing you to override the name rules. In other words, it basically allows you to name the table anything you want. However, it's use it not standard across all database engines. Different database engines have different ways to

[web2py:14593] Re: Postgres error

2009-01-05 Thread Jeff Koftinoff
Well, this is interesting. With the proper quoting of the SQL command you can create a table named "user" with no problems on postgresql: if2k9=# create table user ( did integer, name varchar(40) ); ERROR: syntax error at or near "user" LINE 1: create table user ( did integer, name varchar(40) )

[web2py:14592] Re: web2py.exe can not start as windows service

2009-01-05 Thread mdipierro
Fran, just so that I understand: 1.54 without patch src: does not work, bin: does not work 1.54 with patch src: does not work, bin: does not work 1.55 wthout patch src: does not work, bin: does not work 1.55 with patch src: does work, bin: does not work (and no errors) Is this correct? Massimo

[web2py:14591] Re: 1.55rc2 and Happy New Year.

2009-01-05 Thread Fran
On Jan 5, 7:35 pm, Timothy Farrell wrote: > In the meantime, Massimo allowed me to patch in the ability to use a > different DAL/ORM if you so choose.  Just note that if you do, the admin app > can't use non-web2py DAL models. > The API for this is to specify the function to run when the databa

[web2py:14590] Re: web2py.exe can not start as windows service

2009-01-05 Thread Fran
On Jan 5, 5:22 pm, Timothy Farrell wrote: > That's normal. What was the error in the traceback? Was it anything that we > should code around? I didn't get one - as I say, it's all working for me now with latest src & your new winservice.py :) All I see in Event Logs is: web2py server starting

[web2py:14589] Re: How can I use in t3 private procedures?

2009-01-05 Thread mdipierro
This is not a stupid question. But the answer depends on the details. So I am going to provide multiple answers. First of all next=... must be the name of an action, not a complete URL as returned by t2.action. Second you should try avoid ../../ because URLs containing those are rejected by web2p

[web2py:14588] Re: 1.55rc2 and Happy New Year.

2009-01-05 Thread mdipierro
Tim is right. This will not happen soon BUT, you can use raw SQL to define multicolumn unique contraints and/or you can use IS_NOT_IN_DB to enforce multicolumn unique constraints at the web2py level. Massimo On Jan 5, 1:08 pm, annet wrote: > Massimo, > > Indeed, the READMe file isn't very acc

[web2py:14587] Re: T3 IF and FOR doubt

2009-01-05 Thread mdipierro
In T3 you can only do {{something}} or {{=somethingelse}} not {{for...:}} not {{if...:}} not {{pass}}. etc. You cannot break an expression over multiple {{}}{{}} as you can in the web2py template language. Massimo On Jan 5, 1:18 pm, drayco wrote: > Hi, please, can You give any examples? > > On

[web2py:14586] Re: sql ID reset using web2py

2009-01-05 Thread DenesL
Use db.table.truncate() it deletes all records and resets id. --~--~-~--~~~---~--~~ 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:14585] How can I use in t3 private procedures?

2009-01-05 Thread drayco
Hi, I try to use t3 and I need to @expose procedure if i want to use it in a wiki page in a self.create() method. This is my procedure that i need to use @expose def programafecha(): beneficiarios=db(db.beneficiarios.person_id==self.person_id).select () trabajadores=db(db.trabajadores.pe

[web2py:14584] Re: 1.55rc2 and Happy New Year.

2009-01-05 Thread Timothy Farrell
Annet, I'm not sure multi-column unique constraints will happen soon.  The changes that need to happen to make this happen are deadlocked on design philosophy. See these threads: http://groups.google.com/group/web2py/browse_frm/thread/133644f67efdc217/92b2ec48c387965e http://groups.google.co

[web2py:14583] Re: T3 IF and FOR doubt

2009-01-05 Thread drayco
Hi, please, can You give any examples? On 25 dic 2008, 19:16, mdipierro wrote: > You cannot.T3does not support web2py templating language. > > On Dec 25, 6:10 pm, "Tito Garrido" wrote: > > > Hi Folks, > > > Why when I try to use: > > {{ifself.is_admin:}} > > Test > > {{pass}} > > > in a wiki pa

[web2py:14582] sql ID reset using web2py

2009-01-05 Thread k8vii
Hello Just starting out with Web2Py. Looks very exciting. Doing some testing and need to reset the SQL id to 1. I have made some entries in the DB and have removed the entries, and the id count continues to go up. I know normally I would want this so I have no gaps but for testing, I need to set

[web2py:14581] Re: 1.55rc2 and Happy New Year.

2009-01-05 Thread annet
Massimo, Indeed, the READMe file isn't very accurate ;-) When will multi column unique constraint functionality be added to web2py. Best regards, Annet. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web

[web2py:14580] Re: gae - specifying choices to StringProperty

2009-01-05 Thread sudhakar m
Opps its been a long thread.. so I am going to keep it very short. Premature optimization is the root of all evil! Yes. I am completely inline with this. Its time to get things done. Will post back with results!! Thanks again, Sudhakar.M --~--~-~--~~~---~--~~ Yo

[web2py:14579] Re: web2py.exe can not start as windows service

2009-01-05 Thread Timothy Farrell
That's normal.  What was the error in the traceback?  Was it anything that we should code around? -tim Fran wrote: On Jan 5, 3:25 pm, Timothy Farrell wrote: For Fran and Massimo, I've attached a patched winservice.py Using this version of winservice.py, I managed to

[web2py:14578] Re: web2py.exe can not start as windows service

2009-01-05 Thread Fran
On Jan 5, 3:25 pm, Timothy Farrell wrote: > For Fran and Massimo, I've attached a patched winservice.py Using this version of winservice.py, I managed to get the service installed & running with src of latest Trunk :) ImagePath in the registry for the service shows: "c:\bin\python25\lib\site-pa

[web2py:14577] Re: Issues about itemize() and search() in T2, mainly about pagination

2009-01-05 Thread mdipierro
1. may be a bug. I will look into it. should be easy to fix. 2-5. I agree and thank you. Would you email me the code? thanks. Massimo On Jan 5, 8:43 am, Iceberg wrote: > Hi Massimo, > > I am new to T2, so forgive me if the following issues are not > correct. :P > > 1.Pagination bug in search()

[web2py:14576] Re: web2py.exe can not start as windows service

2009-01-05 Thread mdipierro
Thank you Tim, I will do this tonight. Massimo P.S. making a new binary distro is as easy as unpacking and replacing the pyc file in the library.zip file. Massimo On Jan 5, 9:25 am, Timothy Farrell wrote: > OK. Iceberg, yours shouldn't be too difficult, but it's going to take a bit > of ti

[web2py:14575] Re: Sub domain routing using web2py

2009-01-05 Thread sudhakar m
Okie. I got the reply from some kind guy in google. This is what he says. *"You just have to manually add them and look for them in the request and handle accordingly"* I m going to look into the routes.py now. Anybody have a quick soln for this? Thanks, Sudhakar.M --~--~-~--~~-

[web2py:14574] Re: web2py.exe can not start as windows service

2009-01-05 Thread Timothy Farrell
OK.  Iceberg, yours shouldn't be too difficult, but it's going to take a bit of time. For Fran and Massimo, I've attached a patched winservice.py  This will show a traceback of the particular error in the Window's Event Viewer.  That should help us narrow the problem.  Fran, you can copy this

[web2py:14573] Re: web2py.exe can not start as windows service

2009-01-05 Thread Iceberg
Thank for your message, Tim. For me, I only tried the binary distribution. After web2py.exe -W install, a service named "web2py Service" appears in the windows service console. However, web2py.exe -W start does not work. Details is in my last post (not this one). Rumors said that starting as a s

[web2py:14572] Re: web2py.exe can not start as windows service

2009-01-05 Thread Timothy Farrell
Sorry guys.  I generally only watch the list at work.  Being it a holiday, I'm a little behind on this issue.  Let me recap the symptoms so you know that I understand... Source Distribution windows service installs but does not run for Fran. Neither source nor binary Distribution installs (or

[web2py:14571] Re: locking issue

2009-01-05 Thread mdipierro
anyway let me add two comments: 1) the web server will kill long running processes. this mechanism is also a warning. long running processes should be implemented in background (perhaps as xmlrpc services). 2) If you really do not like it, you can override it with session.forget() session._unlo

[web2py:14570] Issues about itemize() and search() in T2, mainly about pagination

2009-01-05 Thread Iceberg
Hi Massimo, I am new to T2, so forgive me if the following issues are not correct. :P 1.Pagination bug in search() Pagination works fine when using t2.itemize(), but neither "[next page]" nor "[previous page]" works when using t2.search(). I check the code. It seems they only work when you hit t

[web2py:14569] Re: locking issue

2009-01-05 Thread vince
oh that's a different case, sorry for my misunderstanding. -vince On Jan 5, 10:12 pm, mdipierro wrote: > It does not lock the whole application. It simply serializes all > requests sharing the same session. > If two different users (or same use using different sessions) connect > to the same ap

[web2py:14568] Re: locking issue

2009-01-05 Thread mdipierro
It does not lock the whole application. It simply serializes all requests sharing the same session. If two different users (or same use using different sessions) connect to the same app, they do not see any locking. The locking is a feature to prevent race conditions on session variables. Massimo

[web2py:14567] Re: locking issue

2009-01-05 Thread vince
oh thanks for the info no session still lock the whole application session.forget() sql session works fine session.connect(request,response,db=db) i think it should make the session default to sql then if file session have locking issue. -vince On Jan 5, 9:04 pm, mdipierro wrote: > Because

[web2py:14566] Re: locking issue

2009-01-05 Thread mdipierro
Because by default you have files in sessions and files are locked to guarantee transactional integrity. Replace def hold(): import time time.sleep(60) return "done" with def hold(): session.forget() import time time.sleep(60) return "done" and there will be no issue. sessions in db are

[web2py:14565] Re: How to custom form validation in T2?

2009-01-05 Thread mdipierro
you can create your on validators: class IS_DIR: def __init__(self,error_message='Dir does not exist'): self.error_message=error_mesage def __call__(self,value): import os if not or.path.isdir(value): return (value,self.error_message) return (value,None

[web2py:14564] Re: web2py.exe can not start as windows service

2009-01-05 Thread Fran
On Jan 5, 2:37 am, Iceberg wrote: > Excuse me, but what do you mean "that works"? > >>> import gluon.winservice > The import succeeded That's all I meant. >, even so, web2py.exe (bin) refused to be started > as a service. I think that, with the information I provided, Massimo will be able to f

[web2py:14563] Re: Sub domain routing using web2py

2009-01-05 Thread sudhakar m
Too bad. App engine doesnt support it. http://code.google.com/p/googleappengine/issues/detail?id=113. Any other alternative? There should be a possibility. Let me dig deeper ;) Thanks, Sudhakar.M --~--~-~--~~~---~--~~ You received this message because you are subsc

[web2py:14562] Re: sqlform error message positioning problem

2009-01-05 Thread vince
wow nice formula! no wonder web2py works great On Jan 4, 10:07 pm, mdipierro wrote: > some changes take one line and they are fast (t~exp(1)). Some changing > take 10 lines they can be slow (t~exp(10)). > > Massimo > > On Jan 4, 7:52 am, vince wrote: > > > wow that was fast! thanks for the awes

[web2py:14561] Re: question about win32 build

2009-01-05 Thread vince
oh thanks i didn't know reportlab is pure python(i guess except the image thing) as it's website come with compiled dll for windows. stupid me spend hours on copying the dll around haha. -vince On Jan 4, 10:06 pm, mdipierro wrote: > Just put the reportlab source in the main web2py folder. You

[web2py:14560] Re: locking issue

2009-01-05 Thread vince
let say i put the following in application/welcome/controllers/ default.py def hold(): import time time.sleep(60) return "done" after i access http://localhost:8000/welcome/default/hold http://localhost:8000/welcome/ anything will lock until hold is returned http://localhost:8000/admin/ or

[web2py:14559] Sub domain routing using web2py

2009-01-05 Thread sudhakar m
Have any one tried sub domain routing in web2py? I am exploring DNS & A records now. Just wondering if there's any easy way out in the application level. Thanks, Sudhakar.M --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr