[web2py:33185] Re: more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-19 Thread Richard
I agree, "Please input a number between %(min)s and %(max)s" is an improvement over the current default. On Oct 20, 4:38 pm, Iceberg wrote: > > On Oct 19, 11:00 pm, Richard wrote: > > > > hello, > > > > I find the validator error "too small or too large" too general. > > > Ideally they should

[web2py:33184] Re: more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-19 Thread Richard
thanks - that is a neat work around Massimo. On Oct 20, 3:53 pm, mdipierro wrote: > True but than one would need to pass two error messages. You can pipe > two validators > > [IS_MATCH('\-?\d+',error_message='not a number'),IS_INT_IN_RANGE > (0,100)] > > On Oct 19, 11:00 pm, Richard wrote: > >

[web2py:33183] Re: Sessions lost when several servers running on diff ports

2009-10-19 Thread SergeyPo
But I am trying to use two different servers running on two different ports. Imagine accounting on port 8000 and crm on port 8002. Both on same IP address. They must work independently, from users perspective! I think it's just a question of adding port number to session identifier, currently it c

[web2py:33182] Re: Returning rows as xml results in badly formed xml

2009-10-19 Thread Adi
How does it work for a service? This is how I call the method: http://127.0.0.1:8000/videotag/default/call/xml/function/arg This doesn't render using generic.xml (I tried modifying it). Any ideas? On Oct 15, 12:51 pm, Thadeus Burgess wrote: > Doesn't the view get rendered to a generic.xml? Yo

[web2py:33181] Re: more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-19 Thread Iceberg
> On Oct 19, 11:00 pm, Richard wrote: > > > hello, > > > I find the validator error "too small or too large" too general. > > Ideally they should return "not a number" if the int/float cast fails, > > or "too big" / "too small" when out of range. > > > Would this work with the current API, or doe

[web2py:33180] Re: belongs() in GAE

2009-10-19 Thread mdipierro
OK but this is not a web2py issue. this is a GAE issue. I do not know the web2py DAL should implement anything but mapping DAL expressions into expression into the underlying database. I do not think it should hide complex manipulations to the programmer. On Oct 19, 11:09 pm, Richard wrote: > Yo

[web2py:33179] Re: more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-19 Thread mdipierro
True but than one would need to pass two error messages. You can pipe two validators [IS_MATCH('\-?\d+',error_message='not a number'),IS_INT_IN_RANGE (0,100)] On Oct 19, 11:00 pm, Richard wrote: > hello, > > I find the validator error "too small or too large" too general. > Ideally they should

[web2py:33178] Re: A simple patch to provide upload progress

2009-10-19 Thread Richard
No, nothing is uploaded. The progress bar shows NaN (divide by zero error), then the page submits but the file is not uploaded. I'll check the uploaded example - thanks for that. Richard On Oct 20, 6:32 am, mdipierro wrote: > does upload work? This assumes cache.ram is working so it would not

[web2py:33177] Re: belongs() in GAE

2009-10-19 Thread Richard
You can use: if request.env.web2py_runtime_gae: records = [db.test[id] for id in test_ids] else: records = db(db.test.id.belongs(test_ids)).select() But that's messy so I opened an issue about BELONGS support here: http://code.google.com/p/web2py/issues/detail?id=56 Turns out it's harde

[web2py:33176] more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-19 Thread Richard
hello, I find the validator error "too small or too large" too general. Ideally they should return "not a number" if the int/float cast fails, or "too big" / "too small" when out of range. Would this work with the current API, or does each validator need to have a single error message? Richard

[web2py:33175] Re: Having an issue importing to unique=True db field

2009-10-19 Thread Thadeus Burgess
But it still fails for those that don't have email. The first one gets inserted, and the rest do not. I just recreated a simple version, and it will allow me to insert multiple fields to None even if unique=True. There is something else going on with my system that is causing the problem. And it

[web2py:33174] Re: What could keep a web2py ajax call from triggering? How to debug?

2009-10-19 Thread weheh
Yes! There is joy in Mudville. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+u

[web2py:33173] Re: What could keep a web2py ajax call from triggering? How to debug?

