Re: [web2py] Re: SQLFORM field validator

2011-03-03 Thread Manuele Pesenti
Il 03/03/2011 08:27, pbreit ha scritto: What is it doing and what are you expecting? as I said after I need that only if null the two fields has to be the same. And I want to use a form builded via SQLFORM.factory because my form is not stricly related to a db table. I hope I've been more clear

[web2py] sqlform form.accept bug? I am confused

2011-03-03 Thread sipiatti
Hi all, I am still a newbie to web2py so could be that this is my fault. I am making a warehouse stock registry app. At present I try to make a procedure where the worker can input the new received gadgets. The form have quantity field. If it is greater than 1, I need to do additional inserts to t

[web2py] Re: sqlform form.accept bug? I am confused

2011-03-03 Thread sipiatti
additional info: I keep trying to find the reasons :) I realized that after the failed submit the form gets a new hidden input with name="_formname" and value="eszkozok_create", but the old field datas are resetted to defaults. When this hidden field exists the form.accept is OK. How can I make sql

[web2py] Re: no json - cont.

2011-03-03 Thread darkblue_b
> The problem is that not everything is json and rss serializable. What > does your action look like? a controller has a function called get_companies() The companies table was chosen because it is readable as flat, for learning.. (interested in .html .json and then perhaps .csv) def get_compani

[web2py] Re: no json - cont.

