[web2py] Re: question about webfactional

2010-05-07 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/applicat

[web2py] Re: question about webfactional

2010-05-07 Thread Pai
I give write permission to the entired web2py folder. still the same error. do i have to restart web2py? if so, how do i do that? i came from a window world. On May 7, 11:13 pm, mdipierro wrote: > probably a file permission issue. > > On May 7, 11:09 pm, Pai wrote: > > > Hi, > > > I sign up

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

2010-05-07 Thread Jonathan Lundell
On May 7, 2010, at 4:39 PM, mdipierro wrote: > Done. I added one test each. we should have more tests in gluon/tests > we have none, only doctests for validators. Yes, we should (though doctests are nice documentation for validators). There's a plugin for nose that will run doctests along with u

[web2py] Re: question about webfactional

2010-05-07 Thread mdipierro
probably a file permission issue. On May 7, 11:09 pm, Pai wrote: > Hi, > > I sign up for webfactional and ask them to install web2py for my > framework.  They have it back to me within a couple of hours!  I'm > trying to start an application now but when I click on create, I got > an error that s

[web2py] question about webfactional

2010-05-07 Thread Pai
Hi, I sign up for webfactional and ask them to install web2py for my framework. They have it back to me within a couple of hours! I'm trying to start an application now but when I click on create, I got an error that said "unabled to create application "test". " I made some web2py app from my

Re: [web2py] Error in template.py

2010-05-07 Thread Thadeus Burgess
O.O, my bad, Sent Massimo a patch. -- Thadeus On Fri, May 7, 2010 at 8:56 PM, Jose wrote: > name in self.lexers:\nTypeError: argument > of type \'NoneType\' is not iterab

[web2py] Re: Error in template.py

2010-05-07 Thread mdipierro
I think it is fixed. Can you try trunk again? On May 7, 8:56 pm, Jose wrote: > after updating this error occurs: > > line 514, in parse\n    if name in self.lexers:\nTypeError: argument > of type \'NoneType\' is not iterable\n' > > Jose

[web2py] Re: Reverse Search with .like