2009-10-19 Thread weheh
Got it, thanks. I'll check out this approach. On Oct 19, 9:54 pm, mdipierro wrote: > I your example: > > >  {{=A('a link', >       _href='#', >       _id='test', >       _onclick="ajax('update_target',['test'],':eval');" % id >       ) >     )}} > > The problem is not using A. The problems are:

[web2py:33172] Re: What could keep a web2py ajax call from triggering? How to debug?

2009-10-19 Thread mdipierro
I your example: {{=A('a link', _href='#', _id='test', _onclick="ajax('update_target',['test'],':eval');" % id ) )}} The problem is not using A. The problems are: - % id but there is not %s in the string - the first argument of the ajax function is a relative path an

[web2py:33171] Re: Having an issue importing to unique=True db field

2009-10-19 Thread mdipierro
I would suggest using both. On Oct 19, 6:44 pm, Thadeus Burgess wrote: > It seems that it is failing because unique=True and there is already a Null > value inserted. > > Would you suggest using unique=True, or IS_NOT_IN_DB() ? > > -Thadeus > > On Mon, Oct 19, 2009 at 6:20 PM, mdipierro wrote:

[web2py:33170] Re: What could keep a web2py ajax call from triggering? How to debug?

2009-10-19 Thread weheh
Massimo, your example works, although I'm not sure why it does and the original script doesn't? Is it because ajax doesn't find the update_target callback function? I don't see why this would be? Anyway, I prefer doing this ajax call via the A() helper since it's embedded in a function call that

[web2py:33169] Re: Having an issue importing to unique=True db field

2009-10-19 Thread Thadeus Burgess
It seems that it is failing because unique=True and there is already a Null value inserted. Would you suggest using unique=True, or IS_NOT_IN_DB() ? -Thadeus On Mon, Oct 19, 2009 at 6:20 PM, mdipierro wrote: > > this is a database issue, not a web2py. This is why I often use > requires=IS_N

[web2py:33168] Re: Having an issue importing to unique=True db field