2011-03-03 Thread darkblue_b
> > @jonathan: Yes, a more detailed error messages than "no json" would be > > awesome. > > generic.json now says: > > {{ > ### > # response._vars contains the dictionary returned by the controller action > ### > try: >    from gluon.serializers import json >    response.write(json(response._vars

[web2py] Re: sqlform form.accept bug? I am confused

2011-03-03 Thread sipiatti
Problem solved. form.accept didn't reached if request.vars were empty so it could not create the hidden fields. I've moved it out from the if block and everything is ok now.

Re: [web2py] Re: should this be in the scaffolding app?

2011-03-03 Thread Martín Mulone
I like the idea, we can have it like plugins-widgets (plugins). So we can choose widgets, for example if I want jgrowl instead of flash, add buttons, menu, etc. How can we load the plugins in layout, but automaticaly without coding in controllers, or in views?. Starting from a "Hello World" page.

[web2py] Re: LOAD auth.change_password form and over-ride the Redirect on success

2011-03-03 Thread Ab...
Okay, I modified my code as follows: # # Controller: ACCOUNT # def changePassword(): change_password = auth.change_password() if change_password.accepts(request.vars, session, onvalidation=validateChangePassword): response.flash = "Password

[web2py] Re: LOAD auth.change_password form and over-ride the Redirect on success

2011-03-03 Thread Ab...
Sorry, this is my def changePassword(): def changePassword(): change_password = auth.change_password() if change_password.accepts(request.vars, session, onvalidation=validateChangePassword): response.flash = "Password updated" return change_password

Re: [web2py] Re: should this be in the scaffolding app?

2011-03-03 Thread contatogilson...@gmail.com
Recommend this for plugin calendar: http://jqueryui.com/demos/datepicker/ Att, _ *Gilson Filho* *Web Developer http://gilsondev.com* 2011/3/3 Martín Mulone > I like the idea, we can have it like plugins-widget

[web2py] plugin_wiki editor automatic formatting

2011-03-03 Thread Plumo
I want to embed some JavaScript in my plugin_wiki page but when I click "Submit" the script tags are removed. The Rich Text Editor often tries to "help" like this - changing tags, adding quotes, etc. For now I am using a plain text box. Is there a way to disable this automatic formatting?

[web2py] web2py powerpoint or slide presentation

2011-03-03 Thread Martín Mulone
Sometime ago I remember there was some .ppt web2py presentation, but I couldn't find anymore. Anyone has it? -- Pablo Martín Mulone (mar...@tecnodoc.com.ar) http://www.tecnodoc.com.ar/ My blog: http://martin.tecnodoc.com.ar Expert4Solution Profile: http://www.experts4solutions.com/e4s/default/ex

[web2py] Please help me test this: plugins in wizard

2011-03-03 Thread Massimo Di Pierro
Get web2py trunk. Use the wizard. In Step 1 there is a new option at the bottom of the form that lets you choose which plugins to install (try wiki for example). Please report what works and what does not work. Massimo

Re: [web2py] Please help me test this: plugins in wizard

2011-03-03 Thread Albert Abril
I created a new app with the wizard, chose mediaplayer plugin and worked well. Gonna test more plugins. On Thu, Mar 3, 2011 at 3:58 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Get web2py trunk. > > Use the wizard. > > In Step 1 there is a new option at the bottom of the form that

Re: [web2py] web2py powerpoint or slide presentation

2011-03-03 Thread danto
here's another: http://ompldr.org/vN241Yg ftr: despite is a very old version of web2py as you already know 2011/3/3 danto > te lo envío en formato estándar. saludos. > i sent you in standard format. greetings. > > 2011/3/3 Martín Mulone > > Sometime ago I remember there was some .ppt web2py pre

Re: [web2py] web2py powerpoint or slide presentation

2011-03-03 Thread Martín Mulone
Thanks danto, 2011/3/3 danto > here's another: http://ompldr.org/vN241Yg > ftr: despite is a very old version of web2py as you already know > > 2011/3/3 danto > >> te lo envío en formato estándar. saludos. >> i sent you in standard format. greetings. >> >> 2011/3/3 Martín Mulone >> >> Sometime

[web2py] Programmatically Build Table in View

2011-03-03 Thread Ross Peoples
I have begun to move from models, modules, and controllers into actually writing the view for my application. Now, I am at the point where I need to loop through a Rows object, building a TR for each row. I wrote a version that works by writing it in HTML, using {{=x}} where needed, but it looks

Re: [web2py] Re: no json - cont.

2011-03-03 Thread Jonathan Lundell
On Mar 3, 2011, at 1:46 AM, darkblue_b wrote: > >>> >>> @jonathan: Yes, a more detailed error messages than "no json" would be >>> awesome. >> >> generic.json now says: >> >> {{ >> ### >> # response._vars contains the dictionary returned by the controller action >> ### >> try: >>from gluon

[web2py] Re: Testing accions that access the database.

2011-03-03 Thread howesc
I have been playing with this somewhat myself. if you use doctests and run them via the admin interface then request.function == '_TEST'. you can use that in db.py to set a different db connection string. if the population of this db is quick you can do it in the doctest itself, or come up wi

Re: [web2py] Please help me test this: plugins in wizard

2011-03-03 Thread Martín Mulone
I don't get it working. > Plugins 2011/3/3 Albert Abril > I created a new app with the wizard, chose mediaplayer plugin and worked > well. > Gonna test more plugins. > > > On Thu, Mar 3, 2011 at 3:58 PM, Massimo Di Pierro < > massimo.dipie...@gmail.com> wrote: > >> Get web2py trunk. >> >> Us

[web2py] Re: Programmatically Build Table in View

2011-03-03 Thread pbreit
I usually try to put less logic in my views. For one, I try to assemble all the data fields ahead of time either in the controller or with virtual fields. Then in the view, I try to just end up looping through the dict. I normally use HTML tags but using Web2py tag helpers should be fine as wel

[web2py] Re: revised plugin_wiki

2011-03-03 Thread Massimo Di Pierro
Suggestions for a better name? On Mar 2, 4:21 pm, villas wrote: > I think you may have deleted field 'active' by mistake.  If you re- > instate it, could you call it something else please  :) > > On Mar 2, 10:02 pm, villas wrote: > > > > > > > > > Thanks for the upgrade. My immediate issues are.

[web2py] Re: SocketTimeout: Socket timed out before request

2011-03-03 Thread Massimo Di Pierro
Thanks I was already in panic mode. ;-) On Mar 2, 11:27 pm, Lennon wrote: > PROBLEM SOLVED > > Stupid Mistake. > > Please close/delete thread if possible or let me know how I can > accomplish that. > > On Mar 3, 12:07 am, Lennon wrote: > > > > > > > > > Let me also add that I have: > > > num_tra

Re: [web2py] Re: Programmatically Build Table in View

2011-03-03 Thread Ross Peoples
That was a very helpful example. Thank you. So using the web2py TABLE helpers is best used for creating simple, static tables where the rows aren't generated? I guess that's ok, I always thought that the controller was meant to get the data, while the views format the data. But if the web2py way

[web2py] Re: Please help me test this: plugins in wizard

2011-03-03 Thread Massimo Di Pierro
? On Mar 3, 10:32 am, Martín Mulone wrote: > I don't get it working. > Plugins > > 2011/3/3 Albert Abril > > > > > > > > > > > I created a new app with the wizard, chose mediaplayer plugin and worked > > well. > > Gonna test more plugins. > > > On Thu, Mar 3, 2011 at 3:58 PM, Massimo Di Pier

[web2py] Re: plugin_wiki editor automatic formatting

2011-03-03 Thread Massimo Di Pierro
If you are using plugin wiki with level=2 than you can embed script: ````:template you can even use {{...}} inside ``...``. On Mar 3, 7:55 am, Plumo wrote: > I want to embed some JavaScript in my plugin_wiki page but when I click > "Submit" the script tags are removed. The Rich Text Editor

[web2py] Re: changing export_to_csv( )'s default behaviour

2011-03-03 Thread pbreit
I think you can pass in the delimiter: export_to_csv(delimiter = ',', quotechar = '"', quoting = csv.QUOTE_MINIMAL)

[web2py] Re: changing export_to_csv( )'s default behaviour

2011-03-03 Thread Massimo Di Pierro
You cannot change the default bahavior. You need to call these functions yourself in your code with the delimiter argument. You can also edit the appadmin.py in your app. On Mar 3, 10:33 am, Eduardo wrote: > Hi, > > What function in what file should I modify to change the default > behaviour of b

[web2py] Re: Please help me test this: plugins in wizard

2011-03-03 Thread Anthony
On Thursday, March 3, 2011 9:58:50 AM UTC-5, Massimo Di Pierro wrote: > > Get web2py trunk. > > Use the wizard. > > In Step 1 there is a new option at the bottom of the form that lets > you choose which plugins to install (try wiki for example). > > Please report what works and what does not w

Re: [web2py] Re: Programmatically Build Table in View

2011-03-03 Thread danto
2011/3/3 Ross Peoples > (...)But if the web2py way is to format in the controller and make the > views contain as little Python code as possible, then that's they way I'll > write it. > > is not web2py's way, is MVC (Model-View-Controller) paradigm. it's all about separating logic from what end u

[web2py] changing export_to_csv( )'s default behaviour

2011-03-03 Thread Eduardo
Hi, What function in what file should I modify to change the default behaviour of both import_from_csv( ) and export_to_csv( )? I need to make delimiter="\t" the default behaviour. I modified those functions within dal.py with no success. Thanks, Eduardo

Re: [web2py] Re: Please help me test this: plugins in wizard

2011-03-03 Thread Martín Mulone
The same as anthony 2011/3/3 Anthony > On Thursday, March 3, 2011 9:58:50 AM UTC-5, Massimo Di Pierro wrote: >> >> Get web2py trunk. >> >> Use the wizard. >> >> In Step 1 there is a new option at the bottom of the form that lets >> you choose which plugins to install (try wiki for example). >> >

[web2py] Re: web2py hangs with multiple users due to sqllite

2011-03-03 Thread Massimo Di Pierro
I do not know. I do not think it was a corrupt system but if the problem comes back let us know. On Mar 3, 1:09 am, Markus Schmitz wrote: > Hi Massimo and everybody else, > > sorry for my late reply. I was out for two days presenting a prototype > based on web2py on a conference and just came bac

Re: [web2py] Re: Programmatically Build Table in View

2011-03-03 Thread pbreit
Well, I wouldn't necessarily say that's the "web2py way". I just like to keep the logic in my views minimal. For example, the virtual fields are actually in the models which is also a good place to prepare your data. One reason to limit logic in views is if you ever have graphic designers worki

[web2py] Re: changing export_to_csv( )'s default behaviour

2011-03-03 Thread pbreit
I would think it'd at least be possible to edit the code directly if not subclass/override it? Is that a problem because other components depend on its default behavior?

Re: [web2py] Re: Programmatically Build Table in View

2011-03-03 Thread Anthony
On Thursday, March 3, 2011 11:44:41 AM UTC-5, Ross Peoples wrote: > > That was a very helpful example. Thank you. So using the web2py TABLE > helpers is best used for creating simple, static tables where the rows > aren't generated? I think you should be able to build a table programmatically

[web2py] Error in trunk opening PostgreSQL database

2011-03-03 Thread ron_m
I tested my app with version 1.92.1 and it works. I then copied it to trunk and I can no longer connect to the PostgreSQL database I use. I looked at the code in dal.py for the PostgreSQL adapter and driver_args defaults to empty dict {}, adding some debug print code shows it is set on the clas

[web2py] Re: changing export_to_csv( )'s default behaviour

2011-03-03 Thread Eduardo
Thank you all. Editing appadmin will do. I am, however, having a hard time identifying export_to_csv( ) either in views/appadmin.html or appadmin.py. While import_from_csv is clearly called from within appadmin.import_csv, I am unable to identify how export_to_csv is called there. Thanks for your

[web2py] FYI jQuery 1.5.1 breaks jQueryUI buttonsets

2011-03-03 Thread ron_m
The latest web2py trunk jQuery is 1.5.1 If using a buttonset from the jQueryUI Button widget the Javascript trips on the label tag 'for' attribute and throws an error leaving the buttonset as a set of radio boxes instead of making them into buttons. This can be seen in the jQueryUI Button Toolb

[web2py] Losing session vars

2011-03-03 Thread Joe Barnhart
My fledgling app is driving users crazy. I use the session to store a list of strings, and then use "prev" and "next" controllers to redirect to a page by indexing into that list. Ever since I enabled this feature, users randomly lose their auth and are forced to re- logon. This blows away the l

Re: [web2py] Re: Please help me test this: plugins in wizard

2011-03-03 Thread Albert Abril
I had no problem, I've run web2py from google code repository, with an updated ubuntu 10.10. On Thu, Mar 3, 2011 at 5:55 PM, Martín Mulone wrote: > The same as anthony > > 2011/3/3 Anthony > > On Thursday, March 3, 2011 9:58:50 AM UTC-5, Massimo Di Pierro wrote: >>> >>> Get web2py trunk. >>> >>>

Re: [web2py] Please help me test this: plugins in wizard

2011-03-03 Thread Bruno Rocha
I am running Ubuntu 11.04, for me if I try with just one plugin it works, when I select multiple plugins this installs just plugin_layout, other plugins are downladed to deposit but not unpacked. -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ]

[web2py] Re: Losing session vars

2011-03-03 Thread ron_m
Is eventlist constant for the application? If so put it in the model or if in a module use local_import. Then all you need in session is the current index into the array the user is at. If eventlist changes then there is no code showing how it is manipulated so it difficult to help. I would als

[web2py] [new slice] Flickr API photosets and web2py

2011-03-03 Thread Bruno Rocha
Flickr API by photoset http://web2pyslices.com/main/slices/take_slice/122 -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ]

[web2py] Slice requests

2011-03-03 Thread Bruno Rocha
Hi all, in web2pyslices.com we have a slice request page, I see many people requesting slices there, but not all have answer, this system is being modified for the web2pyslices2.0, but, if somebody here has ideas for the current slice requests. take a look at: http://web2pyslices.com/main/slices/r

Re: [web2py] Re: Programmatically Build Table in View

2011-03-03 Thread pbreit
And furthering my example, in that very same view I have another table that displays the same set of items in grid format. Note I included a counter "i" and a "modulo 4" to insert a to break it up into rows of 4 columns. Also note the logic that inserts a placeholder image if an image is not p

Re: [web2py] Re: Programmatically Build Table in View

2011-03-03 Thread pbreit
I probably could modulo the size of dict instead of using a counter but I didn't take the time to figure that out. Any assistance on that?

[web2py] Re: Losing session vars

2011-03-03 Thread Joe Barnhart
Hi Ron -- The eventlist is populated by a database query that returns the ids of a set of objects. The "prev" and "next" page flips thru the database ids one at a time and allows adding objects through the database entry. It's a little complicated. The application is a signup app for a high-sch

[web2py] Re: Flickr API photosets and web2py

2011-03-03 Thread Massimo Di Pierro
+1 can you make a plugin (just call it plugin_flikr.py) and email it to me? On Mar 3, 12:53 pm, Bruno Rocha wrote: > Flickr API by photosethttp://web2pyslices.com/main/slices/take_slice/122 > > -- > Bruno Rocha > [ About me:http://zerp.ly/rochacbruno]

[web2py] Re: Programmatically Build Table in View

2011-03-03 Thread Joe Barnhart
One thing I find handy about the helper objects is that they can be treated as lists: {{t=TABLE()}} ... {{t.append(TR(val11,val12,val13)) ... {{t.append(TR(val21,val22,val23)) ... {{=t}} <-- this is when the table is added to the response Note that you also do not need to use TD objects specific

Re: [web2py] Re: Programmatically Build Table in View

2011-03-03 Thread Ross Peoples
Thanks Joe, I was wondering about this. On Mar 3, 2011, at 2:44 PM, Joe Barnhart wrote: > One thing I find handy about the helper objects is that they can be > treated as lists: > > {{t=TABLE()}} > ... > {{t.append(TR(val11,val12,val13)) > ... > {{t.append(TR(val21,val22,val23)) > ... > {{=t}}

[web2py] Re: Error in trunk opening PostgreSQL database

2011-03-03 Thread ron_m
Additional information: I added a print to the front end of DAL.__init__ and was surprised to find driver_args was set to {'check_same_thread': False} but I did not set it in my db = DAL() class constructor call. So here is the issue. I start up the development environment on Linux with a term

Re: [web2py] Re: Flickr API photosets and web2py

2011-03-03 Thread Bruno Rocha
2011/3/3 Massimo Di Pierro > +1 can you make a plugin (just call it plugin_flikr.py) and email it > to me? > Yes! I put it in my TODO, in this slice I am using the API method photosets.getPhotos I will try to include the option to get photo by search for tags and by username. I will pack it in

[web2py] Re: Deleting a cookie

2011-03-03 Thread Lord Ezrik
Hey there, Dane. I ran in to this same problem, needing to delete a cookie. Just wanted to let you know the solution that worked for me was to ALSO set the path just as you would when you were setting the cookie. For instance: - Setting the cookie: response.cookies['test_cookie'] = 'valid' res

[web2py] Re: Programmatically Build Table in View

2011-03-03 Thread Anthony
On Thursday, March 3, 2011 10:31:18 AM UTC-5, Ross Peoples wrote: > > I know that web2py has HTML helpers like TABLE(), TR(), etc, but how would > I build a table in this way, while in a for loop? This is what I tried so > far, but it fails so horribly I don't even know where the error is: > >

[web2py] Re: revised plugin_wiki

2011-03-03 Thread villas
Well I used 'activated'. I suppose 'visible' or 'live' might also be suitable (but I didn't check those yet). On Mar 3, 4:33 pm, Massimo Di Pierro wrote: > Suggestions for a better name? > > On Mar 2, 4:21 pm, villas wrote: > > > I think you may have deleted field 'active' by mistake.  If you

[web2py] Re: revised plugin_wiki

2011-03-03 Thread villas
And of course 'is_active' matches 'is_public'... On Mar 3, 4:33 pm, Massimo Di Pierro wrote: > Suggestions for a better name? > > On Mar 2, 4:21 pm, villas wrote: > > > I think you may have deleted field 'active' by mistake.  If you re- > > instate it, could you call it something else please  :)

Re: [web2py] Re: Programmatically Build Table in View

2011-03-03 Thread Ross Peoples
After seeing all the other posts, I completely rewrote the whole thing. I grouped the data in the controller so that entries on the same day will be in the same list, making easier to put each day of entries into its own table. I have really advanced the whole thing since my original post. Here

[web2py] Re: Programmatically Build Table in View

2011-03-03 Thread pbreit
Yeah, I got kind of lost, too. The thing that threw me off were "trs[] =" and "tables[] =". The = sign is for assignment, not adding or appending. Each "trs[] =" is re-assigning the whole variable each time, overwriting anything that was already there (if I'm not mistaken). But building tables

Re: [web2py] Re: Programmatically Build Table in View

2011-03-03 Thread Ross Peoples
Yea, for some reason I thought that 'tables[] = ' would append to the list. I'm not sure which language that's from, but it doesn't matter now, as it is certainly much more readable to me. Before, the view had a hacky way of grouping the data into a table and I was confused about the meaning of

[web2py] Re: Programmatically Build Table in View

2011-03-03 Thread Anthony
On Thursday, March 3, 2011 4:19:06 PM UTC-5, pbreit wrote: > > Yeah, I got kind of lost, too. The thing that threw me off were "trs[] =" > and "tables[] =". The = sign is for assignment, not adding or appending. > Each "trs[] =" is re-assigning the whole variable each time, overwriting > anythi

[web2py] Socket Error Using FCGI;

2011-03-03 Thread David J.
Traceback (most recent call last): File "/apps/web/web2py/gluon/contrib/gateways/fcgi.py", line 664, in run self.process_input() File "/apps/web/web2py/gluon/contrib/gateways/fcgi.py", line 700, in process_input self._do_params(rec) File "/apps/web/web2py/gluon/contrib/gateways/fcg

[web2py] Re: Programmatically Build Table in View

2011-03-03 Thread Anthony
On Thursday, March 3, 2011 4:26:19 PM UTC-5, Anthony wrote: > > On Thursday, March 3, 2011 4:19:06 PM UTC-5, pbreit wrote: >> >> Yeah, I got kind of lost, too. The thing that threw me off were "trs[] =" >> and "tables[] =". The = sign is for assignment, not adding or appending. >> Each "trs[] =

[web2py] Re: Error in trunk opening PostgreSQL database

2011-03-03 Thread Massimo Di Pierro
You must be using trunk. I think this is a bug in trunk but not stable. Thanks for reporting it. Massimo On Mar 3, 2:02 pm, ron_m wrote: > Additional information: > > I added a print to the front end of DAL.__init__ and was surprised to find > driver_args was set to {'check_same_thread': False}

[web2py] Re: revised plugin_wiki

2011-03-03 Thread Massimo Di Pierro
I do not like db.table.is_active = True although I do not strongly oppose either. is this any better? db.table.enabled = True or db.table.disabled = False On Mar 3, 3:08 pm, villas wrote: > And of course 'is_active' matches 'is_public'... > > On Mar 3, 4:33 pm, Massimo Di Pierro > wrote: >

[web2py] Re: Socket Error Using FCGI;

2011-03-03 Thread Massimo Di Pierro
How often? is this occasional? reproducible? Do you find it in the logs or bothers users? On Mar 3, 3:29 pm, "David J." wrote: > Traceback (most recent call last): >    File "/apps/web/web2py/gluon/contrib/gateways/fcgi.py", line 664, in run >      self.process_input() >    File "/apps/web/web2py

Re: [web2py] Re: Socket Error Using FCGI;

2011-03-03 Thread David J.
I'll watch it; It seems like the server is hanging for bit; I see it in the console as I am running python fcgihandler.py & so I guess when that exception is thrown it writes to the console; On 3/3/11 4:42 PM, Massimo Di Pierro wrote: How often? is this occasional? reproducible? Do you fin

[web2py] Re: Losing session vars

2011-03-03 Thread ron_m
The default session timeout is 1 hour and is set in seconds by adding a line like this to a model such as db.py after auth = Auth() auth.settings.expiration = 3600 # default 1 hour but the user would have to sit idle on the app for over one hour and then click next or prev to finish a signup. I

[web2py] Re: Error in trunk opening PostgreSQL database

2011-03-03 Thread ron_m
I just downloaded the nightly build, unpacked it, copied over my application and get the same problem. I don't have a problem with 1.92.1. I don't normally use trunk but test it once in a while to see what is coming. :-) Ron

[web2py] Re: Programmatically Build Table in View

2011-03-03 Thread mart
hey, here is what I do with plugin_wiki (usually for automated reports, but here is a simplified sample): header = ['First_Name', 'Last_Name', 'Age', 'Description'] data = \ '''fred,Flintstone,32,always gets into trouble, Barney,Rubble,33,is always willing to help Fred

[web2py] Re: bug? - boolean field automatically toggles in forms when validation fails

2011-03-03 Thread Massimo Di Pierro
I cannot reproduce this. Which web2py version? Which browser? On Mar 2, 5:14 pm, Carlos wrote: > Hi, > > Boolean fields are automatically toggling in forms when validation fails. > > (model) >    db.define_table('xxx', Field('xstring',requires=IS_NOT_EMPTY()), > Field('xboolean','boolean')) > > (

[web2py] Re: Error in trunk opening PostgreSQL database

2011-03-03 Thread Massimo Di Pierro
please try change line in dal args = (self,uri,pool_size,folder,db_codec,credential_decoder,driver_args) to args = (self,uri,pool_size,folder,db_codec,credential_decoder,driver_args or {}) On Mar 3, 4:07 pm, ron_m wrote: > I just downloaded the nightly build, unpacked it, copied over my appl

[web2py] Re: Error in trunk opening PostgreSQL database

2011-03-03 Thread ron_m
Wow that fixed it. You are a Python Ninja :-) I would sure like to know what the mechanism was that caused driver_args to bleed from SQLLite to the other adapters even though it is defaulted it to an empty dict on the class initializer. I also printed driver_args as the first line of code in DA

[web2py] Re: Error in trunk opening PostgreSQL database

2011-03-03 Thread Massimo Di Pierro
class DAL: def __init__(self,...,driver_args={}) so because this is defined in a module, every time driver_args is not passed it is set to {}, the same {}. If one app changes, the default changes for all apps. It is kind of counter intuitive but it works that way. It is very dangerous to set a

[web2py] Re: FYI jQuery 1.5.1 breaks jQueryUI buttonsets

2011-03-03 Thread ron_m
I fixed the problem for my application, the label attribute for="1/8x" was somehow being interpreted as an expression, changed it to for="1_8x" and it works properly again. Wasn't a problem for jQuery 1.4.4. The odd looking string came from a relative speed designation for video playback.

[web2py] Re: plugin_wiki editor automatic formatting

2011-03-03 Thread Plumo
I am at level 2 and when I disable the Rich Text Editor and use a plain textarea it works fine. Just the Rich Text Editor is removing the script and other tags on submission.

[web2py] Re: auth.is_logged_in(), session.auth does exist, but auth.user is None

2011-03-03 Thread Carlos
Hi, Can anybody please confirm this is a bug or not?. Thanks, Carlos

[web2py] Re: Error in trunk opening PostgreSQL database

2011-03-03 Thread ron_m
Ah Ok, I was trying to reproduce with a simple program containing a couple of classes with a main all in one file but it did not exhibit the problem behaviour. So having the classes in a module is part of the recipe and lists and dicts are passed around as object references to the container leav

[web2py] Re: bug? - boolean field automatically toggles in forms when validation fails

2011-03-03 Thread Carlos
Hi Massimo, web2py's source latest stable version 1.92.1 @ win7. It happens in all browsers: ie, firefox, chrome, opera, safari. Thanks, Carlos

[web2py] Unexpected dash in URL

2011-03-03 Thread pbreit
I have a strange problem where a URL() tag is switching an underscore in the function name to a dash. Code: {{=A('contact %s' % (item.seller.name), _href=URL(c='default', f='contact_seller', args=item.id))}} sam with {{=A('contact %s' % (item.seller.name), _href=URL('default', 'contact_seller',

[web2py] Re: Unexpected dash in URL

2011-03-03 Thread pbreit
This is my routes.py: routers = dict( # base router BASE = dict( default_application = 'init', applications = 'ALL', ), # 'admin' application router admin = dict( controllers = [], # don't remove controller names from admin URLs map_hyphen =

Re: [web2py] Unexpected dash in URL

2011-03-03 Thread Jonathan Lundell
On Mar 3, 2011, at 4:13 PM, pbreit wrote: > I have a strange problem where a URL() tag is switching an underscore in the > function name to a dash. This is the default behavior for the new router: hyphens in the URL for a/c/f become underscores internally. You can turn it off if you want. BTW, y

Re: [web2py] Unexpected dash in URL

2011-03-03 Thread pbreit
Ah, ok, thanks. I figured that might be the case but it didn't cross my mind that hyphen mapping could be the default. But I guess I do prefer hyphens.

Re: [web2py] Unexpected dash in URL

2011-03-03 Thread Jonathan Lundell
On Mar 3, 2011, at 4:55 PM, pbreit wrote: > Ah, ok, thanks. I figured that might be the case but it didn't cross my mind > that hyphen mapping could be the default. But I guess I do prefer hyphens. That was my thinking. Underscores in URLs are ugly. The mapping applies only to a/c/f, since they

[web2py] Re: revised plugin_wiki

2011-03-03 Thread villas
I see what you mean, it could cause a little confusion if people think it is referring to the table. There again, you were originally happy to use 'active', so now maybe you are getting too picky :-) Maybe 'functional', 'switched_on', 'ready'. My own previous choice was 'activated' and I'm still

[web2py] Re: SQLFORM field validator

2011-03-03 Thread villas
How about making a function for 'onvalidation'. e.g. if form.accepts(request.vars,session,onvalidation=your_function) See the book. On Mar 3, 8:04 am, Manuele Pesenti wrote: > Il 03/03/2011 08:27, pbreit ha scritto:> What is it doing and what are you > expecting? > > as I said after I need tha

[web2py] Re: no json - cont.

2011-03-03 Thread darkblue_b
On Mar 3, 7:38 am, Jonathan Lundell wrote: > On Mar 3, 2011, at 1:46 AM, darkblue_b wrote: > > >>> @jonathan: Yes, a more detailed error messages than "no json" would be > >>> awesome. > > >> generic.json now says: > > >> {{ > >> ### > >> # response._vars contains the dictionary returned by th

[web2py] Re: changing export_to_csv( )'s default behaviour

2011-03-03 Thread Anthony
On Thursday, March 3, 2011 1:19:14 PM UTC-5, Eduardo wrote: > > Thank you all. Editing appadmin will do. I am, however, having a hard > time identifying export_to_csv( ) either in views/appadmin.html or > appadmin.py. While import_from_csv is clearly called from within > appadmin.import_csv, I

[web2py] Re: auth.is_logged_in(), session.auth does exist, but auth.user is None

2011-03-03 Thread Massimo Di Pierro
This is now fixed in trunk. On Mar 3, 5:49 pm, Carlos wrote: > Hi, > > Can anybody please confirm this is a bug or not?. > > Thanks, > >    Carlos

[web2py] Re: Error in trunk opening PostgreSQL database

2011-03-03 Thread Massimo Di Pierro
>>> def f(a={}): return a ... >>> x=f() >>> x[1]=1 >>> print x {1: 1} >>> y=f() >>> print y {1: 1} On Mar 3, 5:49 pm, ron_m wrote: > Ah Ok, I was trying to reproduce with a simple program containing a couple > of classes with a main all in one file but it did not exhibit the problem > behaviour.

[web2py] Re: bug? - boolean field automatically toggles in forms when validation fails

2011-03-03 Thread Massimo Di Pierro
Can you please try the latest nightly build? Try tomorrow since I will redo it tonight. On Mar 3, 5:57 pm, Carlos wrote: > Hi Massimo, > > web2py's source latest stable version 1.92.1 @ win7. > > It happens in all browsers: ie, firefox, chrome, opera, safari. > > Thanks, > >    Carlos

[web2py] attention plugin_wiki users

2011-03-03 Thread Massimo Di Pierro
A number of things have been fixed in plugin_wiki. One of them is the naming of the fields to make sure there are no conflicts with production databases. One of the changes is the field "file" was renamed "filename". If you upgrade you WILL lose data in this field. Massimo

[web2py] Re: no json - cont.

2011-03-03 Thread darkblue_b
oh - I bet it is that web2py is expecting a field called id whereas I define my own primary key 'pkey' and there is no 'id' assuming that is true, then tables with no primary key 'id' are not serializable by json, but xml works ? seems like a side effect and not intended behavior

[web2py] Re: auth.is_logged_in(), session.auth does exist, but auth.user is None

2011-03-03 Thread Carlos
thanks!

Re: [web2py] Re: no json - cont.

2011-03-03 Thread Jonathan Lundell
On Mar 3, 2011, at 8:44 PM, darkblue_b wrote: > > oh - I bet it is that web2py is expecting a field called id > whereas I define my own primary key 'pkey' and there is no 'id' > > assuming that is true, then tables with no primary key 'id' > are not serializable by json, but xml works ? > seems l

[web2py] potential memory leak???

2011-03-03 Thread VP
My app has utilized much RAM over time, so I created a simple app to replicate the problem. This is what I found out. First of all, the app: ++ Model (database is postgres): db.define_table('data', Field('body','text',requires=IS_LENGTH(262144)), Field('body1','text',requires=IS_LENGTH(2