[web2py] Re: Book v4.0 translate to spanish

2012-02-03 Thread Massimo Di Pierro
I do not know. They are in the editing phase. On Feb 3, 11:48 am, Albert Abril wrote: > Hi Massimo and Martin, > > where is planned to release the book: "web2py Application Development > Cookbook"? > (http://www.packtpub.com/web2py-application-development-recipes-to-mas... >  ) > i bought an eboo

Re: [web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread Jonathan Lundell
On Feb 3, 2012, at 4:00 PM, pbreit wrote: > Why would you ever have empty path segments? Suppose that args is a list of strings and you have some empty string.

[web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread pbreit
Why would you ever have empty path segments?

[web2py] Re: Export CSV

2012-02-03 Thread Anthony
On Friday, February 3, 2012 6:16:09 PM UTC-5, Omi Chiba wrote: > > Do I need to rewrite this "export_csv" function completely ? or Can I > just add import csv and set QUOTE_ALL ? > > > Controller > -- > def export_csv(): > import gluon.contenttype > response.he

[web2py] Re: Export CSV

2012-02-03 Thread Omi Chiba
Do I need to rewrite this "export_csv" function completely ? or Can I just add import csv and set QUOTE_ALL ? Controller -- def export_csv(): import gluon.contenttype response.headers['Content-Type'] = \ gluon.contenttype.contenttype('.csv') db = reques

[web2py] Valentina DB

2012-02-03 Thread mikech
Anyone come across this product in the wild? Seems good, and it has a report writer, which is a missing piece I've been looking for. Has no Python binding, does support SQL. http://www.valentina-db.com/

[web2py] Re: Export CSV

2012-02-03 Thread Anthony
On Friday, February 3, 2012 4:03:47 PM UTC-5, Omi Chiba wrote: > > Oh my god, it worked again!! > > >I also want to export the csv file with " " for characters. > Do you know if we can do this ? I want do quotechar='"' just like the > following link. > > > http://www.web2py.com/books/default/ch

Re: [web2py] Re: Export CSV

2012-02-03 Thread Omi Chiba
OK. Can you send me the 4th ed markmin files ? On Fri, Feb 3, 2012 at 3:03 PM, Omi Chiba wrote: > Oh my god, it worked again!! > > >I also want to export the csv file with " " for characters. > Do you know if we can do this ? I want do quotechar='"' just like the > following link. > > > http://w

[web2py] Re: Export CSV

2012-02-03 Thread Omi Chiba
Oh my god, it worked again!! >I also want to export the csv file with " " for characters. Do you know if we can do this ? I want do quotechar='"' just like the following link. http://www.web2py.com/books/default/chapter/29/6?search=csv#Data-representation On Feb 3, 2:54 pm, Anthony wrote: >

[web2py] Re: Export CSV

2012-02-03 Thread Anthony
Take your query out of quotes -- a query has to be a DAL Query object, but you have simply passed in a string. Anthony On Friday, February 3, 2012 3:31:23 PM UTC-5, Omi Chiba wrote: > > I want to export the specific table data to csv. I tried the code > after appadmin but I got a "TypeError: 's

[web2py] Re: ember.js and conflict with template {{ }} marks ...

2012-02-03 Thread Anthony
You could do this: https://groups.google.com/d/topic/web2py/4IFFE-7vq1I/discussion. The only downside is you have to call the special render() function in each controller instead of relying on web2py's default handling of the rendering. Another option is to create a special helper for your embe

[web2py] Export CSV

2012-02-03 Thread Omi Chiba
I want to export the specific table data to csv. I tried the code after appadmin but I got a "TypeError: 'str' object is not callable" error. Can you guys help ? I also want to export the csv file with " " for characters. Model -- db.define_table('IQWAGFTY', Field('TYPRCD

[web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread VP
> "they can decide to ignore empty path segments. Both IIS and Apache work > this > way"http://davescoolblog.blogspot.com/2011/11/uri-empty-path-segments-mat... If this is true, it'll be a bummer for web2py, as its default behavior differentiates empty and non-empty path segments.

[web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread VP
Im using nginx, but can someone with ngnix, apache, see if this is indeed the case? I am not sure which config files of nginx to look for these rewrite rules. /opt/nginx/conf/nginx.conf has not rewrite rules. On Feb 3, 1:46 pm, pbreit wrote: > "empty path segments are normally > ignored"http://

[web2py] ember.js and conflict with template {{ }} marks ...

2012-02-03 Thread David Marko
Hello, it was discussed earlier but with no result. I would like to use ember.js http://emberjs.com/documentation/ which uses {{}} for its template language. This conflicts with web2py template and causes errors. I there a way how to incorporate some special web2py tag, that will allow web2py

Re: [web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread Jonathan Lundell
On Feb 3, 2012, at 11:46 AM, pbreit wrote: > "they can decide to ignore empty path segments. Both IIS and Apache work this > way" > http://davescoolblog.blogspot.com/2011/11/uri-empty-path-segments-matter.html Apache might when mapping a URL to a filesystem path, but it does normally pass the U

[web2py] Re: Make all migrations explicit, and know when they are needed?

2012-02-03 Thread pbreit
Yeah, I'd like to see more explicit migrating and more visibility into what's happening. Auto migrations are great in development but scary in production.

[web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread pbreit
"empty path segments are normally ignored" http://docs.python.org/library/wsgiref.html "they can decide to ignore empty path segments. Both IIS and Apache work this way" http://davescoolblog.blogspot.com/2011/11/uri-empty-path-segments-matter.html

Re: [web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread Jonathan Lundell
On Feb 3, 2012, at 11:29 AM, VP wrote: > For some reason my nginx does not keep log, but I think it's unlikely > that nginx will remove slashes in the middle of a URL (e.g. app/con/ > func/a/b//c). Unlikely, but *somebody* is doing it. How about a uwsgi log? If you want to nail down conclusivel

[web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread pbreit
It's probably a problem at the server level since web servers generally ignore empty path segments (are they even valid?).

[web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread VP
For some reason my nginx does not keep log, but I think it's unlikely that nginx will remove slashes in the middle of a URL (e.g. app/con/ func/a/b//c).

[web2py] Make all migrations explicit, and know when they are needed?

2012-02-03 Thread nick name
I run my app with migrate=migrate_enabled=False, because when migrations _are_ needed, they are nontrivial, and the default logic is never what I want. I would like to have some "migration needed" response from the database, so that when a user of the app runs a new version of the app on an old

[web2py] Re: Import CSV

2012-02-03 Thread Omi Chiba
It works great. Thanks a lot !! On Feb 3, 11:23 am, Anthony wrote: > > Model > > - > > dba = DAL('sqlite://storage.sqlite') > > auth = Auth(dba, hmac_key=Auth.get_or_create_key()) > > > Controller > > -- > > def import_csv(table, file): > >

Re: [web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread Jonathan Lundell
On Feb 3, 2012, at 10:49 AM, VP wrote: >> Another thing that might help is to put =BEAUTIFY(request) into a template >> somewhere and compare the two when given URLs of the form you're having >> trouble with. > > > This is interesting. On the server, path_info and web2py_original_uri > got it

[web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread VP
To clarify, given URL controller/function/a/b//c, on the server, path info is: controller/function/a/b/c This is wrong. The correct is shown on my pc as controller/function/a/b//c

[web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread VP
> Another thing that might help is to put =BEAUTIFY(request) into a template > somewhere and compare the two when given URLs of the form you're having > trouble with. This is interesting. On the server, path_info and web2py_original_uri got it wrong. If say, the url is app/controller/functio

Re: [web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread Jonathan Lundell
On Feb 3, 2012, at 10:38 AM, VP wrote: > My personal pc is Mac Leopard Python 2.7.2. The parsing works as > expected on this pc. > > The server is Debian squeeze, ngnix, uwsgi, Python 2.6.6. The parsing > messed up as described above. Looking at the parametric router code, I don't see any log

[web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread VP
My personal pc is Mac Leopard Python 2.7.2. The parsing works as expected on this pc. The server is Debian squeeze, ngnix, uwsgi, Python 2.6.6. The parsing messed up as described above. On Feb 3, 12:00 pm, Jonathan Lundell wrote: > On Feb 3, 2012, at 9:46 AM, VP wrote: > > > Yes, I did rest

Re: [web2py] web2py long term projects: experiences ?

2012-02-03 Thread howesc
i don't know of any blogs that discuss the experiences of users over the long term. i suspect this group history might be an indication. heck, check my posts over the past couple of years - whenever i hit bumps in the road i tend to ask questions here. are there specific things we can help an

Re: [web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread Jonathan Lundell
On Feb 3, 2012, at 9:46 AM, VP wrote: > Yes, I did restart and incorporated your fix. It still doesn't work. > > I don't think it has to do with routes.py Curious. What are the operating systems and Python versions on the working and non-working systems? I think the most productive course righ

Re: [web2py] Re: Book v4.0 translate to spanish

2012-02-03 Thread Albert Abril
Hi Massimo and Martin, where is planned to release the book: "web2py Application Development Cookbook"? ( http://www.packtpub.com/web2py-application-development-recipes-to-master-python-web-framework-cookbook/book?utm_source=web2py.com&utm_medium=link&utm_content=pod&utm_campaign=mdb_009617 ) i b

[web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread VP
Yes, I did restart and incorporated your fix. It still doesn't work. I don't think it has to do with routes.py On Feb 3, 9:52 am, Jonathan Lundell wrote: > On Feb 3, 2012, at 7:46 AM, VP wrote: > > > Thanks. I just emailed you my routes.py. > > > But routes.py might not be the cause, because I

[web2py] Re: Import CSV

2012-02-03 Thread Anthony
> > Model > - > dba = DAL('sqlite://storage.sqlite') > auth = Auth(dba, hmac_key=Auth.get_or_create_key()) > > Controller > -- > def import_csv(table, file): > table.import_from_csv_file(file) > > def index(): > if request.va

[web2py] Re: Is the undocumented ListWidget in sqlhtml safe?

2012-02-03 Thread monotasker
Great. Thanks again. I really appreciate your help.

[web2py] Import CSV

2012-02-03 Thread Omi Chiba
I want to provide import/export CSV file from a specific table for users. All I want is just like appadmin works. I'm referencing appadmin code trying to write the code below but I get error messages. Does anyone can point out what's the problem ? Example for auth_user table. Model -

[web2py] lungo.js

2012-02-03 Thread Massimo Di Pierro
http://www.lungojs.com/

[web2py] Re: Book v4.0 translate to spanish

2012-02-03 Thread Massimo Di Pierro
We have the spanish translation. The problem is in reST not markmin. I will send it to you and you can help with conversion. ;-) Then it would be easy to post it. On Feb 3, 7:35 am, Martín Mulone wrote: > I want to start the translation to spanish of the book, 4th edition. >  What's are the way

[web2py] Re: Is the undocumented ListWidget in sqlhtml safe?

2012-02-03 Thread Anthony
If a list: field has an IS_IN_SET or IS_IN_DB validator, by default it will get the MultipleOptionsWidget -- otherwise it will get the ListWidget. By default, list:reference fields get an IS_IN_DB validator, which is why you see the MultipleOptionsWidget by default for those fields (list:intege

[web2py] Re: Form in component submits (blank) when component first loads

2012-02-03 Thread monotasker
Ah. Now I understand. Thanks a lot for explaining. Sometimes it's the basic structural things I miss!

[web2py] login next doesn't work Version 1.99.4 (2011-12-14 14:46:14) stable

2012-02-03 Thread Tito Garrido
Hi Folks, I'm using login with ldap and login_next doesn't work... from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.settings.login_methods=[ldap_auth(mode='company',server='mycompany',base_dn='ou=myou,o= mycompany.com')] auth.settings.actions_disabled=['register','change_password'

[web2py] Re: Is the undocumented ListWidget in sqlhtml safe?

2012-02-03 Thread monotasker
That's good news. I'm a bit confused, though, since it doesn't seem to be the default widget for list:reference fields, which are presented by default in a multiple select widget (or does list:reference not fall under list:?). Also, the list widget isn't included in the list of available widget

[web2py] Re: Cannot get janrain to work

2012-02-03 Thread jc
> > Glad it's working! I've been having the same exact problem you described, but > this fix didn't work for me. What are you using as your token URL? > This concept is foggy to me. It's not mentioned in the web2py book, but is > described on > thejanrainsitehttps://rpxnow.com/relying_parties/res

Re: [web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread Jonathan Lundell
On Feb 3, 2012, at 7:46 AM, VP wrote: > Thanks. I just emailed you my routes.py. > > But routes.py might not be the cause, because I have just removed it > (without using routes.py), the problem still existed. Did you restart web2py? Until you do, it won't recognize the change. I added unit tes

[web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread VP
Thanks. I just emailed you my routes.py. But routes.py might not be the cause, because I have just removed it (without using routes.py), the problem still existed. On Feb 3, 9:27 am, Jonathan Lundell wrote: > On Feb 3, 2012, at 7:20 AM, VP wrote: > > >> Is it possible that you're invoking diff

[web2py] Re: Is the undocumented ListWidget in sqlhtml safe?

2012-02-03 Thread Anthony
It is actually exposed via SQLFORM.widgets.list.widget, and it is used automatically in SQLFORMs for list: fields, so I assume it is safe to use and here to stay. Anthony On Friday, February 3, 2012 10:35:42 AM UTC-5, monotasker wrote: > > I'm continuing to work in fits and starts on my ajaxsel

[web2py] Re: Form in component submits (blank) when component first loads

2012-02-03 Thread Anthony
The form isn't submitting anything when it is first loaded. In post(), the form is created and then processed (via form.process()). When the page is first loaded (i.e., no form submission), form.process(...).accepted is false (since no data have been posted), which is why it reaches the else lo

[web2py] Is the undocumented ListWidget in sqlhtml safe?

2012-02-03 Thread monotasker
I'm continuing to work in fits and starts on my ajaxselect plugin (I'll post an update and bugfix soon, hopefully with a proper demo). In the process, I came across the ListWidget method in sqlhtml. It's quite a nice way to implement multi-reference field. But it's not documented in the 4th edi

[web2py] Re: Form in component submits (blank) when component first loads

2012-02-03 Thread monotasker
I suppose I could! But I'd like to understand the underlying issue -- why the form seems to submit blank when the component loads (hence the else condition firing).

Re: [web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread Jonathan Lundell
On Feb 3, 2012, at 7:20 AM, VP wrote: >> Is it possible that you're invoking different routers on the two systems? Or >> enabling routes on one and not the other? > > Jonathan, > > One configuration difference between the server and the personal > computer is that on the server, I use routes.

[web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread VP
> Is it possible that you're invoking different routers on the two systems? Or > enabling routes on one and not the other? Jonathan, One configuration difference between the server and the personal computer is that on the server, I use routes.py, which routes www.mysite.com and mysite.com to

Re: [web2py] URL parsing problems (request.args)

2012-02-03 Thread Jonathan Lundell
On Feb 3, 2012, at 6:55 AM, VP wrote: > We have got inconsistent behaviors of web2py on 2 different servers > (same latest version 1.99.4). > > Give this URL, app/controller/function/13/1/// > > On my personal computer, request.args is [13,1,'','']. This is what > I expected. > > On my server

[web2py] Re: URL parsing problems (request.args)

2012-02-03 Thread VP
Furthermore, on the server, this URL app/controller/function/13/1//5/ results in request.args to be ['13','1','5'], which is seriously wrong. The right answer of course should be ['13','1','','5']. Can someone help? Thanks. On Feb 3, 8:55 am, VP wrote: > We have got inconsistent behaviors of

[web2py] processing upload field.

2012-02-03 Thread VP
I have the following situation. There is a field A of type upload (image). There is another field B of type compute, which depends on A. I want to be able to process the image uploaded in field A and save it, but before the compute in field B is executed. In other words, field B will be compute

[web2py] URL parsing problems (request.args)

2012-02-03 Thread VP
We have got inconsistent behaviors of web2py on 2 different servers (same latest version 1.99.4). Give this URL, app/controller/function/13/1/// On my personal computer, request.args is [13,1,'','']. This is what I expected. On my server, request.args is [13,1]. This messes up my controller l

Re: [web2py] web2py long term projects: experiences ?

2012-02-03 Thread Bruce Wade
I am also interested in knowing this. On Fri, Feb 3, 2012 at 6:14 AM, Sebastian E. Ovide < sebastian.ov...@gmail.com> wrote: > Hi All, > > just wondering... do you know any blog/page with some long term (at least > 2 years) web2py projects experiences ? > > It could be interesting to see how thos

[web2py] web2py long term projects: experiences ?

2012-02-03 Thread Sebastian E. Ovide
Hi All, just wondering... do you know any blog/page with some long term (at least 2 years) web2py projects experiences ? It could be interesting to see how those projects have done so far in terms of testing (unit/integration), scaling, upgrades (web2py upgrade), refactoring etc thanks --

Re: [web2py] Any bored developers want to help?

2012-02-03 Thread Sebastian E. Ovide
nice ! On Thu, Feb 2, 2012 at 1:15 PM, Bruce Wade wrote: > No, used cakephp for ethicaldeal, and used pyramid for youadworld, however > for the last month I have been porting youadworld.com to web2py and the > new version is much much much better then the current live one. I will > update the de

[web2py] Re: disable when not logged in.

2012-02-03 Thread Anthony
I don't think the "disabled" attribute works with anchor tags (except in IE) (it works with buttons, but in that case, it's supposed to be disabled="disabled"). Instead, you could remove the href, add an onclick="return false;" attribute, or do something like: $('#addressbook a').click(function

[web2py] Re: Too many redirects when trying to use interactive demo

2012-02-03 Thread Wikus van de Merwe
The problem seems to be a redirection loop between this two addresses: 1) http://web2py.com/demo_admin/default/site 2) http://web2py.com/demo_admin/default/index?send=%2Fdemo_admin%2Fdefault%2Fsite Both return 303 and redirect 1 -> 2, and 2 -> 1 until the browser gives up with a message: "Firef

[web2py] Book v4.0 translate to spanish

2012-02-03 Thread Martín Mulone
I want to start the translation to spanish of the book, 4th edition. What's are the way to be syncronize with english version?. Any help?.

Re: [web2py] Re: Debugging in web2py

2012-02-03 Thread Mariano Reingart
Also, look at this new integrated online debugger for web2py: http://reingart.blogspot.com/2012/02/new-web2py-online-python-debugger.html I've finished it recently, so let me know if you try it and have any issue. if you are using apache (prefork, and to a lesser extent mpm worker) you would hav

Re: [web2py] validator for valid SQL table name

2012-02-03 Thread Manuele Pesenti
Il 03/02/2012 11:03, Bruno Rocha ha scritto: look the code in dal.py referencing check_reserved, you can copy patterns and dicts from there in to your validator. Hi Bruno, thanks for the replay... I've already tryed to look inside dal.py but it was not so clear how to translate it's behaviour

Re: [web2py] validator for valid SQL table name

2012-02-03 Thread Bruno Rocha
look the code in dal.py referencing check_reserved, you can copy patterns and dicts from there in to your validator. http://zerp.ly/rochacbruno Em 03/02/2012 06:41, "Manuele Pesenti" escreveu: > Hi! > Can you suggest me how can I write a validator for sql table names? > > I mean... I have a plug

Re: [web2py] Re: Minify (compress) response HTML

2012-02-03 Thread Michele Comitini
Massimo, About gzipping. It is not true that the webserver does the gzipping at least not every combination of frontend/backend. 1) Rocket does gzipping? 2) Apache + wsgi does gzipping? 3) + fcgi does gzipping? What I know for sure is + SCGI does gzipping: I wrote it so that uses wsgitools w

[web2py] disable when not logged in.

2012-02-03 Thread Annet
I am working on the cms part of an app. In the view I have elements: Adresboek Uw adresboek card beheren. When the user isn't logged in I want the elements to be disabled, i.e not click able and set their opacity to .50 This is what I tried: {{if not auth.is_logged_in():

[web2py] validator for valid SQL table name

2012-02-03 Thread Manuele Pesenti
Hi! Can you suggest me how can I write a validator for sql table names? I mean... I have a plugin that let me define tables and fields through the web interface saving their name and parameters in the db itself. So I have a "meta" table for the tables I want to define. I'm looking for a good v