2009-10-19 Thread mdipierro
this is a database issue, not a web2py. This is why I often use requires=IS_NOT_EMPTY() instead of notnull=True. Massimo On Oct 19, 5:09 pm, Thadeus Burgess wrote: > Starting from a fresh sqlite database, I am attempting to import 3k+ records > from a custom csv file (not one generated by web2p

[web2py:33167] Re: Sessions lost when several servers running on diff ports

2009-10-19 Thread mdipierro
To clarify. This is not a bug. This is a feature. As long you store server side, web2py prevents the same user from opening the same session twice. There is no concurrency problems for different users. There is no problem if the same user uses two distinct sessions (by using different browsers or

[web2py:33166] Re: html-uploads

2009-10-19 Thread mdipierro
I think we may need to provide an API for thing but for now you can do: def dowload2(): r=response.download(request,db) del response.headers['Content-Disposition'] return r and call http:///download2/tmpfilename.html On Oct 19, 4:36 pm, Johann Spies wrote: > I am busy devel

[web2py:33165] Re: Having an issue importing to unique=True db field

2009-10-19 Thread Renato-ES-Brazil
Does the system not allows null values for old users? The property "notnull=False" is standard in the creation of the fields. On 19 out, 20:09, Thadeus Burgess wrote: > Starting from a fresh sqlite database, I am attempting to import 3k+ records > from a custom csv file (not one generated by we

[web2py:33164] Having an issue importing to unique=True db field

2009-10-19 Thread Thadeus Burgess
Starting from a fresh sqlite database, I am attempting to import 3k+ records from a custom csv file (not one generated by web2py) Each row, I validate the input from the file before insertion to the database. If I have incorrect input I throw an exception, basically passing the row from being inse

[web2py:33163] Re: Sessions lost when several servers running on diff ports

2009-10-19 Thread Alex Fanjul
Wow, this sounds me!! In the enterprise I'm working (by now) we have a big social network product (in a mix of perl and private language), and we in fact suffer from similar sessions problems/issues. I deed, if you have 2 applications in the same server the sessions are messed like this example

[web2py:33162] html-uploads

2009-10-19 Thread Johann Spies
I am busy developing my first web2py website for system administrators of our team. Inter alia it wil be a place where documentation can be found. When uploading documents like images and pdf's as files there is no problem. But how do you handle html-uploads in such a way that the file does no

[web2py:33161] Re: vim for the admin editor

2009-10-19 Thread mdipierro
Remember that web2py was designed as a teaching tool. Moving to VIM is not an option. But, you can configure firefox to use Vim when editing a textarea. Massimo On Oct 19, 3:30 pm, weheh wrote: > I'm a vim user who never uses the appadmin except at the onset of a > new project to check the db.

[web2py:33160] Re: What could keep a web2py ajax call from triggering? How to debug?

2009-10-19 Thread weheh
Thanks, Massimo. I'll check it out as soon as I have a few minutes. Maybe later this evening. On Oct 19, 12:20 pm, mdipierro wrote: > Please try: > > >         id='test' >       onclick="ajax('{{=URL(r=request,f='update_target')}}', > [],':eval');">a link > > On Oct 19, 2:37 am, weheh wrote: >

[web2py:33159] Re: vim for the admin editor

2009-10-19 Thread weheh
I'm a vim user who never uses the appadmin except at the onset of a new project to check the db. I never ever edit files using the appadmin editor. However, if the editor was vim and the integration was done well, I might just reconsider. Keep at it, Tim! Seems useful to me. On Oct 19, 10:42 am,

[web2py:33158] Re: belongs() in GAE

2009-10-19 Thread Robin B
The equivalent for field.belongs('A','B','C') is like field=='A'|| field=='B'||field=='C' on GAE you can do AND (&&) but not do OR (||), so it can be done using 3 separate queries and append/unique the results. On GAE you need to think in terms of what query is cheap at request time, and merging

[web2py:33157] Re: A simple patch to provide upload progress

2009-10-19 Thread mdipierro
does upload work? This assumes cache.ram is working so it would not work with CGI. Massimo On Oct 18, 8:02 pm, Richard wrote: > thanks for putting that together! > I tried it out with latest trunk but found that the returned json was > always {'length':0, 'uploaded':0} > Any ideas? I didn't cha

[web2py:33156] Re: setting autocomplete="off" in login form

2009-10-19 Thread mdipierro
I have not tried but perhaps this:

[web2py:33155] Re: A simple patch to provide upload progress

2009-10-19 Thread AndCycle
sorry, I currently don't have time to help you :X http://www.andcycle.idv.tw/~andcycle/tmp/web2py-rev1289.7z here is my trunk with example at web2py\applications\examples\controllers\upload_progress_examples.py help yourself, just tell me if this works for you On Oct 19, 9:02 am, Richard wrot

[web2py:33154] Re: setting autocomplete="off" in login form

2009-10-19 Thread Thadeus Burgess
If you are using FORM, SQLFORM, or SQLFORM.factory, you can just pass the attribute to the instance. form = SQLFORM(db.mytable, _autocomplete="off") form = SQLFORM.factory(Field(...), _autocomplete="off") form = FORM(INPUT(...), _autocomplete="off") web2py will always be backwards compatible. -T

[web2py:33153] setting autocomplete="off" in login form

2009-10-19 Thread Fred
Given the security policy where I work I've been asked to try to disable the web browser feature that saves login passwords. It looks like setting the non-standard 'autocomplete' attribute to "off" for the login FORM element can do that for many browsers. I'm trying to figure out how to do that

[web2py:33152] Re: jqgrid 3.5 and web2py

2009-10-19 Thread Yarko Tymciurak
I think he is asking for help, as it doesn't work; see here: > On Mon, Oct 19, 2009 at 12:50 PM, mdipierro wrote: > >> >> This is nice. Would you make a web2pyslice? >> >> On Oct 19, 11:25 am, zahar wrote: >> > I have created a simple controller as follows: >> > >> > > >> > >> > with the d

[web2py:33151] Re: please check trunk, dynamic routes

2009-10-19 Thread mdipierro
Perhaps there should be buttons in admin [edit routes][reload routes] Before we do that, one caveat. It is still possible that a bug in routes propagates and breaks web2py (for example if a routes_onerror is there but not the right format). We need to edit rewrite.load() and make sure everything

[web2py:33150] Re: please check trunk, dynamic routes

2009-10-19 Thread mdipierro
Would never have happened without your patch and your suggestions. Massimo On Oct 19, 12:26 pm, Álvaro Justen [Turicas] wrote: > On Sun, Oct 18, 2009 at 17:41, mdipierro wrote: > > > Alvaro has been pushing for some time for dynamic routes so they are > > now in trunk. > > > I took the occasio

[web2py:33149] another plea for help

2009-10-19 Thread mdipierro
We really need a method to pack and unpack plugins, i.e. all files in "youarpp" matching this pattern: applications/yourapp/*/plugin_[name].py applications/yourapp/*/plugin_[name]/* we need a pack_plugin and unpack_plugin added to admin.py the packed file should be web2py.plugin.[name].w2p any

[web2py:33148] Re: jqgrid 3.5 and web2py

2009-10-19 Thread mdipierro
This is nice. Would you make a web2pyslice? On Oct 19, 11:25 am, zahar wrote: > I have created a simple controller as follows: > > def index(): >    return dict() > > def display(): >     return dict() > > with the display.html  based on the jqgrid 3.5 installation and > example but > the output

[web2py:33147] Re: please check trunk, dynamic routes

2009-10-19 Thread Álvaro Justen [Turicas]
On Sun, Oct 18, 2009 at 17:41, mdipierro wrote: > > Alvaro has been pushing for some time for dynamic routes so they are > now in trunk. > > I took the occasion to re-factor some code, remove the only monkey- > patching (URL) since it was nown to case some problems. > > As a consequence, the code

[web2py:33146] jqgrid 3.5 and web2py

2009-10-19 Thread zahar
I have created a simple controller as follows: def index(): return dict() def display(): return dict() with the display.html based on the jqgrid 3.5 installation and example but the output is just a blank screen.I have installed all the necessary file of jqgrid and jquery-ui in the app

[web2py:33145] Re: error tickets on gae

2009-10-19 Thread Iceberg
On Oct19, 4:39am, mdipierro wrote: > On Oct 18, 2:58 pm, Iceberg wrote: > > > I am using web2py_src.zip 1.67.2, Sep28 edition. After uploading my > > apps, some of them work fine, some don't. Issues include: > > > 0. I can use gluon/contrib/login_methods/email_auth to authenticate > > non-gmai

[web2py:33144] Re: I'm not asking for release notes...

2009-10-19 Thread Carl
thanks for all the pointers. With my latest upgrade (from 1.65.5 to 1.67.2) I discovered that setting my auth password field to length 128 no longer worked as I need to set it to 512 (or have the default behaviour set it to). [I realised that is never was working correctly and that this update al

[web2py:33143] Re: What could keep a web2py ajax call from triggering? How to debug?

2009-10-19 Thread mdipierro
Please try: a link On Oct 19, 2:37 am, weheh wrote: > The following test routine used to work, but I rearranged a bunch of > code in other sections of my web2py program, and now it doesn't run. > Here's the routine: > > #view > >  {{=A('a link', >       _href='#', >       _id='test', >    

[web2py:33142] Re: I'm not asking for release notes...

2009-10-19 Thread mdipierro
There is a README files in the main web2py folder. I admin I do not do a good job at updating that I may miss some details. Usually the most important features are listed in there. On Oct 19, 11:09 am, Thadeus Burgess wrote: > http://wiki.web2py.com/Errata_for_web2py_2nd_Edition_Book > > -Thadeu

[web2py:33141] Re: I'm not asking for release notes...

2009-10-19 Thread Thadeus Burgess
http://wiki.web2py.com/Errata_for_web2py_2nd_Edition_Book -Thadeus On Mon, Oct 19, 2009 at 11:05 AM, Thadeus Burgess wrote: > We don't break backwards compatability. > > However, when we upgrade code, we make our best effort to change > documentation on web2py.com/AlterEgo, the wiki, and web2

[web2py:33140] Re: I'm not asking for release notes...

2009-10-19 Thread Thadeus Burgess
We don't break backwards compatability. However, when we upgrade code, we make our best effort to change documentation on web2py.com/AlterEgo, the wiki, and web2pyslices to reflect these changes. As for changes from the book (eratta), its either in AlterEgo or wiki (cant seem to find it? could so

[web2py:33139] I'm not asking for release notes...

2009-10-19 Thread Carl
hi, I'm not asking for release notes... When upgrading to a fresher version of web2py where does the group recommend looking for information about what has changed? Are there places in the source code? Specific area of a wiki? Tips gratefully received --~--~-~--~~~--

[web2py:33138] Re: can you use web2py modules in python script?

2009-10-19 Thread Sebastian Brandt
Thanks Massimo, I followed your advices but still cant get it work.After in I unzipped the library.zip I could import gluon tho. Using "web2py.py -S youapp -M -R yourscript" would be too slow I guess because I think there will be lots of calls and the performance would be really bad. I think I w

[web2py:33137] Re: vim for the admin editor

2009-10-19 Thread mdipierro
The Amy editor is already in web2py as an option (with autocompletion). You can enable it by editing admin/models/0.py. We had a trial phase and people have reported issues with it, so we never made it the default. On Oct 19, 7:56 am, Timbo wrote: > Yes, that's me.  I'm on the list in digest mod

[web2py:33136] Re: Sessions lost when several servers running on diff ports

2009-10-19 Thread Wes James
On Mon, Oct 19, 2009 at 8:26 AM, SergeyPo wrote: > > Run two different web2py applications on same machine using two > different ports (127.0.0.1:8000 and 127.0.0.1:8002). Open two browser > windows for two apps (two tabs in Safari). > Log in 1st application admin in 1st window. > Log in 2nd app

[web2py:33135] Sessions lost when several servers running on diff ports

2009-10-19 Thread SergeyPo
Run two different web2py applications on same machine using two different ports (127.0.0.1:8000 and 127.0.0.1:8002). Open two browser windows for two apps (two tabs in Safari). Log in 1st application admin in 1st window. Log in 2nd app admin in 2nd window. Try to do smth in 1st window - it will as

[web2py:33134] Re: help with new html wysiwyg

2009-10-19 Thread Timbo
Not trying to be nit-picky, but ckeditor seems to be less buggy to me. When I "maximize" OWW, it does not properly scale vertically (FF 3.5 WinXP). I'm not sure how well it would handle the URL() situation. -tim On Oct 18, 8:55 pm, mdipierro wrote: > I have replaced the nicEdit with openwysiw

[web2py:33133] Re: vim for the admin editor

2009-10-19 Thread Timbo
Yes, that's me. I'm on the list in digest mode. So I don't catch every conversation. I did contribute this Python parser to Codemirror a while ago. It is ok for most things. I haven't brought it up because I'm still trying to work through some annoyances. Maybe this is my perfectionism speak

[web2py:33132] Re: Is it possible attach any file in the web2pyslices.com?

2009-10-19 Thread Alex Fanjul
Ok Mr.Freez, I'm just using uploading for one page and it suppose to be secure ;) thanks El 19/10/2009 2:47, mr.freeze escribió: > No, I just haven't had time to consider the security ramifications of > allowing public uploads. I think web2py's upload is secure. > > Alex Fanjul wrote: > >> D

[web2py:33131] What could keep a web2py ajax call from triggering? How to debug?

2009-10-19 Thread weheh
The following test routine used to work, but I rearranged a bunch of code in other sections of my web2py program, and now it doesn't run. Here's the routine: #view {{=A('a link', _href='#', _id='test', _onclick="ajax('update_target',['test'],':eval');" % id ) )}} i

[web2py:33130] what could cause a web2py ajax call from triggering

2009-10-19 Thread weheh
I'm trying to get an ajax routine to work. The following test routine used to work, but I rearranged a bunch of code in other sections of my web2py program, and now it doesn't run. Here's the routine: #view {{=A('a link', _href='#', _id='test', _onclick="ajax('update_target',[