2010-05-07 Thread Russell
You might want to try something like this:. from gluon.sql import Expression db(table1.field1.like(Expression("('%' || table2.field2 || '%')".select(db.table1.field1) Not very pretty, but it does work. On May 8, 9:13 am, mdipierro wrote: > Can you try > > from gluon.sql import Quer

[web2py] Error in template.py

2010-05-07 Thread Jose
after updating this error occurs: line 514, in parse\nif name in self.lexers:\nTypeError: argument of type \'NoneType\' is not iterable\n' Jose

[web2py] Re: When will the web2py book open to all editing?

2010-05-07 Thread greenpoise
My take. Keep things separate. I got the book both times and knowing the source had a lot if not the majority of weight in my decision. I think that more input to a site such as web2pyslices is a good complement for the book. On May 7, 5:23 pm, mdipierro wrote: > LOL. > > People who ask to be

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

2010-05-07 Thread mdipierro
Done. I added one test each. we should have more tests in gluon/tests we have none, only doctests for validators. On May 7, 4:26 pm, Jonathan Lundell wrote: > On May 7, 2010, at 9:30 AM, Iceberg wrote: > > > Right now, IS_DATE_IN_RANGE(minimum=foo, maximum=bar) does NOT accept > > the given minim

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

2010-05-07 Thread Jonathan Lundell
On May 7, 2010, at 9:30 AM, Iceberg wrote: > Right now, IS_DATE_IN_RANGE(minimum=foo, maximum=bar) does NOT accept > the given minimum nor maximum value. That is not the design intention > according to error message. Please get rid off the two equal marks in > IS_DATE_IN_RANGE.__call__(). > > Sam

[web2py] Re: Web2py crashing

2010-05-07 Thread mdipierro
Let us know what you discover. On May 7, 3:57 pm, David Zejda wrote: > Yes, vanilla hardware (some dual core Intel). I'm running the latest > web2py now, but it was crashing even with about half year old version > (1.73 or so), so the issue is probably not webserver specific. The > process is in

[web2py] Re: When will the web2py book open to all editing?

2010-05-07 Thread mdipierro
LOL. People who ask to be editors of the book and have proven qualifications can email me and ask permissions. for now everybody can add wiki pages to the book and they are editable. On May 7, 4:18 pm, Thadeus Burgess wrote: > I do not want to go in and clean up "trash" if there is a way to > pr

[web2py] Re: jquery click function problem

2010-05-07 Thread mdipierro
Because s are not executed in ajax loaded content. It is a browser thing. It is not in the specs. You can do
Hello
World
this will work because the code is executed onclick and not on ajax load. M

[web2py] Re: applying multiple decorators in a/c/default.py

2010-05-07 Thread mdipierro
The problem is that add_team is not an action. The other problem is the order of decorators. In this case @auth.requires_login() @service.jsonrpc def add_team(name, cap): #function uses auth.user.id You register the service (jsonrpc) before requiring_login therefore login would not be used.

Re: [web2py] Re: When will the web2py book open to all editing?

2010-05-07 Thread Thadeus Burgess
I do not want to go in and clean up "trash" if there is a way to prevent it from getting there in the first place. -- Thadeus On Fri, May 7, 2010 at 4:16 PM, Patrick wrote: > > > On May 7, 12:32 pm, waTR wrote: >> I was just wondering if there are plans to open the book wiki to >> editing t

[web2py] Re: post via mail

2010-05-07 Thread mdipierro
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 emails from the inbox of that user account. It should actually be simpler. Somewhere I have that script for IM

[web2py] Re: When will the web2py book open to all editing?

2010-05-07 Thread Patrick
On May 7, 12:32 pm, waTR wrote: > I was just wondering if there are plans to open the book wiki to > editing to everyone (even if you don't create an account). There is no > danger in doing that...there are plenty of people who will clean up > any garbage... You would be surprised. Many sites t

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

2010-05-07 Thread mdipierro
oops. WIll fix this tonight On May 7, 11:30 am, Iceberg wrote: > Hi Massimo, > > Right now, IS_DATE_IN_RANGE(minimum=foo, maximum=bar) does NOT accept > the given minimum nor maximum value. That is not the design intention > according to error message. Please get rid off the two equal marks in >

[web2py] Re: Bug with path-code?

2010-05-07 Thread mdipierro
If this is the URL you want: http://127.0.0.1:8000/myapp/sysd/users than you need controllers/sysd.py and views like views/sysd/users.html On May 7, 11:26 am, Sverre wrote: > I'm trying to get a more clean file structure and made controller like > this > > sysdata/user.py > > with the views

[web2py] Re: Reverse Search with .like

2010-05-07 Thread mdipierro
Can you try from gluon.sql import Query print db(Query(" '%' || NEW.field_1 || '%' LIKE table_1.field_1 "))._select(db.table_1.field_1) Do you get the query you want? On May 7, 10:48 am, AsmanCom wrote: > It returns nothing... even if I write in the exact value and it should > work like a fuzz

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

2010-05-07 Thread mdipierro
> 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 (well just import you old app in a new > release) - No. It is simpler. There is a button in admin on the right [upgr

[web2py] Re: Web2py crashing

2010-05-07 Thread David Zejda
Yes, vanilla hardware (some dual core Intel). I'm running the latest web2py now, but it was crashing even with about half year old version (1.73 or so), so the issue is probably not webserver specific. The process is in ps ax no more when crashes. Currently the server is being accessed through Apac

[web2py] When will the web2py book open to all editing?

2010-05-07 Thread waTR
I was just wondering if there are plans to open the book wiki to editing to everyone (even if you don't create an account). There is no danger in doing that...there are plenty of people who will clean up any garbage...

[web2py] jquery click function problem

2010-05-07 Thread salbefe
Hello, First of all, I think I should say sorry because probably this is not the correct place to post the following problem but I'm getting crazy. My problem with jquery is as follows: On a view I have a form that is submited via web2py ajax method. Something like this [] .

[web2py] Re: applying multiple decorators in a/c/default.py

2010-05-07 Thread MikeEllis
Massimo, Could you please elaborate a bit further? Is this restriction something peculiar to auth.requires_login? or service.jsonrpc? or both? Or is it something that applies to any use of multiple decorators in web2py? Thanks, Mike On May 7, 10:32 am, mdipierro wrote: > You cannot do this: >

[web2py] Re: post via mail

2010-05-07 Thread Pepe
Thanks Massimo, I will try that. only one question more: how can I implement (if is possible) this: http://code.google.com/appengine/docs/python/mail/receivingmail.html in my server? (a vps.net account) is that possible? thinking in a CRM (other idea, not the original "post via mail") I think th

[web2py] Bug and fix about IS_DATE_IN_RANGE()

2010-05-07 Thread Iceberg
Hi Massimo, Right now, IS_DATE_IN_RANGE(minimum=foo, maximum=bar) does NOT accept the given minimum nor maximum value. That is not the design intention according to error message. Please get rid off the two equal marks in IS_DATE_IN_RANGE.__call__(). Same applies to IS_DATETIME_IN_RANGE. Thanks.

[web2py] Bug with path-code?

2010-05-07 Thread Sverre
I'm trying to get a more clean file structure and made controller like this sysdata/user.py with the views like this sysdata/user/change.html sysdata/user/new.html sysdata/user/users.html The files on the harddisk are ok. But if I edit the controller get I a link for "users.html" like this ht

[web2py] Re: Reverse Search with .like

2010-05-07 Thread AsmanCom
I´ll try to explain, I need check if any record of a given field is contained in a string. Is there any solution? On 7 Mai, 17:03, mdipierro wrote: > This should work > > db("'%' || NEW.field_1 || '%'  LIKE > table_1.field_1").select(db.table_1.field_1) > > On May 7, 9:35 am, AsmanCom wrote: > >

Re: [web2py] Re: Custom widgets and form errors

2010-05-07 Thread Miguel Lopes
On Fri, May 7, 2010 at 3:42 PM, Miguel Lopes wrote: > > > On Fri, May 7, 2010 at 3:29 PM, mdipierro wrote: > >> Errors in form.errors (which is a Storage object and extends a dict). >> Perhaps they can be displayed somewhere else? >> >> > Yes of course. But the point is that if the extension mec

[web2py] Re: Reverse Search with .like

2010-05-07 Thread AsmanCom
It returns nothing... even if I write in the exact value and it should work like a fuzzy logic.. like that: find_value= request.vars.value db('%' + table_1.field_1 + '%').lower().like(find_value).select(db.table_1.field_1) or db('%' + table_1.field_1 + '%').lower().like('%' + find_value + '%').

Re: [web2py] Re: applying multiple decorators in a/c/default.py

2010-05-07 Thread Carl Roach
Excellent... thanks On 7 May 2010, at 15:32, mdipierro wrote: > You cannot do this: > > @auth.requires_login() > @service.jsonrpc > def add_team(name, cap): >#function uses auth.user.id > > but you can do > > @service.jsonrpc > def add_team(name, cap): >#function uses auth.user.id > > @a

Re: [web2py] Idea/question

2010-05-07 Thread Thadeus Burgess
Also, models can be included in sub folders and the folder will be executed in apha order, and then its models underneath the folder executed in alpha order A_plugin_comments -> init.py db.py query.py B_plugin_ratings -> ..etcetc.. This might help clean things up a bit =? -- T

Re: [web2py] Idea/question

2010-05-07 Thread Thadeus Burgess
It would be very nice if we could control the order, alas it is alphabetical. So we must resort to craziness such as A_config.py B_settings.py C_db.py D_auth.py E_crud.py F_other_mode.py etc etc. =) -- Thadeus On Fri, May 7, 2010 at 10:08 AM, Miguel Lopes wrote: > On Fri, May 7, 2010 at

Re: [web2py] Idea/question

2010-05-07 Thread Miguel Lopes
On Fri, May 7, 2010 at 4:06 PM, blackthorne wrote: > Is it possible to customize the order by which models are loaded/ > imported in a web2py application? > Are they loaded by alphabetical order? > > Yes. They are loaded alphabetically. > It comes to my mind an idea of an interface for this bas

[web2py] Idea/question

2010-05-07 Thread blackthorne
Is it possible to customize the order by which models are loaded/ imported in a web2py application? Are they loaded by alphabetical order? It comes to my mind an idea of an interface for this based on dragging options like this http://tool-man.org/examples/sorting.html . Thanks, Best Regards

[web2py] Re: Reverse Search with .like

2010-05-07 Thread mdipierro
This should work db("'%' || NEW.field_1 || '%' LIKE table_1.field_1").select(db.table_1.field_1) On May 7, 9:35 am, AsmanCom wrote: > Hi, > > here is the important Code from an Sqlite trigger i use very often, is > this possible with web2py to? > > Sqlite: > (SELECT table_1.field_1 FROM table_1

[web2py] Re: Deployment - SSL certificate under Windows

2010-05-07 Thread blindvic
I use: web2py_no_console.exe --ip=0.0.0.0 --port=8080 --password=111 -- ssl_certificate=ssl_certificate.key --ssl_private_key=ssl_private.key Put ssl_certificate.key and ssl_private.key into web2py folder. On 6 май, 22:28, greenpoise wrote: > I had removed the post thinking that I got it worki

[web2py] Re: Reverse Search with .like

2010-05-07 Thread AsmanCom
The || operator is "concatenate", its like + in python. On 7 Mai, 16:48, Mengu wrote: > is || just a string or have any purpose? > > On 7 Mayıs, 17:35, AsmanCom wrote: > > > Hi, > > > here is the important Code from an Sqlite trigger i use very often, is > > this possible with web2py to? > > > S

[web2py] Re: Reverse Search with .like

2010-05-07 Thread Mengu
is || just a string or have any purpose? On 7 Mayıs, 17:35, AsmanCom wrote: > Hi, > > here is the important Code from an Sqlite trigger i use very often, is > this possible with web2py to? > > Sqlite: > (SELECT table_1.field_1 FROM table_1 WHERE '%' || NEW.field_1 || '%' > LIKE table_1.field_1 )

Re: [web2py] Re: Custom widgets and form errors

2010-05-07 Thread Miguel Lopes
On Fri, May 7, 2010 at 3:29 PM, mdipierro wrote: > Errors in form.errors (which is a Storage object and extends a dict). > Perhaps they can be displayed somewhere else? > > Yes of course. But the point is that if the extension mechanism for widgets could perhaps be polished so that it is not limi

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

2010-05-07 Thread Miguel Lopes
On Thu, May 6, 2010 at 6:37 AM, Anthony wrote: > I am brand new to web application development, and I'm looking for a > good web framework to learn in order to build a new web application > (sort of a personal task/project management system). I want it to look > (and act) like a serious, polished

[web2py] Reverse Search with .like

2010-05-07 Thread AsmanCom
Hi, here is the important Code from an Sqlite trigger i use very often, is this possible with web2py to? Sqlite: (SELECT table_1.field_1 FROM table_1 WHERE '%' || NEW.field_1 || '%' LIKE table_1.field_1 ) or i can even do: (SELECT table_1.field_1 FROM table_1 WHERE '%' || NEW.field_1 || '%' LIK

[web2py] Re: applying multiple decorators in a/c/default.py

2010-05-07 Thread mdipierro
You cannot do this: @auth.requires_login() @service.jsonrpc def add_team(name, cap): #function uses auth.user.id but you can do @service.jsonrpc def add_team(name, cap): #function uses auth.user.id @auth.requires_login() def call(): return service() On May 7, 9:17 am, Carl wrote: >

[web2py] Re: PicklingError: Can't pickle : it's not the same object as Foo

2010-05-07 Thread MikeEllis
It seems like the best approach, for my app at least, is to define a decorator to handle the serializing and unserializing of objects stored in session, e.g. @sessionobjects def mycontroller(): ... This seems to be working, but I'm wondering if it has any known gotchas relative to the under-t

[web2py] Re: Custom widgets and form errors

2010-05-07 Thread mdipierro
Errors in form.errors (which is a Storage object and extends a dict). Perhaps they can be displayed somewhere else? On May 7, 7:26 am, Miguel Lopes wrote: > Encapsulating javascript code within some widgets is a good solution when > the functionality is generic. This widgets act like drop-in comp

[web2py] Re: Trouble running cron

2010-05-07 Thread mdipierro
What is the setup on the hosted server? The fact is that if - for example - you use mod_wsgi there is no persistent python process to run cron. You would have to run another web2py instance on localhost just for the purpose of cron. On May 7, 6:28 am, Adi wrote: > Hi all, > > I'm on 1.77.3. I hav

[web2py] Re: Multiple apps based on one model.

2010-05-07 Thread mdipierro
You can define tables in module but you need something like #in module def define_tables(db,request,T,auth): db.define_table('sometable,Field('blablabla',default=auth.user_id,requires=IS_NOT_EMPTY(error_message=T("cannot be emtpy" #in controller module=local_import('module') module.define_t

[web2py] Reference Fields

2010-05-07 Thread AsmanCom
1. In this Example i need to take the input string from table_1.field_1 and get_or_create a record in table_2 with table_1.field_1 value in table_2.field_1 and insert the table_2.field_2 refernce in table_1.field_2: def get_or_create(table, fields): logic=reduce(lambda a,b:a&b,[table[k]==field

[web2py] applying multiple decorators in a/c/default.py

2010-05-07 Thread Carl
I'd like to use several decorators on a function e.g., @auth.requires_login() @service.jsonrpc def add_team(name, cap): #function uses auth.user.id In testing I've realised that service.jsonrpc is working but auth.requires_login isn't. ie if a user is not logged in then service.jsonrpc is c

Re: [web2py] Re: Web2py crashing

2010-05-07 Thread Timothy Farrell
Is this standard hardware? The only place I've seen Python crash is on non-standard hardware (AS400) with a non-supported build of Python. Web2py recent switched from Cherrypy's wsgiserver to Rocket (which I wrote) as of version 1.77.2 (I think). Which version are you running? With built-in

[web2py] Re: Web2py YAML Model Translator

2010-05-07 Thread blackthorne
ok, next week I will try to make something out of this. If anyone likes this idea and wants to suggest something, now is the time. Massimo, your idea is really interesting but probably requires some kind of "sync", so that the user can change things in the HTML and see it reflected in the YAML tree

[web2py] Re: Web2py crashing

2010-05-07 Thread David Zejda
AFAIK web2py uses cherrypy webserver, which listens as a daemon on certain port. With crashing I mean that the listening process (web2py with cherrypy at the background) suddenly terminates. I use standard Python v 2.5.2 as packaged for Debian. David On May 7, 2:52 pm, Timothy Farrell wrote: > C

Re: [web2py] Web2py crashing

2010-05-07 Thread Timothy Farrell
Can you be more specific on what you mean by "crashing"? Interpreted languages shouldn't crash and generally if they do it's something wrong with the interpreter. Are you using cPython? On 5/7/2010 1:48 AM, David Zejda wrote: Hi, my web2py instance (about 1 pageviews, 30+ ajax requ

Re: [web2py] Top 3 web2py features

2010-05-07 Thread Miguel Lopes
+1 * (Works out of the box) All in one packages with no dependencies and no config files +1 * Backward compatibility * Very easy to extend (like Python fits my brain) Miguel On Thu, May 6, 2010 at 4:18 PM, Álvaro Justen [Turicas] < alvarojus...@gmail.com> wrote: > Hi folks, > I'm writing an ar

[web2py] Custom widgets and form errors

2010-05-07 Thread Miguel Lopes
Encapsulating javascript code within some widgets is a good solution when the functionality is generic. This widgets act like drop-in components. Two examples by mr.freeze are (txs for the nice concept mr.freeze): http://www.web2pyslices.com/main/slices/take_slice/24 http://www.web2pyslices.com/ma

[web2py] Re: First web2py app

2010-05-07 Thread ScOut3R
On May 6, 3:53 am, Yarko Tymciurak wrote: > On May 5, 2:46 pm, ScOut3R wrote: > > > > > > > On May 5, 6:02 am, Yarko Tymciurak > > wrote: > > > > On May 4, 4:19 pm, ScOut3R wrote: > > > > > Here it goes. First of all, I'm not a developer by profession, not > > > > even a web developer. You'll

[web2py] Re: Ajax examples not working for me

2010-05-07 Thread Zhe Li
Thanks Mr.Freeze! Yes, it works now!! Regards, Zhe On May 7, 9:48 am, "mr.freeze" wrote: > I think you want your pattern to be: > pattern = '%' + request.vars.keyword.lower() + '%' > > instead of : > pattern = '+ request.vars.keyword.lower() + ' > > On May 7, 2:23 am, Zhe Li wrote: > > > > > Hi

[web2py] Re: Service returns invalid function message

2010-05-07 Thread Matthew
I did delete it accidentally. Thank you for the quick spot. On May 7, 12:12 am, mdipierro wrote: > works for me with 1.77.3 > > did you delete > > def call(): return service() > > On May 6, 11:08 pm, Matthew wrote: > > > I have a simple service running in web2py 1.74.6 and 1.77.3. In the > > old

[web2py] Trouble running cron

2010-05-07 Thread Adi
Hi all, I'm on 1.77.3. I have setup web2py with apache2 using Massimo's recipe. I have a background process defined in my app/cron/crontab like this: */2 * * * * root *applications/init/modules/myprocess.py Now this runs fine on my local machine, but on the hosted server cron is not running. How

[web2py] Re: CSS files are cached. How can I change that?

2010-05-07 Thread Sverre
Thank you. On 7 Mai, 10:08, "mr.freeze" wrote: > A quick and dirty way is timestamping your CSS link: > > {{ts = str(request.now).replace(':','')}} > > > On May 7, 1:29 am, Sverre wrote: > > > I changed my css files in the static section but there are cached, so > > the results were the same as

[web2py] Re: Top 3 web2py features

2010-05-07 Thread Beerc
As Mengu, but with different flavor: 1) easy as possible (you can write many details: DAL, forms, CRUD, templates etc.) 2) secure (web is dangerous, because of its openness, but with web2py easy to avoid many security problems) 3) fast and scalable (every part: the DAL, the core, the templates)

[web2py] Multiple apps based on one model.

2010-05-07 Thread annet
I read this post in the group: http://groups.google.com/group/web2py/browse_thread/thread/6201f9f56bdb16d6, and I am facing a similar problem. I have one web2py installation in which I have a base application which contains all shared files i.e .js and .css files. Within this application I also d

[web2py] Re: CSS files are cached. How can I change that?

2010-05-07 Thread mr.freeze
A quick and dirty way is timestamping your CSS link: {{ts = str(request.now).replace(':','')}} On May 7, 1:29 am, Sverre wrote: > I changed my css files in the static section but there are cached, so > the results were the same as before. I examined this with firebug. How > can I solve this ?

Re: [web2py] Re: error in import pyserial

2010-05-07 Thread Jason Brower
I have never had to deal wtih python for windows. You may want to ask the python guys themselves, or the pyserial guys. If you have access to irc you can talk to them and they answer very quickly. Sorry I can't help you more there. BR, Jason On Thu, 2010-05-06 at 06:06 -0700, frankz wrote: > Pa

[web2py] Re: Ajax examples not working for me

2010-05-07 Thread mr.freeze
I think you want your pattern to be: pattern = '%' + request.vars.keyword.lower() + '%' instead of : pattern = '+ request.vars.keyword.lower() + ' On May 7, 2:23 am, Zhe Li wrote: > Hi  Massimo, > > the only message I got from firebug is: > > The 'charCode' property of a keyup event should not

[web2py] Re: Ajax examples not working for me

2010-05-07 Thread Zhe Li
Hi Massimo, the only message I got from firebug is: The 'charCode' property of a keyup event should not be used. The value is meaningless. when typing in the field. Is there any other ways to debug it? Cheers, Zhe On May 6, 5:18 pm, mdipierro wrote: > To help us debug this... can you try wit