[web2py] Re: question about webfactional

2010-05-08 Thread annet
Pai, The solution to your problem is described in this thread: http://groups.google.com/group/web2py/browse_thread/thread/504dd2deff41f8f4/156e920088c11b85#156e920088c11b85 Basically you have to log on to webfaction via terminal/ssh and manually create a directory in your remote

[web2py] Re: Data table

2010-05-08 Thread annet
Hi Sverre, Here's an example of how you would make the id a link: table id=init class=display thead tr thcompany id/th thcompany name/th /tr /thead tbody {{for company in rows:}} tr td

[web2py] Re: Bug and fix about IS_DATE_IN_RANGE()

2010-05-08 Thread Iceberg
Thanks for the quick response and fix. But one more comment when talking about doctest. You current doctest cases does not qualified to catch the bug. You need to design cases for critical point. Besides, you need not use print in doctest. For example, the current trunk: v =

[web2py] Fullcalendar with JSON

2010-05-08 Thread Francisco Costa
Hello, I'm trying to use Fullcalendar in my app, and I would like to call events from a JSON external file like this example: http://arshaw.com/js/fullcalendar/examples/json.html The problem is that I must have the JSOn file in the same directory as the .html How can I do this in web2py?

[web2py] _onclick to close window

2010-05-08 Thread annet
In custom_ajax.html I defined the following function: function closeWin() { window.close(); return false; } I a function I added a cancel button to a form: This one works: form[0][-1] [1].append(INPUT(_type='button',_value='Cancel',_onclick='javascript:history.go(-1)')) This one doesn't:

[web2py] Re: jquery click function problem

2010-05-08 Thread salbefe
Thank you Massimo !! Regards On 7 mayo, 23:22, mdipierro mdipie...@cs.depaul.edu wrote: Because scripts are not executed in ajax loaded content. It is a browser thing. It is not in the specs. You can do div class=one id=a onclick=jQuery('.two').slideToggle()Hello/ div div class=two

[web2py] Re: Reverse Search with .like

