[web2py] Re: Display IS_IN_SET() label

2010-08-25 Thread jeff
Wuth SQLFORM.factory, the way to do that is to use the default arg the Field. On 25 août, 02:58, annet wrote: > In a controller I defined a form: > > form=SQLFORM.factory(Field('bedrijf',requires=IS_IN_SET([2,3,4,5,6,7],labels=['Fitnesscentrum','Fysiofitnesscentrum','Personal > Trainer','Dietist(

[web2py] Re: dashes in controller names?

2010-08-25 Thread Kevin
It would be safe for the routing code to treat hyphens as underscores when matching for app, controller, or function, though -- since web2py (and python) semantics require that the code itself uses underscores. Of course underscores in the rest of the URL would have to pass through untouched. Reve

[web2py] Web2py with barcode Reader

2010-08-25 Thread Neveen Adel
Hello, Is there a way to connect my web2py application to barcode reader and then get the data after passing barcode card into the barcode? Thanks in Advance Neveen

Re: [web2py] Web2py with barcode Reader

2010-08-25 Thread Alexey Nezhdanov
The question is not THAT clear, but I guess you can use external library to connect to barcode reader. However there is at least one problem - using the barcode reader is not a browser operation. So you will need either an ajax app that will poll the server for the presence of an active barcode or

[web2py] IS_DATETIME validator bug

2010-08-25 Thread Andrew Buchan
Hello, I'm getting an error report using Field('When_Actually_Delivered', requires = IS_NULL_OR(IS_DATETIME())), The form is created with SQLFORM, and the input in the textbox was as per format quidelines from error message, so seems to be a bug in the validator... File "C:\Program Files\Hub P

Re: [web2py] Web2py with barcode Reader

2010-08-25 Thread Michele Comitini
Is the barcode reader connected on the same machine running web2py? If yes you just need to create a function in the controller that you can call and reads the value and puts it in the session or where you need. something like this (it will be more complex depending on hw): def barcoderead:

[web2py] Re: IS_DATETIME validator bug

2010-08-25 Thread KR
maybe Field('When_Actually_Delivered','datetime', requires = IS_NULL_OR(IS_DATETIME())), On 25 août, 11:58, Andrew Buchan wrote: > Hello, > > I'm getting an error report using > > Field('When_Actually_Delivered', requires = > IS_NULL_OR(IS_DATETIME())), > > The form is created with SQLFORM, and t

Re: [web2py] Re: IS_DATETIME validator bug

2010-08-25 Thread Andrew Buchan
Yes, that somehow makes sense :-) Thanks. On Wed, Aug 25, 2010 at 11:39 AM, KR wrote: > maybe Field('When_Actually_Delivered','datetime', requires = > IS_NULL_OR(IS_DATETIME())), > > On 25 août, 11:58, Andrew Buchan wrote: > > Hello, > > > > I'm getting an error report using > > > > Field('When

[web2py] Re: auth.settings.retrieve_password_next not being honoured

2010-08-25 Thread Adi
Yup, this one works! Thanks. On Aug 23, 5:55 pm, mdipierro wrote: > One more try please: > > auth.settings.request_reset_password_next > > On Aug 23, 2:32 am, Adi wrote: > > > > > Help me please! :) > > > On Aug 20, 6:38 pm, Adi wrote: > > > > Tried both. No change. > > > > I think retrieve_pa

[web2py] Re: auto complete widget

2010-08-25 Thread Martin.Mulone
I dont know this is the reason because i never tried automplete, but in web2py_ajax.html change code like fadeIn('slow') or fadeOut('slow') to fadeIn('fast') or fadeOut('fast') On Aug 25, 3:23 am, annet wrote: > I am using web2py's auto complete widget, and wonder whether the div > containing the

[web2py] Invalid Reset Password

2010-08-25 Thread Francisco Costa
I have this function in the default controller def retrieve_password(): return dict(form=auth.retrieve_password()) and I have this view default/retrieve_password.html {{response.title=T('Retrieve Password')}} {{extend 'layout.html'}} {{app=request.application}} {{=fo

[web2py] Re: Web2Py developer needed

2010-08-25 Thread mdipierro
David, I apologize, I did not have the time to respond some of your questions. They involve plugins_tagging which I have not used in some time. I will try run some tests and respond asap. On Aug 24, 7:21 pm, "david.waldrop" wrote: > I am working on a application and very much want to continue the

[web2py] Re: Should we have a feature freeze and stability maintenance period in future?

2010-08-25 Thread mdipierro
we do use googlecode for not. Here is the current (imperfect) process: 1) people post a question about a possible bug 2) somebody checks that it is a bug, usually me 3) if the bug does not get fixed in 24h, the original poster opens a googlecode ticket 4) when the bug is fixed the ticket is closed

