[web2py:31396] Re: Propose a new way to access static content!

2009-09-21 Thread Thadeus Burgess
I like the use of S = lambda filename: URL(r=request, c='static', f=filename) and then specify the static server in routes_out I can still use S for berevity, yet since routes.py is located in the web2py/ I don't have to change any lines of code when I update my app. Thanks for the suggestions.

[web2py:31397] Re: Client tools for web2py

2009-09-21 Thread mr.freeze
jQuery 1.3 has live() and die() functions that will bind an event to all current and future matching elements. I'll experiment with using this instead of binding to a single element. On Sep 21, 12:34 am, Thadeus Burgess thadeus.burg...@gmail.com wrote: I just implemented your suggestion on

[web2py:31398] Re: Propose a new way to access static content!

2009-09-21 Thread Thadeus Burgess
The regex does not work when the filename is in a folder. I am not familiar enough with regex to have it include / as well in the filename. -Thadeus On Mon, Sep 21, 2009 at 1:03 AM, Thadeus Burgess thadeus.burg...@gmail.comwrote: I like the use of S = lambda filename: URL(r=request,

[web2py:31399] Formatting Radio buttons

2009-09-21 Thread Ankit Agarwal
Hi I am using radio buttons in my SQLFORM . For querying purposes , a user may choose any one out of x number of options . I would like to format each of the options ( I mean display differently as per their importance ) . How should I go about it ? Thanks in advance

[web2py:31400] Re: Auth customization

2009-09-21 Thread Fran
On Sep 21, 5:13 am, waTR r...@devshell.org wrote: Is it possible to convert the request.vars.get(passfied, '') to the same hash form as you would get from using form() ? Yes: myhash = hmac.new(auth.settings.hmac_key, request.vars.get(passfield, ''), hashlib.md5).hexdigest() if myhash ==

[web2py:31401] Re: file descriptors leak

2009-09-21 Thread Iceberg
On Sep11, 5:13pm, zahariash karra...@gmail.com wrote: On 11 Wrz, 07:13, mdipierro mdipie...@cs.depaul.edu wrote: please check if it is fixed. I had to change your fix because it was not python 2.4 compliant. Revision 1124 works ok. It's fixed. I never saw web2py breaks in my 17 months

[web2py:31402] Re: FORM, SQLForm - what should I use?

2009-09-21 Thread mika
Thanks for your replies, they gave me some light.. I have a question to example 33 - How it is working?? :) I mean how the values from db are put into SELECT, in code there's only declaration of form, and the fields are INPUTS (not SELECT)? --~--~-~--~~~---~--~~

[web2py:31403] Re: file descriptors leak

2009-09-21 Thread mdipierro
The trunk uses a new experimental server. It still has come problems. I will revert to cherrypy for now Massimo On Sep 21, 4:16 am, Iceberg iceb...@21cn.com wrote: On Sep11, 5:13pm, zahariash karra...@gmail.com wrote: On 11 Wrz, 07:13, mdipierro mdipie...@cs.depaul.edu wrote: please

[web2py:31404] Re: [web2py:/] Re: file descriptors leak

2009-09-21 Thread Alexey Nezhdanov
You don't need the thread lock over the whole function: try: return MemcacheClient.__mc_instance else: lock() if not hasattr(MemcacheClient, '__mc_instance'): MemcacheClient.__mc_instance = _MemcacheClient(*a, **b) unlock() return MemcacheClient.__mc_instance On Sun, Sep

[web2py:31405] Re: FORM, SQLForm - what should I use?

2009-09-21 Thread carlo
mika, I do not understand your needs. If you want a first form where the machine is selected and then you want some static content be presented (information and details about that particular machine) I think you need an ajax function which returns the html content you need to show the details

[web2py:31406] Re: Propose a new way to access static content!