2010-05-08 Thread AsmanCom
Hey Guys, that helped a lot! with a lil correction it works very nice. Thanks for the Support. On 8 Mai, 04:18, Russell russell.mcmur...@gmail.com wrote: You might want to try something like this:.     from gluon.sql import Expression     db(table1.field1.like(Expression(('%' ||

[web2py] Re: ToscaWidgets

2010-05-08 Thread lannick
Hi, Nobody know Toscawidgets and have try it with web2py ? Regards, Lannick On 26 avr, 13:14, lannick abou...@gmail.com wrote: Hi, Does anyone know and have used ToscaWidgets with web2py ? (http:// toscawidgets.org/ ) Regards, Lannick -- Subscription

Re: [web2py] New to web app development -- is web2py a good choice

2010-05-08 Thread Alexei Vinidiktov
On Thu, May 6, 2010 at 12:37 PM, Anthony av201...@yahoo.com wrote: [...] From what I've read, web2py sounds like a great framework -- comprehensive, well-integrated, easy to set up, learn, and deploy, etc. However, although it sounds good on paper, I haven't yet found a single site built with

Re: [web2py] Re: Bug and fix about IS_DATE_IN_RANGE()

2010-05-08 Thread Jonathan Lundell
On May 8, 2010, at 12:52 AM, Iceberg wrote: Thanks for the quick response and fix. But one more comment when talking about doctest. You current doctest cases does not qualified to catch the bug. You need to design cases for critical point. Besides, you need not use print in doctest. Right.

[web2py] Re: question about webfactional

2010-05-08 Thread Pai
that works! Thanks annet! On May 8, 1:52 am, annet annet.verm...@gmail.com wrote: Pai, The solution to your problem is described in this thread: http://groups.google.com/group/web2py/browse_thread/thread/504dd2deff... Basically you have to log on to webfaction via terminal/ssh and

Re: [web2py] Fullcalendar with JSON

2010-05-08 Thread Thadeus Burgess
That is incorrect, and only if you want to run that example.. I use fullcalendar and I have it at /init/people/calendar.html and I have the json at /init/ajax_lib/events.json. You just need to make sure to return the correct JSON structure that fullcalendar understands. You will need a custom json

Re: [web2py] New to web app development -- is web2py a good choice

2010-05-08 Thread Thadeus Burgess
One thing I have noticed is django and RoR is for the most part, a designer oriented community. IE: Lots of designers, few real programmers/engineers, this is why you see design-oriented keywords floating around in those frameworks. Most of us here in the web2py community are

Re: [web2py] New to web app development -- is web2py a good choice

2010-05-08 Thread Jason Brower
Yup... the software I create with web2py is stricty internal anyway. They honestly would fire me if it looked too good. I would be wasting there money. :P Best Regards, Jason On Sat, 2010-05-08 at 11:30 -0500, Thadeus Burgess wrote: One thing I have noticed is django and RoR is for the most

[web2py] Routes.py not working when deployed to GAE

2010-05-08 Thread Dane
Hello, In my routes.py file, I have this line: routes_in = (('.*:/crossdomain.xml', '/init/static/crossdomain.xml'),) Working locally, if I go to http://localhost:8080/crossdomain.xml , the file is there. However, when I upload to google app engine,

[web2py] Is anyone using MongoDB with web2py?

2010-05-08 Thread David Marko
Is anyone using MongoDB with web2py? How do you 'share' connection object in your app when using pymongo? If I put the code below into db.py, each request causes the new connection opened to MongoDB what mean that after 500 requests to my app, there are 500 separate connections I can see on

[web2py] Re: Is anyone using MongoDB with web2py?

2010-05-08 Thread Pystar
For now, Web2py's DAL doesnt support NoSQL databases. I think Massimo can tell us more on the status of the DAL rewrite and when it would be possible. On May 8, 5:59 pm, David Marko dma...@tiscali.cz wrote: Is anyone using MongoDB with web2py? How do you 'share' connection object in your app

[web2py] Re: Is anyone using MongoDB with web2py?

2010-05-08 Thread David Marko
Yes, I know, but you should be able to use it without DAL using pymongo as a primary MongoDB python driver. And thats where my question goes. David On 8 kvě, 19:22, Pystar aitoehi...@gmail.com wrote: For now, Web2py's DAL doesnt support NoSQL databases. I think Massimo can tell us more on the

[web2py] WebGrid for Web2py and Keyerror

2010-05-08 Thread winti
Hello, in a controller i define a temp db and want to return the results with webgrid to a view. I get a Keyerror on 'identity'. Traceback (most recent call last): File /data/projects/frameworks/web2py/applications/gluon/ restricted.py, line 178, in restricted exec ccode in environment

[web2py] Re: WebGrid for Web2py and Keyerror

2010-05-08 Thread mr.freeze
'identity' is probably a reserved word in sqlite. Try changing it to something else. On May 8, 1:36 pm, winti stefan.winterb...@gmail.com wrote: Hello, in a controller i define a temp db and want to return the results with webgrid to a view. I get a Keyerror on 'identity'. Traceback (most

[web2py] Re: WebGrid for Web2py and Keyerror

2010-05-08 Thread winti
i changed it to myid and i get a error on: KeyError: 'myid' Stefan On May 8, 8:51 pm, mr.freeze nat...@freezable.com wrote: 'identity' is probably a reserved word in sqlite. Try changing it to something else. On May 8, 1:36 pm, winti stefan.winterb...@gmail.com wrote: Hello, in a

[web2py] Re: How to set multiple primary key?

2010-05-08 Thread DenesL
Multiple primary keys should work if you are defining legacy tables in one of the supported DB engines. Are you using MS SQL, DB2, Ingres or Informix? Can we see the model? On May 8, 5:57 am, Iceberg iceb...@21cn.com wrote: Hi there, I am fiddling multiple primary keys. Somehow I managed to

[web2py] Re: How to set multiple primary key?

2010-05-08 Thread Iceberg
I am not dealing with legacy tables, I am just starting a new db and wondering whether I can set multiple primary key, in order to eliminate the chance of duplicated data. For example. db = DAL('sqlite://storage.sqlite') db.define_table('account', Field('given_name'),

[web2py] Re: WebGrid for Web2py and Keyerror

2010-05-08 Thread mr.freeze
Did you delete the default DAL declaration at the top of db.py? Your code works for me. On May 8, 2:04 pm, winti stefan.winterb...@gmail.com wrote: i changed it to myid and i get a error on: KeyError: 'myid' Stefan On May 8, 8:51 pm, mr.freeze nat...@freezable.com wrote: 'identity' is

[web2py] Re: Routes.py not working when deployed to GAE

2010-05-08 Thread mdipierro
Can you try? routes_in = ((/crossdomain.xml', '/init/static/crossdomain.xml'),) On May 8, 11:58 am, Dane dane.schnei...@gmail.com wrote: Hello, In my routes.py file, I have this line: routes_in = (('.*:/crossdomain.xml', '/init/static/crossdomain.xml'),) Working locally, if I go

[web2py] Re: Routes.py not working when deployed to GAE

2010-05-08 Thread Dane
I tried this. It works locally, but still having problems when deployed. Now I'm getting a 500. Here's the traceback: type 'exceptions.SyntaxError': invalid syntax (string, line 1) Traceback (most recent call last): File /base/data/home/apps/tthultimate/1.341813257625966505/ gaehandler.py,

[web2py] Re: post via mail

2010-05-08 Thread Pepe
good! anew: i will try :) thanks Massimo! On May 7, 5:17 pm, mdipierro mdipie...@cs.depaul.edu wrote: Yes but in a different way. Your VPS.net server probably can already receive emails (assuming there is account with the name of the receiver). You just need a script that uses pop to fetch

[web2py] is row.update(name='someone') really works??

2010-05-08 Thread Eldr3D
Hello all i just back to web2py a few weeks ago and i am still learning all the new changes reading online official web2py book. currently i am using web2py DALs in a non web-application , so to parse and import data from text files into database (to update records). here is the example of

[web2py] migratin apps

2010-05-08 Thread Tomas Pelka
Hi all, is there any advice how to migrate my web2py application. I have shared postgress db. When I start up new instance (simple copied) of my app, I always get following traceback: Traceback (most recent call last): File /home/tom/web2py/gluon/restricted.py, line 178, in restricted

Re: [web2py] migratin apps

2010-05-08 Thread Thadeus Burgess
Your tables already exist in the database. However you must have deleted your /app/databases/*.table files, so as far as web2py is concerned it is a blank database. To remedy the solution, add this to each of your define table statements db.define_table('.', fake_migrate=True) Run your code

Re: [web2py] is row.update(name='someone') really works??

2010-05-08 Thread Thadeus Burgess
Looks like you are not running the latest version of web2py . -- Thadeus On Sat, May 8, 2010 at 4:34 PM, Eldr3D phyo.arkarl...@gmail.com wrote: Hello all i just back to web2py a few weeks ago and i am still learning all the new changes reading online official web2py book. currently i

[web2py] Re: Fullcalendar with JSON

2010-05-08 Thread Francisco Costa
Thank you for your answer Thadeus. I was able to understand the issue of the problem. On May 8, 5:27 pm, Thadeus Burgess thade...@thadeusb.com wrote: That is incorrect, and only if you want to run that example.. I use fullcalendar and I have it at /init/people/calendar.html and I have the

[web2py] Re: New to web app development -- is web2py a good choice

2010-05-08 Thread weheh
Interesting observation, Thadeus. Who knows how accurate, but it resonates with me. According to one of the Django developers, Django was designed with the notion that designers and engineers don't mix, so the templating language and syntax are different from the server- side db interface and

Re: [web2py] is row.update(name='someone') really works??

2010-05-08 Thread Vasile Ermicioi
web2py is always backward compatible, you can use either row.update or row.update_record but if you use db(db.cdsdata.id0).select('extracted') you can't use update_record because your rows didn't received an id from db so you ca use any of this rows=db(db.cdsdata.id0).select()

[web2py] how to use easy_install

2010-05-08 Thread jayveesea
hello. i just downloaded web2py (for windows) unzipped it and launched web2py in console like this... web2py.exe -S welcome now i am trying to add a module. and i try this command... easy_install ipython or easy_install numpy ...but it does not like it and i get the following... File

[web2py] Re: how to use easy_install

2010-05-08 Thread mdipierro
If you are running web2py binary (web2py.exe) you cannot use easy_insall. to use easy_install you need to 1) download and install python 2.5 or 2.6 2) download and distutil for python 2.5 or 2.6 (this gives you easy_install) 3) download are run web2py source (web2py.py) 4) download any other

[web2py] Re: Why not session['key'] ?

2010-05-08 Thread mdipierro
You cannot store your own classes in the session because the session is retrieved before your own classes are defined. You can only store in session primitive types. You can serialize your objects yourself. On May 8, 7:30 pm, ionel ionelanton...@gmail.com wrote: Hello, I'd like to have

Re: [web2py] Re: New to web app development -- is web2py a good choice

2010-05-08 Thread Miguel Lopes
Yeah! shows how conservative I am :-) On Fri, May 7, 2010 at 10:10 PM, mdipierro mdipie...@cs.depaul.edu wrote: Massimo already answered this. But I've been using web2py from the beginning, have a site running on it with absolutely no problems. Upgrading to a new release is as simple as

[web2py] Calculation error

2010-05-08 Thread greenpoise
Can someone help me. I am trying to do a simple calculation of fields. Fields are defined as decimal in db.py and here is the calculation: db.order.tipgranted.compute=lambda r: r['totalsale']*r['tipvalue'] error: TypeError: can't multiply sequence by non-int of type 'float'

[web2py] Re: Why not session['key'] ?

2010-05-08 Thread ionel
But I allready did that... and its working... Something like that: if not session.c: c = MyClass() session.c = c else: c = session.c But my question was why I cannot use session['c'] instead of session.c Thank you! i On May 8, 9:31 pm, mdipierro mdipie...@cs.depaul.edu wrote:

[web2py] Re: Calculation error

2010-05-08 Thread mdipierro
Can you show us the model and the action that triggers this? On May 8, 9:49 pm, greenpoise danel.sega...@gmail.com wrote: Can someone help me. I am trying to do a simple calculation of fields. Fields are defined as decimal in db.py and here is the calculation:    

[web2py] Re: Calculation error

2010-05-08 Thread greenpoise
Model: db.define_table('order', Field('employee',db.person), Field('tablenumber'), Field('ordernumber'), Field('orderdate','date'), Field('totalsale', 'decimal(10,2)'), Field('tipgranted', 'decimal(10,2)',default=None, update=None, readable=False),

[web2py] Re: Why not session['key'] ?

2010-05-08 Thread mdipierro
They should be equivalent. Can you show the traceback? On May 8, 9:54 pm, ionel ionelanton...@gmail.com wrote: But I allready did that... and its working... Something like that: if not session.c:     c = MyClass()     session.c = c else:     c = session.c But my question was why I

[web2py] Re: Calculation error

2010-05-08 Thread Iceberg
Is that possibly because the default value of tipvalue is a string '0.15'? Try use float 0.15 instead. -- Iceberg On May9, 11:00am, greenpoise danel.sega...@gmail.com wrote: Model: db.define_table('order',     Field('employee',db.person),     Field('tablenumber'),     Field('ordernumber'),

[web2py] Re: Calculation error

2010-05-08 Thread mdipierro
There are two problems: 1) order is reserved keyword. 2) decimal types are treated as string internally and there for compute should be db.order.tipgranted.compute=lambda r: float(r['totalsale'])*float(r['tipvalue']) or better db.order.tipgranted.compute=lambda r:

[web2py] Re: Calculation error

2010-05-08 Thread mdipierro
P.S. perhaps this should be changed. Decimal is not used very much and not supported well on sqlite at all. I would use float. On May 8, 10:38 pm, mdipierro mdipie...@cs.depaul.edu wrote: There are two problems: 1)  order is reserved keyword. 2) decimal types are treated as string internally

[web2py] Re: Is anyone using MongoDB with web2py?

2010-05-08 Thread Yarko Tymciurak
On May 8, 12:40 pm, David Marko dma...@tiscali.cz wrote: Yes, I know, but you should be able to use it without DAL using pymongo as a primary MongoDB python driver. And thats where my question goes. If you want to experiement, and get a start, I suggest you write your scaffolding app without /

[web2py] Re: Calculation error

2010-05-08 Thread greenpoise
Ok, Will try. Thanks On May 8, 11:39 pm, mdipierro mdipie...@cs.depaul.edu wrote: P.S. perhaps this should be changed. Decimal is not used very much and not supported well on sqlite at all. I would use float. On May 8, 10:38 pm, mdipierro mdipie...@cs.depaul.edu wrote: There are two