[web2py] Re: Web2py and threads

2010-08-25 Thread mdipierro
The model is executed at every http request, new thread or not new thread. On Aug 24, 9:36 pm, pierreth wrote: > On 24 août, 13:04, mdipierro wrote: > > > when you do "python web2py.py" you do not start the wsgi app. You > > start the rocket web server which makes a number of threads. When a > >

[web2py] Re: Pagination manual bug?

2010-08-25 Thread mdipierro
This is not a bug. the manual syntax is correct for web2py 1.83.1 and beyond. On Aug 24, 10:56 pm, dlin wrote: > As I know, at least this is manual's bug. > > In the mannual, it use > next > > But, it will raise error, I use this line instead > next > > On 8月25日, 上午1時55分, Vidul Petrov wrote: > >

[web2py] Re: Currency formating

2010-08-25 Thread mdipierro
web2py cannot support locale because it is not thread safe, If one app changes the locale it would change it for all apps. On Aug 25, 12:07 am, Bruno Rocha wrote: > Hi, > > Actually, I am using these methods to work with money formating. > > some tries with python-money and works very > wellhttp

[web2py] Re: Display IS_IN_SET() label

2010-08-25 Thread annet
Hi Jeff, Thanks for your reply. Could you please provide me with the correct syntax to solve this problem? Kind regards, Annet

[web2py] Re: jqgrid and edit-link