2009-09-21 Thread Álvaro Justen [Turicas]
On Mon, Sep 21, 2009 at 03:40, Thadeus Burgess thadeus.burg...@gmail.com wrote: The regex does not work when the filename is in a folder. I am not familiar enough with regex to have it include / as well in the filename. Just change routes_out: routes_out = (

[web2py:31407] Re: Propose a new way to access static content!

2009-09-21 Thread Thadeus Burgess
Thanks!, I knew there was a * in there somewhere! -Thadeus On Mon, Sep 21, 2009 at 8:32 AM, Álvaro Justen [Turicas] alvarojus...@gmail.com wrote: On Mon, Sep 21, 2009 at 03:40, Thadeus Burgess thadeus.burg...@gmail.com wrote: The regex does not work when the filename is in a folder.

[web2py:31408] Re: file descriptors leak

2009-09-21 Thread Paul
(I'm not sure if my previous post made it up... sorry if this is a duplicate).. I'm also encountering the too many open files issue. I have a simple application that displays 10 or so images, using the included 'download' method as the image source for the IMG tags. I can cause the too many open

[web2py:31409] Re: file descriptors leak

2009-09-21 Thread Paul
I have a very simply application that essentially displays 10 or so images using the included 'download' function as the source URL for the image tag. I am able to cause the following error by repeatedly refreshing the page (with a few seconds delay between each refresh). After 20 or so

[web2py:31410] Serving different applications on shared hosting

2009-09-21 Thread Jon Romero
I am writing a full tutorial on how to setup web2py on shared hosting accounts and I have this problem (Massimo suggested some solutions - based on routes.py but I could find a solution). I've posted the question and on the stackoverflow (http://

[web2py:31411] Re: file descriptors leak

2009-09-21 Thread Iceberg
Thanks for your attention, but the new experimental server might not be the suspect this time, because my production server is still using SVN rev1222, which is earlier than the experimental server (sneaky server) 's birth. On Sep21, 9:02pm, mdipierro mdipie...@cs.depaul.edu wrote: The trunk

[web2py:31412] Re: Auth customization

2009-09-21 Thread Jonathan Lundell
On Sep 21, 2009, at 12:02 AM, Fran wrote: On Sep 21, 5:13 am, waTR r...@devshell.org wrote: Is it possible to convert the request.vars.get(passfied, '') to the same hash form as you would get from using form() ? Yes: myhash = hmac.new(auth.settings.hmac_key, request.vars.get(passfield,

[web2py:31415] Re: Auth customization

2009-09-21 Thread waTR
@Fran: Thanks! That is exactly what I needed to see. @Jonathan: Yeah, but FORM isn't the most comfortable thing for a webdesigner to use ;) In our team we are separate...web designer doesnt know web2py and doesn't want to know it...nor should he be forced to have to learn it... All of

[web2py:31416] Re: Client tools for web2py

2009-09-21 Thread mr.freeze
I implemented the args patch but I disagree on the custom selector patch because it will remove the ability to execute arbitrary script on success. You would be limited to eval'ing the response or updating the selected element. I also added two new features: Here is the new signature of

[web2py:31417] how to use mysql polygon / geometry fields??

2009-09-21 Thread V. K
Is there way to use the DAL and interact with the mysql polygon / multipolygon fields? Or the best way is to resort to: db.executesql('')? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py-users

[web2py:31418] Re: Client tools for web2py

2009-09-21 Thread Thadeus Burgess
Awesome, I will try it with the .live() when I get home. And love the event_args, makes returning javascript that operates on that ID easier. The custom selector works like as if you pass it a helper object with XML, your code just gets the _id from the helper object. The custom selector does the

[web2py:31419] Re: Client tools for web2py

2009-09-21 Thread mr.freeze
Sorry, spaced out. Your css selector patch work fine. It's in there now. Back to the coffee shop for me... On Sep 21, 1:27 pm, mr.freeze nat...@freezable.com wrote: I implemented the args patch but I disagree on the custom selector patch because it will remove the ability to execute

[web2py:31420] Re: Auth customization

2009-09-21 Thread Jonathan Lundell
On Sep 21, 2009, at 11:22 AM, waTR wrote: @Fran: Thanks! That is exactly what I needed to see. @Jonathan: Yeah, but FORM isn't the most comfortable thing for a webdesigner to use ;) In our team we are separate...web designer doesnt know web2py and doesn't want to know it...nor should

[web2py:31421] Re: Formatting Radio buttons

2009-09-21 Thread mr.freeze
I think this is a job for jQuery. Maybe something like this: var classes = ['normal','important','no_really','urgent','critical','game_over'] jQuery(input[name='myradio']).each(function(i){ jQuery(this).addClass (classes[i]); }); On Sep 21, 1:47 am, Ankit Agarwal ankit1...@gmail.com wrote:

[web2py:31422] Web2py prosperity

2009-09-21 Thread Vidul Petrov
Hi all, Does it make any sense if I start a website like http://jobs.rubynow.com/ or http://jobs.perl.org/ (the original one actually)? Web2py allows cheap web-hosting like GAE, so we should leave the competition in the dust. Or I am wrong? Plus that Web2py is stable and full-featured MVC

[web2py:31423] Re: Formatting Radio buttons

2009-09-21 Thread mr.freeze
Actually, I guess you would want to change the class of the tr which is the grandparent: jQuery(input[name='myfield']).each(function(i){ jQuery(this).parent ().parent().addClass(classes[i]); }); Hope that helps. On Sep 21, 3:00 pm, mr.freeze nat...@freezable.com wrote: I think this is a job

[web2py:31424] Re: Serving different applications on shared hosting

2009-09-21 Thread mdipierro
PS: Does routes_in accepts domain names? I tried a little hack but didn't work yes. you can find an example on top of page 120. Works as long as as web2py finds the requested host name in the http header. --~--~-~--~~~---~--~~ You received this message

[web2py:31425] Re: file descriptors leak

2009-09-21 Thread mdipierro
I cannot reproduce this. Can you try the latest trunk and let me know if you still get before we spend time in debugging? On Sep 21, 10:02 am, Iceberg iceb...@21cn.com wrote: Thanks for your attention, but the new experimental server might not be the suspect this time, because my production

[web2py:31426] Re: crud.create(db...,next=...[id]) error

2009-09-21 Thread mdipierro
because in web2py request.args are optional I think it is dangerous to have relative URLs that do not start with '/'. web2py assumes that if a url does not start with '/' that is an extenal URL (starts with http:, ftp: etc.) On Sep 21, 11:20 am, Yarko Tymciurak yark...@gmail.com wrote: sounds

[web2py:31427] Re: Web2py prosperity

2009-09-21 Thread mdipierro
I'd love to see that. I would link it. On Sep 21, 3:18 pm, Vidul Petrov vidul.r...@gmail.com wrote: Hi all, Does it make any sense if I start a website likehttp://jobs.rubynow.com/ orhttp://jobs.perl.org/(the original one actually)? Web2py allows cheap web-hosting like GAE, so we should

[web2py:31428] Re: file descriptors leak

2009-09-21 Thread Paul
I don't know if you were referring to my problem or Iceberg's... regardless, I checked out the latest trunk (rev 1240) and tried my application again and was able to reproduce my bug (with essentially the same error trace as above). the view is essentially this: {{for img in imgs:}}

[web2py:31429] multiple-db connections with web2py vs. data warehouse

2009-09-21 Thread snfctech
The big reason I started investigating web2py was multi-db connectivity. I've got a large dashboard application I'm about to start work on that has data on MSAccess, MySQL, Pervasive, FileMaker and flat file DB engines. This all needs to come under one roof and interaction needs to be seemless

[web2py:31430] Re: file descriptors leak

2009-09-21 Thread Kuba Kucharski
@Paul I have smth like this in web2py 1.67.1,, python2.5, linux {{for image in images:}} {{=A(IMG(_height=200px, _src=URL(r=request,f='download',args=[image.file_mini])), _href=URL(r=request,f='show_image',args=[image.id]))}} {{pass}} I cannot reproduce your problem(with more than 20 pics), it

[web2py:31431] Re: multiple-db connections with web2py vs. data warehouse

2009-09-21 Thread mdipierro
At the university where I work they run many different systems including peoplesoft with oracle. Neverthess they find it convenient to have a data warehouse and I think it is a good idea. This allows other users to get access the data on a need to know bases and allows them to manage permissions.

[web2py:31432] Re: file descriptors leak

2009-09-21 Thread mdipierro
I will look into this. On Sep 21, 4:34 pm, Paul paulygr...@gmail.com wrote: I don't know if you were referring to my problem or Iceberg's... regardless, I checked out the latest trunk (rev 1240) and tried my application again and was able to reproduce my bug (with essentially the same error

[web2py:31433] Re: crud.create(db...,next=...[id]) error

2009-09-21 Thread Yarko Tymciurak
then perhaps crud.* next= [id] behavior should be reviewed? On Mon, Sep 21, 2009 at 4:08 PM, mdipierro mdipie...@cs.depaul.edu wrote: because in web2py request.args are optional I think it is dangerous to have relative URLs that do not start with '/'. web2py assumes that if a url does

[web2py:31434] Re: how to use mysql polygon / geometry fields??

2009-09-21 Thread Fran
On Sep 21, 7:47 pm, V. K veerb...@gmail.com wrote: Is there way to use the DAL and interact with the mysql polygon / multipolygon fields? Or the best way is to resort to: db.executesql('')? Nothing better yet, I'm afraid :/ Keep us posted if you do anything shareable. A SpatialDAL is of

[web2py:/] Re: Web2py is a good choice for this project?

2009-09-21 Thread mikech
Bump, does no one have an answer for this fellow? Seems like a good choice to me. On Sep 17, 7:40 am, Pha li...@pha.com.br wrote: I will start a new project with the following specifications: Server: Windows Server 2003 Web Server: IIS 6.0 Database: SQL Server 2000 It will be accessed

[web2py:31436] Re: multiple-db connections with web2py vs. data warehouse

2009-09-21 Thread snfctech
Thanks for your reply, Massimo! Out of curiosity, are they using migration scripts to create/ update the warehouse DB, or a middle-ware product like Talend or Pervasive? On Sep 21, 3:35 pm, mdipierro mdipie...@cs.depaul.edu wrote: At the university where I work they run many different systems

[web2py:31437] Setting ID of Input field

2009-09-21 Thread Arvind
Hello, I am using this in my view {{=form.custom.widget.txtUserName}} and the controller's code is form = SQLFORM.factory( Field('txtUserName',requires=IS_NOT_EMPTY())) I see that the id for this input field is automatically generated as no_table_txtUserName How can I set this

[web2py:31438] Label element in View

2009-09-21 Thread Arvind
Hello, i am writing this in my view to show a label {{=form.custom.label.name}} but how can i define this label with custom properties in the controller ? currently the output shows up as 'None'. thanks Arvind --~--~-~--~~~---~--~~ You received this message

[web2py:31439] Re: Web2py prosperity

2009-09-21 Thread Richard
hi Vidul, do you intend to use a subdomain of web2py.com (eg jobs.web2py.com), or something independant? I only remember 3 threads over the last year advertising web2py work, so I hope there is increased demand in the future. Do you think this jobs site could include something like

[web2py:31440] Re: Label element in View

2009-09-21 Thread Richard
use the labels argument of SQLFORM. Something like labels = {'name': 'Your full name:'} On Sep 22, 10:11 am, Arvind arvind.ran...@gmail.com wrote: Hello, i am writing this in my view to show a label {{=form.custom.label.name}} but how can i define this label with custom properties in the

[web2py:31441] Re: Setting ID of Input field

2009-09-21 Thread Richard
to set attributes of your form input's you could use the FORM() interface, which gives you complete flexibility over the layout. Or if you prefer the convenience of SQLFORM you could subclass a new widget (check out 7.5 in the manual). On Sep 22, 10:10 am, Arvind arvind.ran...@gmail.com wrote:

[web2py:31442] Re: Setting ID of Input field

2009-09-21 Thread Richard
about setting the ID, I'm not sure. I just manually setting the ID but it was ignored: def test(): form = SQLFORM.factory(Field('name')) if form.accepts(request.vars, session, dbio=False): db.test.insert(id=33, name=form.vars.name) return dict(form=form) On Sep 22,

[web2py:31443] Re: Setting ID of Input field

2009-09-21 Thread mr.freeze
There are a few ways but this should do it: form.custom.widget.txtUserName['_id'] = 'new_id' You should be able to set other attributes in the same way. On Sep 21, 7:10 pm, Arvind arvind.ran...@gmail.com wrote: Hello, I am using this in my view {{=form.custom.widget.txtUserName}} and the

[web2py:31444] Re: file descriptors leak

2009-09-21 Thread mdipierro
Although I cannot reproduce the problem I noticed web2py is opening more tempfiles files that it needs. I fixed this and the change should also make it faster on GET requests. In trunk now. Please check if it fixes the problem. Massimo On Sep 21, 4:34 pm, Paul paulygr...@gmail.com wrote: I

[web2py:31445] Re: pyjamas 0.6 [SOLVED]

2009-09-21 Thread Sceva
Please read all my comments first. Thanks. The embarassing thing is that the manual already showed the correct way to do it (it had a modified content attribute) and I completely overlooked it. I am trying the same example from the website - do you know if it has been updated for version

[web2py:31446] Re: crud.create(db...,next=...[id]) error

2009-09-21 Thread mdipierro
what do you propose? On Sep 21, 5:43 pm, Yarko Tymciurak yark...@gmail.com wrote: then perhaps crud.*   next= [id]  behavior should be reviewed? On Mon, Sep 21, 2009 at 4:08 PM, mdipierro mdipie...@cs.depaul.edu wrote: because in web2py request.args are optional I think it is dangerous

[web2py:31447] Re: Web2py is a good choice for this project?

2009-09-21 Thread mdipierro
oops. I missed this email. you should have no problem with sqlserver. and web2py can easily handle 30 requests/second. I am not sure how IIS works. I know some people have used with fcgi but I did not try that myself. you should have no problem in using IIS as a proxy and run web2py cherrypy

[web2py:31448] Re: multiple-db connections with web2py vs. data warehouse

2009-09-21 Thread mdipierro
I do not know. I can ask but I suspect the former. On Sep 21, 6:54 pm, snfctech tschm...@sacfoodcoop.com wrote: Thanks for your reply, Massimo! Out of curiosity, are they using migration scripts to create/ update the warehouse DB, or a middle-ware product like Talend or Pervasive? On Sep

[web2py:31449] Re: how to use mysql polygon / geometry fields??

2009-09-21 Thread V. K
Sure, I will get in touch if I decide to add something to the DAL. On Sep 21, 3:59 pm, Fran francisb...@googlemail.com wrote: On Sep 21, 7:47 pm, V. K veerb...@gmail.com wrote: Is there way to use the DAL and interact with the mysql polygon / multipolygon fields? Or the best way is to

[web2py:31450] Re: Setting ID of Input field

2009-09-21 Thread Arvind
Hello , On Sep 21, 6:34 pm, Richard richar...@gmail.com wrote: to set attributes of your form input's you could use the FORM() interface, which gives you complete flexibility over the layout. Can you give me an example of the FORM() interface along with the view ? I would like to steer

[web2py:31451] Re: Setting ID of Input field

2009-09-21 Thread Arvind
Rather i should quote myself again. can you point me a documentation which exposes all the functionality of the FORM() interface by which i can attain complete flexibility over the layout ? thanks Arvind On Sep 21, 6:34 pm, Richard richar...@gmail.com wrote: to set attributes of your form

[web2py:31452] SQLFORM factory

2009-09-21 Thread Arvind
Hello, I find that the SQLFORM factory name somewhat leads me to believe that, this is a form factory based off sql. WHy such a name for a factory which does not actually use SQL ? I need to build forms, which contains fields from different tables. The form fields will be placed on specific