2010-08-25 Thread mdipierro
Are you using plugin_jqgrid. If so please use widget jqgrid from plugin_wiki. On Aug 25, 12:45 am, Johann Spies wrote: > I followed the example in the radiolog-example of using jqgrid but I > am doing something wrong I suppose. > > Given the following model > > db.define_table("teacher", >      

[web2py] Re: auto complete widget

2010-08-25 Thread annet
Hi Martin, I gave you solution a try, but it doesn't make any difference to the auto complete's behaviour. Kind regards, Annet.

[web2py] Re: represent in crud.select

2010-08-25 Thread mdipierro
fields should be fields=['friendship.id', 'friendship.to_user'], On Aug 25, 1:28 am, firedragon852 wrote: > If I do this: > db.friendship.to_user.represent = lambda id: db.auth_user[id].nickname > friends = crud.select(db.friendship, db.friendship.from_user == > auth.user.id, >                  

[web2py] Re: Display IS_IN_SET() label

2010-08-25 Thread mdipierro
form=SQLFORM.factory(Field('bedrijf',requires=IS_IN_SET([2,3,4,5,6,7],labels=['Fitnesscentrum','Fysiofitnesscentrum','Personal Trainer','Dietist(e)','Voedingsconsulent(e)','Yogaschool'],zero=None),default=3)) On Aug 25, 1:58 am, annet wrote: > In a controller I defined a form: > > form=SQLFORM.fa

[web2py] Re: auto complete widget

2010-08-25 Thread mdipierro
this is hardcoded in gluon/sqlhtml.py attr['_onblur']="jQuery('#% (div_id)s').delay(3000).fadeOut('slow');" I guess we can make it is a parameter of the widget. I would take a patch. On Aug 25, 1:23 am, annet wrote: > I am using web2py's auto complete widget, and wonder whether the div >

[web2py] Re: Invalid Reset Password

2010-08-25 Thread mdipierro
If you have auth.define_tables(migrate=False), try change it to true If you use a custom auth_user table, please post it. On Aug 25, 7:10 am, Francisco Costa wrote: > I have this function in the default controller > >     def retrieve_password(): >         return dict(form=auth.retrieve_password(

[web2py] MS SQL driver in Windows binary.

2010-08-25 Thread Seeker
Hi guys, >From what I gather the Windows binary distro only contains the MySQL and SQLite drivers and that I would have to run the source version in order to utilise other drivers. Is there any chance of including the MS SQL driver in the Windows binary as well? In my view chances are fairly goo

[web2py] Setting default groups for app

2010-08-25 Thread Antti
Hi, What's the best practice in adding default groups and permissions for apps? Should I write a script which would add groups and permissions if they do not exist? And how to trigger it? cheers, Antti

Re: [web2py] Re: dashes in controller names?

2010-08-25 Thread Jonathan Lundell
On Aug 25, 2010, at 1:42 AM, Kevin wrote: > It would be safe for the routing code to treat hyphens as underscores > when matching for app, controller, or function, though -- since web2py > (and python) semantics require that the code itself uses underscores. > Of course underscores in the rest of

[web2py] Re: MS SQL driver in Windows binary.

2010-08-25 Thread mdipierro
I have no technical objection. Does the license allows it? On Aug 25, 1:41 am, Seeker wrote: > Hi guys, > > From what I gather the Windows binary distro only contains the MySQL > and SQLite drivers and that I would have to run the source version in > order to utilise other drivers. > > Is there a

[web2py] Re: Setting default groups for app

2010-08-25 Thread mdipierro
You have two options: 1) create a scrpt and run it manually once web2py.py -S yourapp -M -N -R script.py 2) use a model like: if no group exists: create missing groups and permissions Massimo On Aug 24, 7:14 am, Antti wrote: > Hi, > > What's the best practice in adding default groups and

[web2py] Re: Invalid Reset Password

2010-08-25 Thread Francisco Costa
auth_table = db.define_table( auth.settings.table_user_name, Field('first_name', length=128, default=''), Field('last_name', length=128, default=''), Field('username', length=128, default=''), Field('email', length=128, default='', unique=True), Field('password', 'password'

Re: [web2py] Re: Currency formating

2010-08-25 Thread Bruno Rocha
Look at http://code.google.com/p/python-money/source/browse/trunk/money/Money.py Python-money does not use "locale" 2010/8/25 mdipierro > web2py cannot support locale because it is not thread safe, If one app > changes the locale it would change it for all apps. > > On Aug 25, 12:07 am, Bruno R

[web2py] Re: Invalid Reset Password

2010-08-25 Thread Francisco Costa
Just realized I was missing this field in the database table: Field('reset_password_key', length=128, default= '', writable=False, readable=False), On Aug 25, 3:10 pm, Francisco Costa wrote: > auth_table = db.define_table( >     auth.settings.table_user_name, >     Field('first_name', length=1

[web2py] Re: IS_IMAGE() broke?

2010-08-25 Thread mdipierro
can you help me debug? in gluon/validators.py class IS_IMAGE: def __call__(self,value): except: return (value, self.error_message) replace last two lines with except Exception, e: return (value, str(r)) what does the error say? On Aug

Re: [web2py] Re: Currency formating

2010-08-25 Thread Bruno Rocha
Massimo, What is your recomendation to deal with currency in web2py? 2010/8/25 Bruno Rocha > Look at > http://code.google.com/p/python-money/source/browse/trunk/money/Money.py > > Python-money does not use "locale" > > 2010/8/25 mdipierro > > web2py cannot support locale because it is not thre

[web2py] Re: auto complete widget

2010-08-25 Thread annet
Massimo, To solve the problem I changed the code in gluon/sqlhtml.py. I think making it a parameter is a good idea, at the moment I don't have the skills to provide you with a patch :-( Kind regards, Annet,

[web2py] Re: Display IS_IN_SET() label

2010-08-25 Thread annet
Massimo, I am not sure you did understand my question correctly. When in the form the user selects 'Fitnesscentre' in the drop box, the function that selects all the Fitnesscentres takes 2 as its argument. I would like the flash in the view to display something like: "Fitnesscentres in Amsterdam

[web2py] Re: IS_IMAGE() broke?

2010-08-25 Thread Joe Wakefield
The assertion errors are blank, so I added some extra output: -IS_IMAGE STARTED- filename: 1.png extension: png self.extensions: jpeg ERROR IN IS_IMAGE: -IS_IMAGE STARTED- filename: llamas.jpg extension: jpg self.extensions: jpeg __jpeg called width, height: 400, 300 new: users.ph

[web2py] Ajax Long Pooling (comet)

2010-08-25 Thread Phyo Arkar
Hello Web2py I am running the resource extensive function , which is extracting every archive , parse text out of every file under there and then inserting into database. But i want to make an ajax progressbar , by polling at specific interval. But it wont work as web2py How can i achieve this?

[web2py] Re: Web2py and threads

2010-08-25 Thread John Heenan
No, nothing that abstract. Using WSGI forces a new thread for each request. This is is a simple and inefficient brute force approach that really only suits the simplest Python applications and where only a small number of concurrent connection might be expected. Any application that provides web s

Re: [web2py] Re: IS_IMAGE() broke?

2010-08-25 Thread Jonathan Lundell
On Aug 25, 2010, at 8:11 AM, Joe Wakefield wrote: > The assertion errors are blank, so I added some extra output: > > -IS_IMAGE STARTED- > filename: 1.png > extension: png > self.extensions: jpeg > ERROR IN IS_IMAGE: > > -IS_IMAGE STARTED- > filename: llamas.jpg > extension: jpg

[web2py] Re: IS_IMAGE() broke?

2010-08-25 Thread Joe Wakefield
I'll do you one better. The problem is in "sqlhtml.py" at lines 909-917. It changes ret=False to ret=True if the field already has a value. === ret, errors: False, new ret:False === ret, errors: True, new ret:True new: users.photo.8a5327ab32003765.6c6c616d61732e6a7067.jpgold: ===

[web2py] Re: Web2py and threads

2010-08-25 Thread pierreth
I would appreciate a good reference to understand the concepts you are talking about. It is something new to me and I don't understand. On 25 août, 11:22, John Heenan wrote: > No, nothing that abstract. Using WSGI forces a new thread for each > request. This is is a simple and inefficient brute f

Re: [web2py] Re: IS_IMAGE() broke?

2010-08-25 Thread Jonathan Lundell
On Aug 25, 2010, at 8:33 AM, Joe Wakefield wrote: > I'll do you one better. The problem is in "sqlhtml.py" at lines > 909-917. It changes ret=False to ret=True if the field already has a > value. Good catch. This is a case where a comment documenting the intent of this hunk of code would come in

Re: [web2py] Re: Web2py and threads

2010-08-25 Thread Phyo Arkar
Did I Read that reading files inside controller will block web2py , Does it? Thats a bad news.. i am doing a file crawler and while crawling , web2py is blocked even tho the process talke only 25% of 1 out of 4 CPUs .. On 8/25/10, pierreth wrote: > I would appreciate a good reference to unders

[web2py] Custom Forms validation

2010-08-25 Thread Francisco Costa
Hello, I would like to know if you can have ajax validators when using custom forms. I leave here an example of a view to change password: {{form=auth.change_password(next=URL(r=request, c='default', f='login'))}} {{=T('Change Password')}} {{=form.custom.begin}}

Re: [web2py] Re: Web2py and threads

2010-08-25 Thread Jonathan Lundell
On Aug 25, 2010, at 9:00 AM, Phyo Arkar wrote: > Did I Read that reading files inside controller will block web2py , Does it? > > Thats a bad news.. i am doing a file crawler and while crawling , > web2py is blocked even tho the process talke only 25% of 1 out of 4 > CPUs .. This stuff gets a li

[web2py] Re: Web2py and threads

2010-08-25 Thread mdipierro
On Aug 25, 11:00 am, Phyo Arkar wrote: > Did I Read that reading files inside controller will block web2py , Does it? No web2py does not block. web2py only locks sessions that means one user cannot request two concurrent pages because there would be a race condition in saving sessions. Two user

Re: [web2py] Re: Web2py and threads

2010-08-25 Thread Phyo Arkar
Yes may be session was locked , thats why session.current=processing_path not working But then again , while processing files i try opening separate page , to other controller , it was waited till the first (file Crawler) page finished parsing. ok i will make a separate thread about this. On 8

[web2py] Re: Should we have a feature freeze and stability maintenance period in future?

2010-08-25 Thread mart
Good morning! You must be so busy! But from what you are saying the process is pretty much straight forward and you already have a good delivery system (downloads on web2py.com). If we expand a little on that, we may be able to settle a few issues quickly enough. 1. Michele's idea is perfect here

[web2py] Re: Setting default groups for app

2010-08-25 Thread Antti
Thanks for your answer. I'll probably go for option 2). I suppose models are run only once upon startup? -- Antti On Aug 25, 5:10 pm, mdipierro wrote: > You have two options: > 1) create a scrpt and run it manually once > > web2py.py -S yourapp -M -N -R script.py > > 2) use a model like: > > if

Re: [web2py] Re: Should we have a feature freeze and stability maintenance period in future?

2010-08-25 Thread Michele Comitini
Point 2) is nice for all of us because you (Massimo) are very quick, but how much does take off of your web2py time? Would not be better to open the ticket before testing and eventually close it as "works for me"? This way someone among the developers could take care of the ticket and test it, if

[web2py] I feel shame for asking... but I would like to resolve this

2010-08-25 Thread mart
Hi All, I was thinking that should have any problems here... but I am :(... So, I have an app that generates templates for the younger violinists. These templates are based on their violin scale length (distance between nut & bridge). It will calculate the position makers (those striped pieces of

[web2py] Re: Should we have a feature freeze and stability maintenance period in future?

2010-08-25 Thread mart
bug tracking app is available on web2py.com? I think opening a bug should be the first that happens possible to add validation code within the bug tracking as a first layer filter (is this /or hast this ever been a bug ?) or... perhaps an easy way for users for query the db.bug_history (perhaps

Re: [web2py] Re: Should we have a feature freeze and stability maintenance period in future?

2010-08-25 Thread Alexandre Andrade
Since we can se the web2py tickets as bugs (of our apps), its be nice to incorporate a management of this tickets, not only registering them. 2010/8/25 mart > bug tracking app is available on web2py.com? I think opening a bug > should be the first that happens possible to add validation co

Re: [web2py] Dropdown List with Select

2010-08-25 Thread Jean-Guy
I am not exactly sure of what you are looking for... Better if you send specific code of your model, controler and views... You can Change the ID representation that way : db.auth_membership.user_id.requires=IS_IN_DB(db,'auth_user.id','%(first_name)s %(last_name)s (%(id)s)') That generate a

[web2py] Re: Should we have a feature freeze and stability maintenance period in future?

2010-08-25 Thread mart
yes, in any bug tracking system, "work on bug" data is provided by assigned dev user (status/fix description/fix available in build X/ etc.). Mart :) On Aug 25, 1:23 pm, Alexandre Andrade wrote: > Since we can se the web2py tickets as bugs (of our apps), its be nice to > incorporate a managemen

Re: [web2py] Re: Should we have a feature freeze and stability maintenance period in future?

2010-08-25 Thread Michele Comitini
*plugin_wiki* could be used as a basis for this eventual bugtraker? 2010/8/25 mart : > yes, in any bug tracking system, "work on bug" data is provided by > assigned dev user (status/fix description/fix available in build X/ > etc.). > > Mart :) > > > On Aug 25, 1:23 pm, Alexandre Andrade > wrote

[web2py] Re: Should we have a feature freeze and stability maintenance period in future?

2010-08-25 Thread mart
What a great thing! Now we just need to define requirements... Someone should lead this to avoid problems... (N cooks in one kitchen where N should = 1) Michele is it? :) Mart :) On Aug 25, 1:52 pm, Michele Comitini wrote: > *plugin_wiki*  could be used as a basis for this eventual bugtraker? >

Re: [web2py] Re: Should we have a feature freeze and stability maintenance period in future?

2010-08-25 Thread Michele Comitini
I was thinking why not Mart?! ;-) There is no need to rush. I would wait for more feedback and Massimo ideas on this, in the midtime we can use googlecode better, while *eventually* starting a web2py centric bugtracker... 2010/8/25 mart : > What a great thing! Now we just need to define requirem

[web2py] Re: Web2py and threads

2010-08-25 Thread John Heenan
Even with file reading there is no way the disk drive, its controllers and various buses can keep up with the CPU. Hence reading any file from disk will cause the OS to intervene and block (reading a template view file, controller file or otherwise), albeit a 'short' time. Here are two choices.

[web2py] Re: Ajax Long Pooling (comet)

2010-08-25 Thread Candid
My recipe: - Run the resource extensive function in a separate process. - Use dedicated comet server for progress bar notifications. I highly recommend Orbited. On Aug 25, 11:21 am, Phyo Arkar wrote: > Hello Web2py > > I am running the resource extensive function , which is extracting > every ar

Re: [web2py] Re: dashes in controller names?

2010-08-25 Thread Michele Comitini
why not have a dictionary? controllers = {'route-me-if-you-can': any_time_you_want} if lookup misses method name is searched as it is? The admin interface could expose a way to do it easy. mic 2010/8/25 Jonathan Lundell : > On Aug 25, 2010, at 1:42 AM, Kevin wrote: > >> It would be safe for th

[web2py] Re: dashes in controller names?

2010-08-25 Thread Cory Coager
Add to the list: * Hyphens are preferred to underscores for SEO, http://www.google.com/support/webmasters/bin/answer.py?answer=76329&topic=15261 Can we make this a feature request?

[web2py] Web2Py on lighthttpd fastcgi - The definitive answer.

2010-08-25 Thread Pivert
Hi, This is for 4h30 that I'm trying to install web2py on my dedicated ubuntu server 10.04, and I'm really pissed off. What I want : Have my remote server installed with lighttpd & fastcgi to server a fresh install of web2py on port 80, with web2py in /var/www/web2py. What I did : I bought the p

[web2py] Re: Setting default groups for app

2010-08-25 Thread mdipierro
no. they are run at every request but overhead is neglibible On Aug 25, 11:55 am, Antti wrote: > Thanks for your answer. I'll probably go for option 2). I suppose > models are run only once upon startup? > > -- > Antti > > On Aug 25, 5:10 pm, mdipierro wrote: > > > You have two options: > > 1) c

Re: [web2py] Re: jqgrid and edit-link

2010-08-25 Thread Johann Spies
> Are you using plugin_jqgrid. If so please use widget jqgrid from > plugin_wiki. I don't know how to do it. All the documentation refers to that usage within wiki pages. I am not using a wiki in this case. Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man sow

[web2py] Re: Web2py and threads

2010-08-25 Thread mdipierro
call session._unlock() if you do not need session locking On Aug 25, 11:38 am, Phyo Arkar wrote: > Yes may be session was locked , thats why > session.current=processing_path not working > > But then again , while processing files i try opening separate page , > to other controller , it was wai

[web2py] Re: Web2py and threads

2010-08-25 Thread mdipierro
the time to execute a typical web2py action my server is 10-20ms. The time to open a file or write a small file is so small that is not measurable. I am not sure I believe there is any issue here or perhaps I do not understand the problem. Can you provide a test case? On Aug 25, 2:11 pm, John Heen

[web2py] Re: Web2Py on lighthttpd fastcgi - The definitive answer.

2010-08-25 Thread mdipierro
I will look into it. perhaps a typo in the book. I did not try lighttpd myself. Does this help? http://web2pyslices.com/main/slices/take_slice/57 On Aug 25, 12:46 pm, Pivert wrote: > Hi, > > This is for 4h30 that I'm trying to install web2py on my dedicated > ubuntu server 10.04, and I'm really

[web2py] Re: jqgrid and edit-link

2010-08-25 Thread mdipierro
{{=plugin_wiki.widget('jqgrid',table='tablename')}} the first argument is the widget name, the other named arguments are the widgets attributes. On Aug 25, 3:39 pm, Johann Spies wrote: > > Are you using plugin_jqgrid. If so please use widget jqgrid from > > plugin_wiki. > > I don't know how to d

Re: [web2py] Re: Web2py and threads

2010-08-25 Thread Jonathan Lundell
On Aug 25, 2010, at 1:41 PM, mdipierro wrote: > > call > > session._unlock() > > if you do not need session locking If you do that (without calling session.forget), what will happen in _try_store_on_disk when cPickle.dump(dict(self), response.session_file) is called with a None file argument?

[web2py] Re: redirection question

2010-08-25 Thread howesc
i usually hard-code where i want the form to go after accept, but it sounds like this does not work for you. what about appending a var to the url that is where to go after: http://foo.com/app/meetings/editmeeting/123?redir=app/home would that work for you? (i have not tested if the var persists

[web2py] Re: Custom Forms validation

2010-08-25 Thread howesc
I'm a little lazy here, and think you can grab what you need by looking at https://www.tenthrow.com/register/ (it's a site that i work on, so i'm ok with telling you to look at the javascript there). The page is created with a custom form (you can inspect the HTML to see the custom classes etc),

Re: [web2py] Re: Currency formating

2010-08-25 Thread Bruno Rocha
I solved using temporarily this: def Moeda(valor, formatado=True): from locale import setlocale, currency, LC_ALL try: setlocale(LC_ALL,'pt_BR.UTF-8') except: setlocale(LC_ALL,'portuguese') if formatado: return 'R$ %s' % currency(valor, grouping=True, symbo

[web2py] Re: I feel shame for asking... but I would like to resolve this

2010-08-25 Thread howesc
i don't know flex or any of that.but can you call those tools that generate the HTML from your controller, get the HTML back and return that from the controller? def get_spiffy_html(): html = my_call_to_magic_stuff_that_makes_html() return html or if you want to embed it in a layout: def

Re: [web2py] Re: jqgrid and edit-link

2010-08-25 Thread Johann Spies
On 25 August 2010 22:51, mdipierro wrote: > {{=plugin_wiki.widget('jqgrid',table='tablename')}} > > the first argument is the widget name, the other named arguments are > the widgets attributes. Thanks. My first try did not work. I will have to read up on what "the other named arguments" are s

Re: [web2py] page layout patterns

2010-08-25 Thread Jean-Guy
Nice post! J On 2010-08-25 16:34, mdipierro wrote: http://designingwebinterfaces.com/designing-web-interfaces-12-screen-patterns

Re: [web2py] Re: Web2Py on lighthttpd fastcgi - The definitive answer.

2010-08-25 Thread François Delpierre
YES ! This did it. There is just a typo about the path to web2py. After testing all parameters separately, I found that my problem was comming from the missing line : include_shell "/usr/share/lighttpd/create-mime.assign.pl" Thanks a lot ! Regards, On Wed, Aug 25, 2010 at 10:50 PM, mdipierro

[web2py] Re: Web2py and threads

2010-08-25 Thread John Heenan
Linux lost a PR war over the exact same issue that I am addressing now. The point is being aware of issues surrounding the scalability of services associated with using far more OS resources than required and at more risk. The tiny amount of time a single thread, thread A, may be blocked during a

[web2py] Re: WikiYou - Showcase

2010-08-25 Thread GoldenTiger
>>Can you explain how you tested the url mapping in development. I have >>a similar architecture and am not sure how to test the url mapping >>using localhost. Just point a DNS record to localhost : localhost.domain.com A 127.0.0.1

[web2py] Re: dashes in controller names?

2010-08-25 Thread Kevin
On Aug 25, 1:13 pm, Michele Comitini wrote: > why not have a dictionary? > > controllers = {'route-me-if-you-can': any_time_you_want} > if lookup misses method name is searched as it is? That would be a viable alternative to routes, except it's not desirable to have to hand-code routes except whe

[web2py] Re: Web2py with barcode Reader

2010-08-25 Thread Kevin
A common occurrence is for barcode readers to simply 'type' the decoded value as if it were a keyboard, if there isn't some (usually proprietary) software running that steals that input on the driver-api level. Note that this also commonly occurs with many magnetic card readers -- no special softw

Re: [web2py] Re: dashes in controller names?

2010-08-25 Thread Bruno Rocha
http://myblog.com/articles/net-neutrality-and-you http://myblog.com/ <-- Application + default controller mapped in routes.py articles/ <-- The function that retrieve articles from db net-neutrality-and-you <-- request.args(0) | the article slug where is the problem? I dont think anybody wants t

[web2py] Re: I feel shame for asking... but I would like to resolve this

2010-08-25 Thread mart
sweet! thanks :) I will give it go and let you know :) On Aug 25, 5:07 pm, howesc wrote: > i don't know flex or any of that.but can you call those tools that > generate the HTML from your controller, get the HTML back and return > that from the controller? > > def get_spiffy_html(): >   html

[web2py] Re: Trying to multiprocess

2010-08-25 Thread Kevin
Although there are many places where multiprocess'ing could be handy and efficient, unfortunately string matching is one of those things that is almost entirely I/O bound. With I/O bound tasks (particularly the kind of processing you showed in your example code), you'll be spending over 90% of you

[web2py] Re: jqgrid and edit-link

2010-08-25 Thread mdipierro
look into the plugin code modes/plugin_wiki.py On Aug 25, 4:14 pm, Johann Spies wrote: > On 25 August 2010 22:51, mdipierro wrote: > > > {{=plugin_wiki.widget('jqgrid',table='tablename')}} > > > the first argument is the widget name, the other named arguments are > > the widgets attributes. > >

[web2py] Re: Web2py and threads

2010-08-25 Thread mdipierro
The problem is only if have two http request from the same client in the same session A arrives loads session and unlocks B arrives loads session and unlocks A change session and saves it B changes session and saves it Nothing breaks but B never sees changes made by A and they are overwritten by

Re: [web2py] Re: Web2py and threads

2010-08-25 Thread Jonathan Lundell
On Aug 25, 2010, at 6:37 PM, mdipierro wrote: > > The problem is only if have two http request from the same client in > the same session Thanks for that; I was wondering under which conditions unlocking might be permissible (and I'm still not entirely clear, but never mind for now). My concern

[web2py] Re: IS_IMAGE() broke?

2010-08-25 Thread mdipierro
Please check if this is fixed in trunk and if the comment I added makes any sense. Massimo On Aug 25, 10:59 am, Jonathan Lundell wrote: > On Aug 25, 2010, at 8:33 AM, Joe Wakefield wrote: > > > I'll do you one better. The problem is in "sqlhtml.py" at lines > > 909-917. It changes ret=False to r

[web2py] Re: Web2py and threads

2010-08-25 Thread mdipierro
This is a bug. I fixed it in trunk. Thanks Jonathan. On Aug 25, 9:30 pm, Jonathan Lundell wrote: > On Aug 25, 2010, at 6:37 PM, mdipierro wrote: > > > > > The problem is only if have two http request from the same client in > > the same session > > Thanks for that; I was wondering under which con

Re: [web2py] Re: Web2py and threads

2010-08-25 Thread Jonathan Lundell
On Aug 25, 2010, at 7:56 PM, mdipierro wrote: > > This is a bug. I fixed it in trunk. Thanks Jonathan. It's fixed in the sense that it won't raise an exception. But now how is calling _unlock different from calling forget? > > On Aug 25, 9:30 pm, Jonathan Lundell wrote: >> On Aug 25, 2010, at

[web2py] SQLFORM not using newly added record

2010-08-25 Thread Richard
I have a table that references another record of the same table: db.define_table('topic', Field('name'), Field('category', requires=IS_EMPTY_OR(IS_IN_DB(db, 'topic.id', '% (name)s'))), ) I then create new records using SQLFORM: form = SQLFORM(db.topic) if form.accepts(request.vars, sess

[web2py] Re: I feel shame for asking... but I would like to resolve this

2010-08-25 Thread Richard
next thread consider setting the subject to something that describes the problem! On Aug 26, 10:59 am, mart wrote: > sweet! thanks :) I will give it go and let you know :) > > On Aug 25, 5:07 pm, howesc wrote: > > > i don't know flex or any of that.but can you call those tools that > > gene

Re: [web2py] Re: Web2py with barcode Reader

2010-08-25 Thread Thadeus Burgess
I use this already in a system that uses a magnetic card reader to scan various magnetic cards into the system using jQuery and ajax communications with the server. Alongside some python code to parse the incoming data using some regex magic to place the data into variables. So it *can* be done. T

[web2py] Will web2py support database view? When?

2010-08-25 Thread heidan
hi, Is there a way to work with database views using the DAL? I've got a bunch of views in my database that handle common queries. BUt didn't see good answers and neither find interface in DAL. Is there any plan to support database view and when? Anyway accessing view is performing better than qu

[web2py] Re: I feel shame for asking... but I would like to resolve this

2010-08-25 Thread mart
definitely On Aug 26, 12:14 am, Richard wrote: > next thread consider setting the subject to something that describes > the problem! > > On Aug 26, 10:59 am, mart wrote: > > > sweet! thanks :) I will give it go and let you know :) > > > On Aug 25, 5:07 pm, howesc wrote: > > > > i don't know fle