[web2py] Re: Survey: Functionality of the Drop Boxes widget
Thadeus, it's 6 of one, half-dozen of the other to me. I use both. So in theory, it doesn't really matter which is the default. Therefore, I prefer that the default remain whatever it currently is so that I don't have to change any of my code. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: How to call other web2py applications from within a web2py application
Hi All, I used this code like below in my view to call other application as this is something simplest I could find. a {{=LOAD (url='http://127.0.0.1:8000/wiki/index.html'}} It did the job. But it overrides my selected application template and if I try to access a url in the index.html page for wiki (as written above) it then takes control of the entire page overriding my calling application. I even selected the same template for wiki but with some weird results. So ultimately I coded the wiki in my current application itself (as i need to quickly build myself a solution) Ps: I am currently struggling with CRUD and creating tables for my db applications in HTML Views. Something I want accomplished using SQLTABLES .. One suggestion, two actually - 1- Can we have a polished table rendering widget in web2py widgets for the data rendered using SQLFORM. Also I found that I need a template from creating tabs in views so I can code more complex applications using these widgets. Can anyone let me know the trick to achieve this or any helpful links. ? 2- How do I print data to a printer in web2py? any library or documentation regarding the same? Also I need to show preview in PDF format for database cursor data. Can anyone help on this? I could not find any supporting information on it. Thanks, Rahul On Mar 17, 3:47 pm, Rahul rahul.dhak...@gmail.com wrote: These links are a good resource. But I'll need to figure out if I can get it working in my current application. Thanks for your wonderful support. I'll keep you all posted if I get success. Rahul. On Mar 15, 8:19 pm, mdipierro mdipie...@cs.depaul.edu wrote: For now look at the following links that may help you: For an example of {{=LOAD(...)}} http://gluonframework.wordpress.com/2010/03/07/web2py-ajax-and-forms/ You can load an action from the same app or other apps. For ways an app can share data with another app: http://www.web2py.com/book/default/section/4/19 http://www.web2py.com/book/default/section/4/20 Hope this helps. Massimo On Mar 12, 7:26 am, Rahul rahul.dhak...@gmail.com wrote: Hi All, Massimo, I've been designing a web app using web2py. Web2py is really a very well designed framework. I am considering it along with Django for a medium sized web app development. How ever I would like to know, if I can code more applications for a single complex site (as we can do in Django) and link it to one single application.I am not using CAS as I have created my own authentication system. Here's an example to make it clear of what I want- *my site* |__ site pages along with main page |__ link to app1 ( a blog that is a separate web2py app) |__ link to a app2 (chat client) ( again a separate web2py app) |__ link to my database triggered app3 (again a separate web2py app) In short how do I modularise my web2py project to combine different applications into my original site web2py project. From the web I've seen a post from Yarko that mentions this {{=LOAD(...,application=' otherapp')}} but technically I could not find any documentation either in your online book or site. Can you please provide methods of how this is achievable without sacrificing simplicity. I have also heard about plugins but not really sure what they are and should I be really using those. Please suggest. Sincerely, Rahul D (India) -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Survey: Functionality of the Drop Boxes widget
weheh, Massimo, The issue is the same for me, I have several web2py applications, each commanding over 20 forms which make use of IS_IN_SET. I am dealing with a sizable number of forms that I need to update just to fix this. The fact is that web2py changed the output of how drop boxes are rendered, and in turn it has broken my forms that relied on the first element being selected. Aside from the time to alter my forms, this is an issue of promise, and principle that separate web2py from other python frameworks. To take a few quotes and give my interpretations of them. Another feature of web2py, is that we, its developers, commit to maintain backward compatibility in future versions. We have done so since the first release of web2py in October, 2007. New features have been added and bugs have been fixed, but if a program worked with web2py 1.0, that program will still work today. - Massimo Di Pierro, Web2py Book, Chapter 1, Introduction This is the kicker, my programs no longer work as intentionally designed. Perhaps you should re-word this as will still compile/execute/not crash instead of work. web2py has never broken backwards compatibility, and it will not break compatibility when additional functionality is added in the future. - Massimo Di Pierro, Web2py Book, Chapter 1.4, Why Web2py The definition of compatibility is very loosely defined. This quote is in response to the one made that web2py never controlled this before, now it is. Regardless of if web2py controlled something previously or not, it cannot change the compatibility with older versions. Given the scope of the web2py applications that I develop, and the sheer principle of the matter, do you understand where I am coming from? I seem to be left with the following options A) Update my 100+ forms and set zero=None. I view this as a complete waste of my time, either manually or working a search/replace and then re-testing all of my forms. B) Use a patched version of web2py that does what I want, zero=None. This is not a desired option since keeping up with updates gets quite complex when branching the codebase (DVCS or not). A continuous waste of my time. C) Re-define IS_IN_SET in one of my models, however since web2py now assumes* requires, I need to make sure and define this for my foreign key relationships, since sql.py uses the imported version of IS_IN_SET instead of the global version. * I could also make the same argument for this as it did change the functionality of forms that used to render as text boxes but now render as select since they are FK relationships. -Thadeus On Tue, Mar 23, 2010 at 1:29 AM, weheh richard_gor...@verizon.net wrote: Thadeus, it's 6 of one, half-dozen of the other to me. I use both. So in theory, it doesn't really matter which is the default. Therefore, I prefer that the default remain whatever it currently is so that I don't have to change any of my code. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Survey: Functionality of the Drop Boxes widget
Thadeus - I initially commiserated with you: backward compatipility is backward compatibility --- but I alwasy thought Massimo held on to that phrase too strongly, too tightly. It's important for the big things, but it _always_ gets in the way of meaningful, useful change... I think perhaps Massimo's bordering on being dogmatic about backward compatibiliy may have an affect on how people react to this. But Jonathan gives an important insight: I always specify zero=... Even as zero=... didn't exist before, it's easy enough to do globeal search and modify to put it in - it's _really_ not a big deal; it's one of those things where dogmatically holding to the compatability principle is more trouble than adapting to this change. If it was happening all the time, often... this would be annoying; but occasionally, it is more than tolerable - it can even be a good thing, in the big scheme of things. You are, of course, free to see it in whatever way you happen to see it. I'm just offering a summary of a counterpoint for consideration. Kind regards, Yarko On Mar 23, 2:22 am, Thadeus Burgess thade...@thadeusb.com wrote: weheh, Massimo, The issue is the same for me, I have several web2py applications, each commanding over 20 forms which make use of IS_IN_SET. I am dealing with a sizable number of forms that I need to update just to fix this. The fact is that web2py changed the output of how drop boxes are rendered, and in turn it has broken my forms that relied on the first element being selected. Aside from the time to alter my forms, this is an issue of promise, and principle that separate web2py from other python frameworks. To take a few quotes and give my interpretations of them. Another feature of web2py, is that we, its developers, commit to maintain backward compatibility in future versions. We have done so since the first release of web2py in October, 2007. New features have been added and bugs have been fixed, but if a program worked with web2py 1.0, that program will still work today. - Massimo Di Pierro, Web2py Book, Chapter 1, Introduction This is the kicker, my programs no longer work as intentionally designed. Perhaps you should re-word this as will still compile/execute/not crash instead of work. web2py has never broken backwards compatibility, and it will not break compatibility when additional functionality is added in the future. - Massimo Di Pierro, Web2py Book, Chapter 1.4, Why Web2py The definition of compatibility is very loosely defined. This quote is in response to the one made that web2py never controlled this before, now it is. Regardless of if web2py controlled something previously or not, it cannot change the compatibility with older versions. Given the scope of the web2py applications that I develop, and the sheer principle of the matter, do you understand where I am coming from? I seem to be left with the following options A) Update my 100+ forms and set zero=None. I view this as a complete waste of my time, either manually or working a search/replace and then re-testing all of my forms. B) Use a patched version of web2py that does what I want, zero=None. This is not a desired option since keeping up with updates gets quite complex when branching the codebase (DVCS or not). A continuous waste of my time. C) Re-define IS_IN_SET in one of my models, however since web2py now assumes* requires, I need to make sure and define this for my foreign key relationships, since sql.py uses the imported version of IS_IN_SET instead of the global version. * I could also make the same argument for this as it did change the functionality of forms that used to render as text boxes but now render as select since they are FK relationships. -Thadeus On Tue, Mar 23, 2010 at 1:29 AM, weheh richard_gor...@verizon.net wrote: Thadeus, it's 6 of one, half-dozen of the other to me. I use both. So in theory, it doesn't really matter which is the default. Therefore, I prefer that the default remain whatever it currently is so that I don't have to change any of my code. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] href not being rendered
In a send_mail.html view I have a link which reads like: pHaving trouble viewing this email? a href={{=URL(r=request,c='clublocatormail',f='browser_version',args=[item.bedrijf])}} target=_blankView it in your browser/a/p When I send the mail and open it this link reads like: pHaving trouble viewing this email? aView it in your browser/a/ p Does one of you know why the href isn't being rendered? Kind regards, Annet. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Debian / Ubuntu packager needed!
On Mar 23, 1:15 am, mdipierro mdipie...@cs.depaul.edu wrote: The main feature of web2py is that appliances are data and are treated as such. Consider a CMS app that wants to install, for example, a plugin. A plugin contains code and needs to be installable at runtime. The plugin may also modify other application files (such as replace a layout or a model). I'm afraid this approach is incompatible with production packaging. In Debian, plugins are installed via the same packaging mechanism as the applications. Take a look at trac, for example - there are several debian packages containing trac-related plugins. I would not oppose to an external mechanism to locks/unlock *.py and *.html files for a certain app so that they cannot be modified by the www-data user while in production I'm glad we agree on that. but one cannot break the internal directory structure of the apps without crippling it. All right, we could try using the same symlink approach Mark mentioned earlier. How about this: a package containing the examples application is installed in /usr/share/web2py/applications/examples. Underneath there are several real directories (views, controllers, etc) populated with read-only files, but there are also a few symlinks like this: sessions - /var/run/web2py/applications/examples/sessions databases - /var/run/web2py/applications/examples/databases Do you think this breaks the internal structure of web2py? Regards, Dima. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Debian / Ubuntu packager needed!
I'll see both problems and another solution to work around this. We could install web2py into /usr/ directories with apt. Then create a startup script that makes a copy of web2py and the web2py applications that are installed trough apt to the /var folder. A so called runtime version of web2py. We could let the script also take care of different users/password/ applications. Then i've one minnor question. Shall we keep the development versions of under var. Not best location, because var may get destroyed with an exception for /var/spool So Dima, do you know a place where we could put the applications imported through web2py mechanisme? regards Mark On Mar 23, 12:38 am, Dima Barsky d...@debian.org wrote: Where would you put php files? I have seen them in /var/www/ Massimo, I'm sorry to disappoint you, but any script you might've seen in /var/ www was not underDebianpackage control, it was installed there manually by the administrator. All php files are also installed under / usr. If you try to create a package with script in /var most likely it will not be accepted intoDebianfor the reasons I mentioned earlier. I don't see any other way to make a clean package rather than put the code and the runtime data into different directories. I still don't understand, what's wrong with a config file for each application? This file would say whether the application is editable, and where it's runtime files should be located. It the absense of config file, it will default to the current layout, so the backward compatibility is preserved. Regards, Dima. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Can't use placeholders when calling stored procedure in DB2
Problem: (Pdb) print db2db.executesql(call webxdsl.abonsearch (123, 'port_id', '41110', '1', ?, ?);) *** Error: ('07001', '[07001] [IBM][CLI Driver] CLI0100E Wrong number of parameters. SQLSTATE=07001 (-9) (SQLExecDirectW)') (Pdb) print db2db._execute(call webxdsl.abonsearch (?),(1,2)) *** TypeError: lambda() takes exactly 1 argument (2 given) Solution --- sql.old.py 2010-01-18 17:00:36.0 +0300 +++ sql.py 2010-03-23 12:08:51.374244734 +0300 @@ -1072,7 +1072,7 @@ self._dbname, cnxn = self._uri.split(':', 1) self._pool_connection(lambda : pyodbc.connect(cnxn)) self._cursor = self._connection.cursor() -self._execute = lambda a: self._cursor.execute(a[:-1]) +self._execute = lambda a, b=(): self._cursor.execute(a[:-1],b) elif is_jdbc and self._uri[:9] == 'sqlite://': self._dbname='sqlite' if uri[9] != '/': Result: (Pdb) print db2db.executesql(call webxdsl.abonsearch (123, 'port_id', '41110', '1', ?, ?);,(1,2)) rows follow -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] get value of an combo box (select tag)
Hi all, anyone show me how to I get selected value of combo box ?? thank you very much -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Survey: Functionality of the Drop Boxes widget
It is not so trivial to search and replace. For one, you cannot place keyword arguments before non-keyword args. So it is not a simple matter of find/replace IS_IN_SET(... with IS_IN_SET(zero=None..., there will have to be parsing of the syntax to determine where to place zero=. I am perfectly capable of making the changes, and most likely will. Other frameworks, have version upgrades that happen once a month at the very least frequency, with migration guides, change logs, and previous version supported bug fixes. Web2py cannot do this, for one the development cycle is more along the lines of hours/days instead of months, there are no migration logs, there are no change logs, there is no point of reference for upgrading version to version. As I have asked before, if Massimo would place an operational definition of backwards compatibility in the context of web2py, otherwise it is open to interpretation, and will be judged as those interpretations are assumed. If you are going to set a standard and a promise, you either define the parameters of that standard, or uphold it to the highest and most rigid interpretations. Here we realize the reason for religious debate and war, the absence of scientific definitions that allow individuals from all walks of life to understand from the same perspective and context. My interpretation is of not having to change a line of code to upgrade my application and have it look _exactly_ the same after the upgrade. The majority of use cases is 50/50 and depends on the context of the form. Even for me, the use cases differ from hobby applications to professional applications. -Thadeus On Tue, Mar 23, 2010 at 2:54 AM, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: Thadeus - I initially commiserated with you: backward compatipility is backward compatibility --- but I alwasy thought Massimo held on to that phrase too strongly, too tightly. It's important for the big things, but it _always_ gets in the way of meaningful, useful change... I think perhaps Massimo's bordering on being dogmatic about backward compatibiliy may have an affect on how people react to this. But Jonathan gives an important insight: I always specify zero=... Even as zero=... didn't exist before, it's easy enough to do globeal search and modify to put it in - it's _really_ not a big deal; it's one of those things where dogmatically holding to the compatability principle is more trouble than adapting to this change. If it was happening all the time, often... this would be annoying; but occasionally, it is more than tolerable - it can even be a good thing, in the big scheme of things. You are, of course, free to see it in whatever way you happen to see it. I'm just offering a summary of a counterpoint for consideration. Kind regards, Yarko On Mar 23, 2:22 am, Thadeus Burgess thade...@thadeusb.com wrote: weheh, Massimo, The issue is the same for me, I have several web2py applications, each commanding over 20 forms which make use of IS_IN_SET. I am dealing with a sizable number of forms that I need to update just to fix this. The fact is that web2py changed the output of how drop boxes are rendered, and in turn it has broken my forms that relied on the first element being selected. Aside from the time to alter my forms, this is an issue of promise, and principle that separate web2py from other python frameworks. To take a few quotes and give my interpretations of them. Another feature of web2py, is that we, its developers, commit to maintain backward compatibility in future versions. We have done so since the first release of web2py in October, 2007. New features have been added and bugs have been fixed, but if a program worked with web2py 1.0, that program will still work today. - Massimo Di Pierro, Web2py Book, Chapter 1, Introduction This is the kicker, my programs no longer work as intentionally designed. Perhaps you should re-word this as will still compile/execute/not crash instead of work. web2py has never broken backwards compatibility, and it will not break compatibility when additional functionality is added in the future. - Massimo Di Pierro, Web2py Book, Chapter 1.4, Why Web2py The definition of compatibility is very loosely defined. This quote is in response to the one made that web2py never controlled this before, now it is. Regardless of if web2py controlled something previously or not, it cannot change the compatibility with older versions. Given the scope of the web2py applications that I develop, and the sheer principle of the matter, do you understand where I am coming from? I seem to be left with the following options A) Update my 100+ forms and set zero=None. I view this as a complete waste of my time, either manually or working a search/replace and then re-testing all of my forms. B) Use a patched version of web2py that does what I want, zero=None. This is not a desired option since keeping
[web2py] Re: is there a way to communicate with Web2Py from an external program?
thank you. I understand that I have to publish a service that can send and receive calls from clients what do I need to look for on the client side? meaning, what ability 3dsMax should have in order to use this service? On 22 מרץ, 21:28, mdipierro mdipie...@cs.depaul.edu wrote: Perhaps you can use XMLRPC described here:http://www.web2py.com/book/default/section/9/2 Perhaps other users have other/better solutions. On Mar 22, 2:02 pm, canna c.ne...@gmail.com wrote: Hello everybody! I making my first steps inWeb2Py, and although I'm not at this stage yet, I will eventually have to deal with this issue, and wanted to be prepared as a vfx studio we keep information on every 3D model that is created in 3D program (time spent working on it, it's status etc.) up until now we wrote this information (using scripts) to INI files, now we'll have to write to MySQL server. there is a way to send SQL queries from 3dsMax with .NET but then it's bypassweb2pyserver and doesn't benefit from it's useful model structure. is there a way for 3dsMax to send and receive information fromweb2py server without bumping into security issues? thanks to all the helpers!-הסתר טקסט מצוטט- -הראה טקסט מצוטט- -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Mercurial or Bazaar?
hi all, I have seen there are two web2pty repositories: one based on mercurial and one based on bazaar. Which is the official one? By the way, I have tried both revision control system... I am sticking on mercurial because it seems more popular. I got a very bad feeling with subversion, and I give it up in favor of the distributed version control mantra; what are your... preferences? :) -- Team Leader Gioorgi.com Chief Editor -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Debian / Ubuntu packager needed!
On Tue, 23 Mar 2010 02:06:16 -0700 (PDT), Mark Breedveld m.breedv...@solcon.nl wrote: I'll see both problems and another solution to work around this. We could install web2py into /usr/ directories with apt. Then create a startup script that makes a copy of web2py and the web2py applications that are installed trough apt to the /var folder. A so called runtime version of web2py. This will work, but why would you want to do this? It will create more problems than it solves. Imagine the following scenario: you develop a web2py application called XYZ, which is packaged and distributed via Debian. A user installs XYZ version 1.2.3 and starts playing with the runtime version in /var, adding new views and controllers and modifying the existing ones. Some time later you release XYZ 1.3.0 which gets installed on the user's computer via an automatic update. Now there are two version of XYZ on that computer - the mainstream 1.3.0 in /usr and user-modified 1.2.3 in /var. The changes that you made in 1.3.0 are incompatible with the user's changes, so there is no easy way to merge them together. The startup script can not just override the user's changes and install 1.3.0 in /var, that would be cruel. Let's assume it leaves 1.2.3 in /var intact. Now the user notices a bug in your application and decides to submit a bug report using one of the standard bug-reporting tools in Debian. The tool looks at the packaging database and reports that the user has XYZ 1.3.0 installed. Imagine your confusion when you receive this bug report, you thought you had fixed this problem, but it's still there. It's a nightmare, I would not want to maintain such an application. Let's admit that there are different roles: developers develop applications, users use them. When a user wants to become a developer he can install the application in his home dir and start working on it. There is another class of users who don't have any intention of modifying the application. They just want to use it, they want stability and predictability, and the packaging system gives them that. Regards, Dima. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Debian / Ubuntu packager needed!
Hi Dimo, I agree on the fact that there more roles. And I want to make a clear separation in the repo. Web2py applications for production use are put in the usr folder. And copied and protected by a startup script. For example you could take the write right from /controllers /models / views And store static and upload under var or or the user location mentioned in a email before. Web2py applications for development are put in the user location or / var Together with the application uploaded from web2py own application mechanism Those applications may never ever overwrite each other (I agree with you on that too) It is the most advance solution till now, But it's quite complex. Because of various way to run web2py. And it isn't very concrete at the moment, But it's a start. Regards Mark, -Oorspronkelijk bericht- Van: web2py@googlegroups.com [mailto:web...@googlegroups.com] Namens Dima Barsky Verzonden: dinsdag 23 maart 2010 11:26 Aan: web2py@googlegroups.com Onderwerp: Re: [web2py] Re: Debian / Ubuntu packager needed! On Tue, 23 Mar 2010 02:06:16 -0700 (PDT), Mark Breedveld m.breedv...@solcon.nl wrote: I'll see both problems and another solution to work around this. We could install web2py into /usr/ directories with apt. Then create a startup script that makes a copy of web2py and the web2py applications that are installed trough apt to the /var folder. A so called runtime version of web2py. This will work, but why would you want to do this? It will create more problems than it solves. Imagine the following scenario: you develop a web2py application called XYZ, which is packaged and distributed via Debian. A user installs XYZ version 1.2.3 and starts playing with the runtime version in /var, adding new views and controllers and modifying the existing ones. Some time later you release XYZ 1.3.0 which gets installed on the user's computer via an automatic update. Now there are two version of XYZ on that computer - the mainstream 1.3.0 in /usr and user-modified 1.2.3 in /var. The changes that you made in 1.3.0 are incompatible with the user's changes, so there is no easy way to merge them together. The startup script can not just override the user's changes and install 1.3.0 in /var, that would be cruel. Let's assume it leaves 1.2.3 in /var intact. Now the user notices a bug in your application and decides to submit a bug report using one of the standard bug-reporting tools in Debian. The tool looks at the packaging database and reports that the user has XYZ 1.3.0 installed. Imagine your confusion when you receive this bug report, you thought you had fixed this problem, but it's still there. It's a nightmare, I would not want to maintain such an application. Let's admit that there are different roles: developers develop applications, users use them. When a user wants to become a developer he can install the application in his home dir and start working on it. There is another class of users who don't have any intention of modifying the application. They just want to use it, they want stability and predictability, and the packaging system gives them that. Regards, Dima. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py +unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. On Mar 23, 11:25 am, Dima Barsky d...@debian.org wrote: On Tue, 23 Mar 2010 02:06:16 -0700 (PDT), Mark Breedveld m.breedv...@solcon.nl wrote: I'll see both problems and another solution to work around this. We could install web2py into /usr/ directories with apt. Then create a startup script that makes a copy of web2py and the web2py applications that are installed trough apt to the /var folder. A so called runtime version of web2py. This will work, but why would you want to do this? It will create more problems than it solves. Imagine the following scenario: you develop a web2py application called XYZ, which is packaged and distributed viaDebian. A user installs XYZ version 1.2.3 and starts playing with the runtime version in /var, adding new views and controllers and modifying the existing ones. Some time later you release XYZ 1.3.0 which gets installed on the user's computer via an automatic update. Now there are two version of XYZ on that computer - the mainstream 1.3.0 in /usr and user-modified 1.2.3 in /var. The changes that you made in 1.3.0 are incompatible with the user's changes, so there is no easy way to merge them together. The startup script can not just override the user's changes and install 1.3.0 in /var, that would be cruel. Let's assume it leaves 1.2.3 in /var intact. Now the user notices a bug in your application and decides to submit a bug report using one of the standard bug-reporting tools
[web2py] Re: Debian / Ubuntu packager needed!
Hi Kuba, Your indeed right that web2py is a higher application. So we could also decide not to pack any web2py applications into the apt repository. This is the most easy solution. Single user web2py server. And to make it according the guidelines, we make a startup script that create a runtime version. Might have some issues, but nothing to big. On the other side is solution descrypted in my reply to Dimo. Which is highly advanced when correctly implemented. But also very complex for us, but easy, but still advanced and secure for repository users. This is what web2py stand for. A secure, fast and advanced server. We have to come with a good plan, because it is hard to change it. regards Mark On Mar 22, 9:10 pm, Kuba Kucharski kuba.kuchar...@gmail.com wrote: web2py application are higher level. Like php scripts in www directory. They are edtable. They are apps within web2py. They are isolated and independent. They sometimes contain sqlite data inside. web2py is about user-developers. So in some way applications are user data. Applying default security policy to such project is a nonsene IMHO. My opinion is the application folder should go to the home folder of the user which runs web2py. Like in Django /home/user/mycode.. -- Kuba -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: proposal: admin-less ticket support
I wrote an issue tracker plugin that can do some of the things (except for deleting all tickets and downloading) also tickets are displayed a little different, sorted by number of error appearance and stacktrace only if you are interested I could post the plugin, it has still some issues but you could improve them my idea was to attach error tickets to issues to improve the development of an application On Mar 23, 6:07 am, Jonathan Lundell jlund...@pobox.com wrote: If I get rid of the admin application, there's no UI for tickets. They're available in the file system, but that's it. It's not too hard to access tickets through an application, but it requires a little reverse engineering of admin's logic. My proposal is to provide a couple of helper routines to make it easier to build a ticket-access page. The helpers would: 1. retrieve a list of ticket names 2. display a ticket (as now, but without the edit links) 3. delete a ticket 4. delete all tickets 5. download a gzip of all the tickets This would decouple the application from the ticket implementation, and allow full ticket access without admin. An application would ordinarily restrict the ticket-access functionality to a sysadmin role. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: proposal: change SQLFORM delete checkbox handling
The only problem I see but needs testing is what happens to an existing app that uses the new SQLFORM with the existing web2py_ajax.html code? Send me a patch and I will try it. On Mar 23, 12:02 am, Jonathan Lundell jlund...@pobox.com wrote: At the moment, there's a delete-confirmation checkbox that's turned on when an SQLFORM is 'deletable'. It's a simple checkbox with class='delete', along with this bit of code in web2py_ajax.html: jQuery(input[type='checkbox'].delete).each(function(){jQuery(this).click(function() { if(this.checked) if(!confirm({{=T('Sure you want to delete this object?')}})) this.checked=false; });}); It presents the user with a dialog, and if the use doesn't OK the dialog, the box isn't checked and no delete occurs on submit. This logic serves at least two purposes. One, it's a workaround for the problem that having multiple submit buttons is problematical with IE. Two, it forces the user to take three actions to delete a record: check the box, confirm the deletion, and click submit. I have to alternative suggestions. One is to move the above jQuery logic into a simple 'onclick' attached to the checkbox by SQLFORM. This gets rid of the jQuery requirement (with no loss of functionality), but more important it allows us to have an option to SQLFORM.__init__() to override the text associated with the confirmation. 'Sure you want to delete this object?' is somewhat idiosyncratic English to begin with, but the main problem is that usually we'd like to be more specific than this object. Depending on the record, we might say this item or this item in your cart or this user or any number of things. I see no downside to this. It's compatible, and the default action is identical to the current mechanism. Alternative: change the delete checkbox to a 'button' element labeled 'Delete'. Use onclick to attach a confirmation dialog to the button. If the user confirms, do a submit of the form, but set a hidden variable in the form to communicate the delete action to accepts. This avoids the IE problem (there's only one submit button). Downsides: the UI changes a checkbox to a Delete button, and JavaScript is required to do a delete at all. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: How to call other web2py applications from within a web2py application
1) http://web2py.com/plugins/default/jqgrid 2) I suggest using reportlab+platypus On Mar 23, 2:23 am, Rahul rahul.dhak...@gmail.com wrote: Hi All, I used this code like below in my view to call other application as this is something simplest I could find. a {{=LOAD (url='http://127.0.0.1:8000/wiki/index.html'}} It did the job. But it overrides my selected application template and if I try to access a url in the index.html page for wiki (as written above) it then takes control of the entire page overriding my calling application. I even selected the same template for wiki but with some weird results. So ultimately I coded the wiki in my current application itself (as i need to quickly build myself a solution) Ps: I am currently struggling with CRUD and creating tables for my db applications in HTML Views. Something I want accomplished using SQLTABLES .. One suggestion, two actually - 1- Can we have a polished table rendering widget in web2py widgets for the data rendered using SQLFORM. Also I found that I need a template from creating tabs in views so I can code more complex applications using these widgets. Can anyone let me know the trick to achieve this or any helpful links. ? 2- How do I print data to a printer in web2py? any library or documentation regarding the same? Also I need to show preview in PDF format for database cursor data. Can anyone help on this? I could not find any supporting information on it. Thanks, Rahul On Mar 17, 3:47 pm, Rahul rahul.dhak...@gmail.com wrote: These links are a good resource. But I'll need to figure out if I can get it working in my current application. Thanks for your wonderful support. I'll keep you all posted if I get success. Rahul. On Mar 15, 8:19 pm, mdipierro mdipie...@cs.depaul.edu wrote: For now look at the following links that may help you: For an example of {{=LOAD(...)}} http://gluonframework.wordpress.com/2010/03/07/web2py-ajax-and-forms/ You can load an action from the same app or other apps. For ways an app can share data with another app: http://www.web2py.com/book/default/section/4/19 http://www.web2py.com/book/default/section/4/20 Hope this helps. Massimo On Mar 12, 7:26 am, Rahul rahul.dhak...@gmail.com wrote: Hi All, Massimo, I've been designing a web app using web2py. Web2py is really a very well designed framework. I am considering it along with Django for a medium sized web app development. How ever I would like to know, if I can code more applications for a single complex site (as we can do in Django) and link it to one single application.I am not using CAS as I have created my own authentication system. Here's an example to make it clear of what I want- *my site* |__ site pages along with main page |__ link to app1 ( a blog that is a separate web2py app) |__ link to a app2 (chat client) ( again a separate web2py app) |__ link to my database triggered app3 (again a separate web2py app) In short how do I modularise my web2py project to combine different applications into my original site web2py project. From the web I've seen a post from Yarko that mentions this {{=LOAD(...,application=' otherapp')}} but technically I could not find any documentation either in your online book or site. Can you please provide methods of how this is achievable without sacrificing simplicity. I have also heard about plugins but not really sure what they are and should I be really using those. Please suggest. Sincerely, Rahul D (India) -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Can't use placeholders when calling stored procedure in DB2
will do. On Mar 23, 4:12 am, Alexey Nezhdanov snak...@gmail.com wrote: Problem: (Pdb) print db2db.executesql(call webxdsl.abonsearch (123, 'port_id', '41110', '1', ?, ?);) *** Error: ('07001', '[07001] [IBM][CLI Driver] CLI0100E Wrong number of parameters. SQLSTATE=07001 (-9) (SQLExecDirectW)') (Pdb) print db2db._execute(call webxdsl.abonsearch (?),(1,2)) *** TypeError: lambda() takes exactly 1 argument (2 given) Solution --- sql.old.py 2010-01-18 17:00:36.0 +0300 +++ sql.py 2010-03-23 12:08:51.374244734 +0300 @@ -1072,7 +1072,7 @@ self._dbname, cnxn = self._uri.split(':', 1) self._pool_connection(lambda : pyodbc.connect(cnxn)) self._cursor = self._connection.cursor() - self._execute = lambda a: self._cursor.execute(a[:-1]) + self._execute = lambda a, b=(): self._cursor.execute(a[:-1],b) elif is_jdbc and self._uri[:9] == 'sqlite://': self._dbname='sqlite' if uri[9] != '/': Result: (Pdb) print db2db.executesql(call webxdsl.abonsearch (123, 'port_id', '41110', '1', ?, ?);,(1,2)) rows follow -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Mercurial or Bazaar?
They are clones of each other but I'd like to stop mantaining the bazaar one. On Mar 23, 4:50 am, Giovanni Giorgi j...@objectsroot.com wrote: hi all, I have seen there are two web2pty repositories: one based on mercurial and one based on bazaar. Which is the official one? By the way, I have tried both revision control system... I am sticking on mercurial because it seems more popular. I got a very bad feeling with subversion, and I give it up in favor of the distributed version control mantra; what are your... preferences? :) -- Team Leader Gioorgi.com Chief Editor -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] clueless about db insert: IntegrityError: participant.type may not be NULL
Hi, I am new to web2py and really like it so far. I just ran into trouble though, and can't find the solution myself. The error message is: IntegrityError: participant.type may not be NULL as a result of calling: db.participant.insert(unique_ref=ref, batch_type=session.batch_type, batch_name=session.batch_name) I have defined a table 'participants' and 'type' used to be one of its fields. However, I changed the definition and the field is now called 'batch_type'. Since there is currently no 'participant.type' in my code, why does it show up in the error message? I hope someone has a suggestion. Thanks . Sven -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] href not being rendered
On Mar 23, 2010, at 1:32 AM, annet wrote: In a send_mail.html view I have a link which reads like: pHaving trouble viewing this email? a href={{=URL(r=request,c='clublocatormail',f='browser_version',args=[item.bedrijf])}} target=_blankView it in your browser/a/p When I send the mail and open it this link reads like: pHaving trouble viewing this email? aView it in your browser/a/ p Does one of you know why the href isn't being rendered? It needs to be _href= (and _target=). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] for testers
I like to download the dev from mercurial repos, it's more comfortable. Maybe it's because the habit. On Mon, Mar 22, 2010 at 10:11 PM, mdipierro mdipie...@cs.depaul.edu wrote: http://web2py.com/examples/static/nightly/web2py_src.zip http://web2py.com/examples/static/nightly/web2py_win.zip http://web2py.com/examples/static/nightly/web2py_osx.zip It is not yet completely automated but I will post build them often from trunk. Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.comweb2py%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: clueless about db insert: IntegrityError: participant.type may not be NULL
Because you used sqlite and your made the field type as notnull=True. sqlite does not support ALTER TABLE DROP COLUMN so the field is still there. I suggest you dump the dump the db, recerate it and restore the dump or add the field again as invisible (not sure if this will work, give it a try): Field('type',default='',writable=False,readable=False) On Mar 23, 6:16 am, Sven svenstrin...@gmail.com wrote: Hi, I am new to web2py and really like it so far. I just ran into trouble though, and can't find the solution myself. The error message is: IntegrityError: participant.type may not be NULL as a result of calling: db.participant.insert(unique_ref=ref, batch_type=session.batch_type, batch_name=session.batch_name) I have defined a table 'participants' and 'type' used to be one of its fields. However, I changed the definition and the field is now called 'batch_type'. Since there is currently no 'participant.type' in my code, why does it show up in the error message? I hope someone has a suggestion. Thanks . Sven -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: href not being rendered
I do not think this is the problem. He does not seem to be using the A(...) helper. On Mar 23, 9:16 am, Jonathan Lundell jlund...@pobox.com wrote: On Mar 23, 2010, at 1:32 AM, annet wrote: In a send_mail.html view I have a link which reads like: pHaving trouble viewing this email? a href={{=URL(r=request,c='clublocatormail',f='browser_version',args=[item.bedrijf])}} target=_blankView it in your browser/a/p When I send the mail and open it this link reads like: pHaving trouble viewing this email? aView it in your browser/a/ p Does one of you know why the href isn't being rendered? It needs to be _href= (and _target=). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: proposal: admin-less ticket support
On Mar 23, 2010, at 6:00 AM, selecta wrote: I wrote an issue tracker plugin that can do some of the things (except for deleting all tickets and downloading) also tickets are displayed a little different, sorted by number of error appearance and stacktrace only if you are interested I could post the plugin, it has still some issues but you could improve them my idea was to attach error tickets to issues to improve the development of an application I'd like to take a look. Issue tracking is a good idea, too. To clarify, though, I have a working solution. It wasn't that hard to do, following the example of admin, but I think it would be easier (and more portable) going forward if parts of it were pushed into gluon.restricted in the form of helpers. My motivation is that the application will not be deployed on the public web, but rather at customer sites, where for security reasons there will be no admin application, and likely no external access to the server. So I need a way for a local sysadmin to collect tickets to send back to the mother ship. On Mar 23, 6:07 am, Jonathan Lundell jlund...@pobox.com wrote: If I get rid of the admin application, there's no UI for tickets. They're available in the file system, but that's it. It's not too hard to access tickets through an application, but it requires a little reverse engineering of admin's logic. My proposal is to provide a couple of helper routines to make it easier to build a ticket-access page. The helpers would: 1. retrieve a list of ticket names 2. display a ticket (as now, but without the edit links) 3. delete a ticket 4. delete all tickets 5. download a gzip of all the tickets This would decouple the application from the ticket implementation, and allow full ticket access without admin. An application would ordinarily restrict the ticket-access functionality to a sysadmin role. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: href not being rendered
On Mar 23, 2010, at 7:40 AM, mdipierro wrote: I do not think this is the problem. He does not seem to be using the A(...) helper. Good point; my confusion. OK, then, how about this. If the link reads like text is literally true (that is, we're looking at the display text, not the source text), then it's being encoded. On Mar 23, 9:16 am, Jonathan Lundell jlund...@pobox.com wrote: On Mar 23, 2010, at 1:32 AM, annet wrote: In a send_mail.html view I have a link which reads like: pHaving trouble viewing this email? a href={{=URL(r=request,c='clublocatormail',f='browser_version',args=[item.bedrijf])}} target=_blankView it in your browser/a/p When I send the mail and open it this link reads like: pHaving trouble viewing this email? aView it in your browser/a/ p Does one of you know why the href isn't being rendered? It needs to be _href= (and _target=). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Debian / Ubuntu packager needed!
Hi Mark, And I want to make a clear separation in the repo. Web2py applications for production use are put in the usr folder. And copied and protected by a startup script. For example you could take the write right from /controllers/models/views And store static and upload under var or or the user location mentioned in a email before. I have no problem with that. All you have to do now is to convince Massimo :-) Web2py applications for development are put in the user location or /var Debian packages are not allowed to touch users' home directories at the installation time. Also, I don't see any point in doing that, even if it was allowed. Anybody who want to develop an application can copy the production version from /usr into his home directory and run it from there. We could provide a script to simplify that task, although even doing it manually is not difficult at all. The script can create a web2py folder and populate it with specified applications taken from either production packages or plain w2p files. The script will be under package control, but the resulting web2py folder will not be. The user will decide where to store it, how to run it, how often to update it, etc. Regards, Dima. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: for testers
and it is better but we also need to test the binaries sometimes. On Mar 23, 9:19 am, Albert Abril albert.ab...@gmail.com wrote: I like to download the dev from mercurial repos, it's more comfortable. Maybe it's because the habit. On Mon, Mar 22, 2010 at 10:11 PM, mdipierro mdipie...@cs.depaul.edu wrote: http://web2py.com/examples/static/nightly/web2py_src.zip http://web2py.com/examples/static/nightly/web2py_win.zip http://web2py.com/examples/static/nightly/web2py_osx.zip It is not yet completely automated but I will post build them often from trunk. Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.comweb2py%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Debian / Ubuntu packager needed!
I am not sure I understand. If I understand you are proposing: 1) installing web2py into /usr/ as it (it will not run there) 2) provide a script to allow users to make a copy of what is needed for runtime (inluding applications/) 3) allow the user to run from the folder where files have been copied but using the shared gluon files. If I understand I am fine with this. On Mar 23, 10:10 am, Dima Barsky d...@debian.org wrote: Hi Mark, And I want to make a clear separation in the repo. Web2py applications for production use are put in the usr folder. And copied and protected by a startup script. For example you could take the write right from /controllers/models/views And store static and upload under var or or the user location mentioned in a email before. I have no problem with that. All you have to do now is to convince Massimo :-) Web2py applications for development are put in the user location or /var Debian packages are not allowed to touch users' home directories at the installation time. Also, I don't see any point in doing that, even if it was allowed. Anybody who want to develop an application can copy the production version from /usr into his home directory and run it from there. We could provide a script to simplify that task, although even doing it manually is not difficult at all. The script can create a web2py folder and populate it with specified applications taken from either production packages or plain w2p files. The script will be under package control, but the resulting web2py folder will not be. The user will decide where to store it, how to run it, how often to update it, etc. Regards, Dima. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] web2py production deployment on vps.net (VIDEO)
The video: http://vimeo.com/10377947 Please use this link below to sign up for vps.net. http://www.vps.net/?bid=190aid=CD3792opt= If you want to use vps.net, by using the link to register you will be making a zero cost donation. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: get value of an combo box (select tag)
I write a combo box to select all table in the database I want to get tabe name after select I could get the table name if i use form to click submit button, but now I want get table without form?? in section http://web2py.com/book/default/section/5/2, OPTION, SELECT information is not enough for me to do On 23 Tháng Ba, 16:12, tandnk50 dn.tan7...@gmail.com wrote: Hi all, anyone show me how to I get selected value of combo box ?? thank you very much -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: jqGrid plugin + ajax search and pagination + ui themes
I have been using another jquery grid. look at how custimizable the formatters and editors are. Would anyone be interested in us making a web2py plugin for it? If so what type of api should be supported. My current version does ajax add edit and load from a specific web2py model, but I could generalize it like massimo has done. http://wiki.github.com/mleibman/SlickGrid/examples On Mar 21, 3:37 pm, mdipierro mdipie...@cs.depaul.edu wrote: http://web2py.com/plugins/default/jqgrid -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Debian / Ubuntu packager needed!
I am not sure I understand. If I understand you are proposing: 1) installing web2py into /usr/ as it (it will not run there) 2) provide a script to allow users to make a copy of what is needed for runtime (inluding applications/) 3) allow the user to run from the folder where files have been copied but using the shared gluon files. If I understand I am fine with this. That's correct, but it's only part of my proposal. The most difficult bit would be to create production application. See my previous post about symlinks from /usr into /var. Do you have any objections to that? Regards, Dima. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: jqGrid plugin + ajax search and pagination + ui themes
nice On Mar 23, 12:09 pm, dspiteself dspites...@gmail.com wrote: I have been using another jquery grid. look at how custimizable the formatters and editors are. Would anyone be interested in us making a web2py plugin for it? If so what type of api should be supported. My current version does ajax add edit and load from a specific web2py model, but I could generalize it like massimo has done. http://wiki.github.com/mleibman/SlickGrid/examples On Mar 21, 3:37 pm, mdipierro mdipie...@cs.depaul.edu wrote: http://web2py.com/plugins/default/jqgrid -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Debian / Ubuntu packager needed!
I do not have any object. I think I need more details to understand it better. I think you should give it a shot and we'll see later if we find any problem. On Mar 23, 12:37 pm, Dima Barsky d...@debian.org wrote: I am not sure I understand. If I understand you are proposing: 1) installing web2py into /usr/ as it (it will not run there) 2) provide a script to allow users to make a copy of what is needed for runtime (inluding applications/) 3) allow the user to run from the folder where files have been copied but using the shared gluon files. If I understand I am fine with this. That's correct, but it's only part of my proposal. The most difficult bit would be to create production application. See my previous post about symlinks from /usr into /var. Do you have any objections to that? Regards, Dima. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: get value of an combo box (select tag)
Sorry. can you explain more in detail? On Mar 23, 10:33 am, tandnk50 dn.tan7...@gmail.com wrote: I write a combo box to select all table in the database I want to get tabe name after select I could get the table name if i use form to click submit button, but now I want get table without form?? in sectionhttp://web2py.com/book/default/section/5/2, OPTION, SELECT information is not enough for me to do On 23 Tháng Ba, 16:12, tandnk50 dn.tan7...@gmail.com wrote: Hi all, anyone show me how to I get selected value of combo box ?? thank you very much -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: joins, geraldo and possible alias
Thanks, This is close, but it does not quite get the result I'm looking for, I basically need the following MySQL query: SELECT Calls . * , created_by.Name, handled_by.Name FROM ( Calls LEFT JOIN Users AS created_by ON Calls.CreatedBy = created_by.ID ) LEFT JOIN Users AS handled_by ON Calls.HandledBy = handled_by.ID; I've tried adapting the code you posted but I can't seem to get the result set I need. For example a call from 'Helen' created by Bob and Handled by Sam, I would like to get the results: CallerName created_by.Name handled_by.Name Helen Bob Sam but I get Calls.idCalls.CallerNameUsers.Name Users.Name 1 Helen Bob Bob 1 Helen Sam Sam 1 Helen Charlie Charlie Any ideas? On Mar 20, 3:10 pm, mdipierro mdipie...@cs.depaul.edu wrote: created_by=db.Users.with_alias('created_by') handled_by=db.Users.with_alias('handled_by') rows = db(db.Calls.id0).select(db.Calls.ALL,db.created_by.name,db.handled_by.name, left=[created_by.on(created_by.id==db.Calls.CreatedBy), handled_by.on(handled_by.id==db.Calls.HandledBy)]) On Mar 20, 6:58 am, jonatron hobson@googlemail.com wrote: Hi, I am hoping someone can help with this: I have tables setup something like this (this is a simplified representation): db.define_table('Users', Field('Name')) db.define_table('Calls', Field('CallerName'), Field('CreatedBy', db.Users), Field('HandledBy', db.Users)) I need to produce a query set to send to geraldo reports that joins both the createdby and handledby fields to db.users.id so that I can display the users name in the report not the id. I can do one inner join no problem and use Users.Name to get the name. To do both joins and get useful data I think I need to do something analogue SQL AS on the joins and then access the data using an alias. I have played with with_alias but don't seem to get what I need. Can anyone point me in the right direction? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: joins, geraldo and possible alias
hmmm. it could be a bug. What do you get if you do: print db(db.Calls.id0)._select(db.Calls.ALL,db.created_by.name,db.handled_by.name, left=[created_by.on(created_by.id==db.Calls.CreatedBy), handled_by.on(handled_by.id==db.Calls.HandledBy)]) On Mar 23, 11:31 am, jonatron hobson@googlemail.com wrote: Thanks, This is close, but it does not quite get the result I'm looking for, I basically need the following MySQL query: SELECT Calls . * , created_by.Name, handled_by.Name FROM ( Calls LEFT JOIN Users AS created_by ON Calls.CreatedBy = created_by.ID ) LEFT JOIN Users AS handled_by ON Calls.HandledBy = handled_by.ID; I've tried adapting the code you posted but I can't seem to get the result set I need. For example a call from 'Helen' created by Bob and Handled by Sam, I would like to get the results: CallerName created_by.Name handled_by.Name Helen Bob Sam but I get Calls.id Calls.CallerName Users.Name Users.Name 1 Helen Bob Bob 1 Helen Sam Sam 1 Helen Charlie Charlie Any ideas? On Mar 20, 3:10 pm, mdipierro mdipie...@cs.depaul.edu wrote: created_by=db.Users.with_alias('created_by') handled_by=db.Users.with_alias('handled_by') rows = db(db.Calls.id0).select(db.Calls.ALL,db.created_by.name,db.handled_by.name, left=[created_by.on(created_by.id==db.Calls.CreatedBy), handled_by.on(handled_by.id==db.Calls.HandledBy)]) On Mar 20, 6:58 am, jonatron hobson@googlemail.com wrote: Hi, I am hoping someone can help with this: I have tables setup something like this (this is a simplified representation): db.define_table('Users', Field('Name')) db.define_table('Calls', Field('CallerName'), Field('CreatedBy', db.Users), Field('HandledBy', db.Users)) I need to produce a query set to send to geraldo reports that joins both the createdby and handledby fields to db.users.id so that I can display the users name in the report not the id. I can do one inner join no problem and use Users.Name to get the name. To do both joins and get useful data I think I need to do something analogue SQL AS on the joins and then access the data using an alias. I have played with with_alias but don't seem to get what I need. Can anyone point me in the right direction? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: MySQL server has gone away
Hi Massimo, please, were you able to look at it? I'm getting the same error relatively often, several times a day one a site with about 1 daily requests. Thanks :) David On Feb 23, 9:31 am, mdipierro mdipie...@cs.depaul.edu wrote: will look into this. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Debian / Ubuntu packager needed!
On Mar 23, 6:00 pm, mdipierro mdipie...@cs.depaul.edu wrote: I do not have any object. I think I need more details to understand it better. I think you should give it a shot and we'll see later if we find any problem. I'm not very happy about this, I would prefer to reach an agreement before I start. I would not want to spend several evenings developing something that you eventually reject for some ideological reasons. Let's do it one step at a time. I'll package the gluon module anyway, there seem to be no problems with it. After that I'll try to write down a small document describing the structure of other web2py related packages. If you are happy with it I'll go ahead with the second part. If not, we'll just stop there. Regards, Dima. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: MySQL server has gone away
For now do this: try: db=DAL(mysql://a:b...@localhost/c, pool_size=5) except: db=DAL(mysql://a:b...@localhost/c, pool_size=5) It should fix the probelm. If not, set pool_size=0 in the second call. On Mar 23, 1:40 pm, David Zejda d...@atlas.cz wrote: Hi Massimo, please, were you able to look at it? I'm getting the same error relatively often, several times a day one a site with about 1 daily requests. Thanks :) David On Feb 23, 9:31 am, mdipierro mdipie...@cs.depaul.edu wrote: will look into this. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Debian / Ubuntu packager needed!
I understand. You do not have to develop the all thing. Can you show a pseudcode example of what the script would do? On Mar 23, 1:40 pm, Dima Barsky d...@debian.org wrote: On Mar 23, 6:00 pm, mdipierro mdipie...@cs.depaul.edu wrote: I do not have any object. I think I need more details to understand it better. I think you should give it a shot and we'll see later if we find any problem. I'm not very happy about this, I would prefer to reach an agreement before I start. I would not want to spend several evenings developing something that you eventually reject for some ideological reasons. Let's do it one step at a time. I'll package the gluon module anyway, there seem to be no problems with it. After that I'll try to write down a small document describing the structure of other web2py related packages. If you are happy with it I'll go ahead with the second part. If not, we'll just stop there. Regards, Dima. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: for testers
the problem with web2py.exe -h not printing has been resolved. On Mar 22, 4:11 pm, mdipierro mdipie...@cs.depaul.edu wrote: http://web2py.com/examples/static/nightly/web2py_src.ziphttp://web2py.com/examples/static/nightly/web2py_win.ziphttp://web2py.com/examples/static/nightly/web2py_osx.zip It is not yet completely automated but I will post build them often from trunk. Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Debian / Ubuntu packager needed!
i'm looking forward to your design plan. It sounds good and i'm confident that it will. regards Mark Breedveld, On Mar 23, 7:47 pm, mdipierro mdipie...@cs.depaul.edu wrote: I understand. You do not have to develop the all thing. Can you show a pseudcode example of what the script would do? On Mar 23, 1:40 pm, Dima Barsky d...@debian.org wrote: On Mar 23, 6:00 pm, mdipierro mdipie...@cs.depaul.edu wrote: I do not have any object. I think I need more details to understand it better. I think you should give it a shot and we'll see later if we find any problem. I'm not very happy about this, I would prefer to reach an agreement before I start. I would not want to spend several evenings developing something that you eventually reject for some ideological reasons. Let's do it one step at a time. I'll package the gluon module anyway, there seem to be no problems with it. After that I'll try to write down a small document describing the structure of other web2py related packages. If you are happy with it I'll go ahead with the second part. If not, we'll just stop there. Regards, Dima. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: joins, geraldo and possible alias
I get the following: SELECT Calls.id, Calls.CallerName, Calls.CreatedBy, Calls.HandledBy, Users.Name, Users.Name FROM Users, Calls LEFT JOIN Users AS created_by ON created_by.id=Calls.CreatedBy LEFT JOIN Users AS handled_by ON handled_by.id=Calls.HandledBy WHERE Calls.id0; On Mar 23, 6:06 pm, mdipierro mdipie...@cs.depaul.edu wrote: hmmm. it could be a bug. What do you get if you do: print db(db.Calls.id0)._select(db.Calls.ALL,db.created_by.name,db.handled_by.name, left=[created_by.on(created_by.id==db.Calls.CreatedBy), handled_by.on(handled_by.id==db.Calls.HandledBy)]) On Mar 23, 11:31 am, jonatron hobson@googlemail.com wrote: Thanks, This is close, but it does not quite get the result I'm looking for, I basically need the following MySQL query: SELECT Calls . * , created_by.Name, handled_by.Name FROM ( Calls LEFT JOIN Users AS created_by ON Calls.CreatedBy = created_by.ID ) LEFT JOIN Users AS handled_by ON Calls.HandledBy = handled_by.ID; I've tried adapting the code you posted but I can't seem to get the result set I need. For example a call from 'Helen' created by Bob and Handled by Sam, I would like to get the results: CallerName created_by.Name handled_by.Name Helen Bob Sam but I get Calls.id Calls.CallerName Users.Name Users.Name 1 Helen Bob Bob 1 Helen Sam Sam 1 Helen Charlie Charlie Any ideas? On Mar 20, 3:10 pm, mdipierro mdipie...@cs.depaul.edu wrote: created_by=db.Users.with_alias('created_by') handled_by=db.Users.with_alias('handled_by') rows = db(db.Calls.id0).select(db.Calls.ALL,db.created_by.name,db.handled_by.name, left=[created_by.on(created_by.id==db.Calls.CreatedBy), handled_by.on(handled_by.id==db.Calls.HandledBy)]) On Mar 20, 6:58 am, jonatron hobson@googlemail.com wrote: Hi, I am hoping someone can help with this: I have tables setup something like this (this is a simplified representation): db.define_table('Users', Field('Name')) db.define_table('Calls', Field('CallerName'), Field('CreatedBy', db.Users), Field('HandledBy', db.Users)) I need to produce a query set to send to geraldo reports that joins both the createdby and handledby fields to db.users.id so that I can display the users name in the report not the id. I can do one inner join no problem and use Users.Name to get the name. To do both joins and get useful data I think I need to do something analogue SQL AS on the joins and then access the data using an alias. I have played with with_alias but don't seem to get what I need. Can anyone point me in the right direction? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Survey: Functionality of the Drop Boxes widget
On Mar 23, 4:22 am, Thadeus Burgess thade...@thadeusb.com wrote: It is not so trivial to search and replace. For one, you cannot place keyword arguments before non-keyword args. So it is not a simple matter of find/replace IS_IN_SET(... with IS_IN_SET(zero=None..., there will have to be parsing of the syntax to determine where to place zero=. yes, I suppose it would need some way to find the balancing paren, in general, to correctly accomplish this (and it might not be on the same line)... You are right - this can be a real pain... I am perfectly capable of making the changes, and most likely will. Other frameworks, have version upgrades that happen once a month at the very least frequency, with migration guides, change logs, and previous version supported bug fixes. Yes, I think I agree - having a migration guide would have considered the impact of this kind of change... Of course, having a central repository of free apps, and migrating them would help... As it is, many of those free apps are no more than store-front dressing: hit-or-miss as to which ones will work out of the box. At least testing would facilitate saying things like ltest web2py tested with: - Yarko Web2py cannot do this, for one the development cycle is more along the lines of hours/days instead of months, there are no migration logs, there are no change logs, there is no point of reference for upgrading version to version. As I have asked before, if Massimo would place an operational definition of backwards compatibility in the context of web2py, otherwise it is open to interpretation, and will be judged as those interpretations are assumed. If you are going to set a standard and a promise, you either define the parameters of that standard, or uphold it to the highest and most rigid interpretations. Here we realize the reason for religious debate and war, the absence of scientific definitions that allow individuals from all walks of life to understand from the same perspective and context. My interpretation is of not having to change a line of code to upgrade my application and have it look _exactly_ the same after the upgrade. The majority of use cases is 50/50 and depends on the context of the form. Even for me, the use cases differ from hobby applications to professional applications. -Thadeus On Tue, Mar 23, 2010 at 2:54 AM, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: Thadeus - I initially commiserated with you: backward compatipility is backward compatibility --- but I alwasy thought Massimo held on to that phrase too strongly, too tightly. It's important for the big things, but it _always_ gets in the way of meaningful, useful change... I think perhaps Massimo's bordering on being dogmatic about backward compatibiliy may have an affect on how people react to this. But Jonathan gives an important insight: I always specify zero=... Even as zero=... didn't exist before, it's easy enough to do globeal search and modify to put it in - it's _really_ not a big deal; it's one of those things where dogmatically holding to the compatability principle is more trouble than adapting to this change. If it was happening all the time, often... this would be annoying; but occasionally, it is more than tolerable - it can even be a good thing, in the big scheme of things. You are, of course, free to see it in whatever way you happen to see it. I'm just offering a summary of a counterpoint for consideration. Kind regards, Yarko On Mar 23, 2:22 am, Thadeus Burgess thade...@thadeusb.com wrote: weheh, Massimo, The issue is the same for me, I have several web2py applications, each commanding over 20 forms which make use of IS_IN_SET. I am dealing with a sizable number of forms that I need to update just to fix this. The fact is that web2py changed the output of how drop boxes are rendered, and in turn it has broken my forms that relied on the first element being selected. Aside from the time to alter my forms, this is an issue of promise, and principle that separate web2py from other python frameworks. To take a few quotes and give my interpretations of them. Another feature of web2py, is that we, its developers, commit to maintain backward compatibility in future versions. We have done so since the first release of web2py in October, 2007. New features have been added and bugs have been fixed, but if a program worked with web2py 1.0, that program will still work today. - Massimo Di Pierro, Web2py Book, Chapter 1, Introduction This is the kicker, my programs no longer work as intentionally designed. Perhaps you should re-word this as will still compile/execute/not crash instead of work. web2py has never broken backwards compatibility, and it will not break compatibility when additional functionality is added in the future. - Massimo Di Pierro, Web2py Book, Chapter
[web2py] Re: Mercurial or Bazaar?
On Mar 23, 8:36 am, mdipierro mdipie...@cs.depaul.edu wrote: They are clones of each other but I'd like to stop mantaining the bazaar one. It would be good to update the main page, and put a note on the branches... Also, since people will find launchpad of web2py, the links (which now still go the depaul.edu subdomains) should probably be updated. - Yarko On Mar 23, 4:50 am, Giovanni Giorgi j...@objectsroot.com wrote: hi all, I have seen there are two web2pty repositories: one based on mercurial and one based on bazaar. Which is the official one? By the way, I have tried both revision control system... I am sticking on mercurial because it seems more popular. I got a very bad feeling with subversion, and I give it up in favor of the distributed version control mantra; what are your... preferences? :) -- Team Leader Gioorgi.com Chief Editor -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Displaying Foreign Key
Ah, very simple. Thanks, guys. P.S. It's a good thing web2py makes it easy to rename tables. :) On Mar 22, 6:07 pm, mdipierro mdipie...@cs.depaul.edu wrote: You can just replace td{{=event.room_id}}/td with td{{=event.room_id.name}}/td This will result in one extra select per record. You can also use a join #default.py def index(): events = db(db.events.room_id==db.rooms.id).select(orderby=db.events.event_date) return dict(events=events) #index.html {{extend 'layout.html'}} table tr tdDate/tdtdEvent/tdtdRoom/td /tr {{for e in events:}} tr td{{=e.events.event_date}}/tdtd{{=e.events.title}}/ tdtd{{=e.rooms.id}}/td /tr {{pass}} /table These kind of programs read better if table names are singular. ;-) Massimo On Mar 22, 5:45 pm, Greg greg.kr...@gmail.com wrote: Hello! I have a view that lists some records (events), one of the fields (events.room_id) is a foreign key. When i display these records I want to display rooms.name, not events.room_id. Can someone give me a nudge (or swift kick) in the right direction on how to do this? I suspect a join of some sort is required, but that stuff confuses the hell out of me. I've included some relevant code below. Thanks! #db.py db.define_table('rooms', Field('name'), ) db.define_table('events', Field('title'), Field('event_date', 'date'), Field('room_id', db.rooms) ) #default.py def index(): events = db().select(db.events.ALL, orderby=db.events.event_date) return dict(events=events) #index.html {{extend 'layout.html'}} table tr tdDate/tdtdEvent/tdtdRoom/td /tr {{for event in events:}} tr td{{=event.event_date}}/tdtd{{=event.title}}/ tdtd{{=event.room_id}}/td /tr {{pass}} /table -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: jqGrid plugin + ajax search and pagination + ui themes
This _is_ nice; looking at source of some of the examples, I see stuff that looks like webpy templating in setup, so the challenge will be to keep it clear which parts are client-dynamic, and which parts should be served by the server (i.e. static within a view)... I want to play with this one! ;-) - Yarko On Mar 23, 12:09 pm, dspiteself dspites...@gmail.com wrote: I have been using another jquery grid. look at how custimizable the formatters and editors are. Would anyone be interested in us making a web2py plugin for it? If so what type of api should be supported. My current version does ajax add edit and load from a specific web2py model, but I could generalize it like massimo has done. http://wiki.github.com/mleibman/SlickGrid/examples On Mar 21, 3:37 pm, mdipierro mdipie...@cs.depaul.edu wrote: http://web2py.com/plugins/default/jqgrid -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: clueless about db insert: IntegrityError: participant.type may not be NULL
Thanks! Adding the field as invisible works. But I prefer to dump - drop - create - restore approach. After fiddling around I have two questions about that though 1) Why can I see the db object with corresponding tables in shell, but not access the database behind it? (ProgrammingError: Cannot operate on a closed database.) I assume either my admin or my application is locking it. But why would it do that if no transactions are going on? 2) In added tot the end of db.py: for table in db.tables: db[table].drop() The sql.log shows that most of the tables are indeed dropped (and recreated in next request ). But two of my tables are not dropped and no mention is made in sql.log. (no other error messages either) db.tables in shell shows which tables remained: ['auth_group', 'auth_permission', 'participant', 'svo_answer'] So my question becomes how do I get rid of the 'participant' and 'svo_answer' tables using web2py (both shell and application)? Thanks again. Sven On Mar 23, 7:39 am, mdipierro mdipie...@cs.depaul.edu wrote: Because you used sqlite and your made the field type as notnull=True. sqlite does not support ALTER TABLE DROP COLUMN so the field is still there. I suggest you dump the dump the db, recerate it and restore the dump or add the field again as invisible (not sure if this will work, give it a try): Field('type',default='',writable=False,readable=False) On Mar 23, 6:16 am, Sven svenstrin...@gmail.com wrote: Hi, I am new to web2py and really like it so far. I just ran into trouble though, and can't find the solution myself. The error message is: IntegrityError: participant.type may not be NULL as a result of calling: db.participant.insert(unique_ref=ref, batch_type=session.batch_type, batch_name=session.batch_name) I have defined a table 'participants' and 'type' used to be one of its fields. However, I changed the definition and the field is now called 'batch_type'. Since there is currently no 'participant.type' in my code, why does it show up in the error message? I hope someone has a suggestion. Thanks . Sven -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Displaying Foreign Key
Would this work in GAE which does not handle table join? or the DAL automatically handle this for you? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Survey: Functionality of the Drop Boxes widget
Sorry, maybe I come late, but the best default option for me is: Please choose an option at the first place, with null or empty value associate. Even better if we can customize the text like: Please choose your country, Please choose your gender, etc. Of course we should be able to validate it... with a required (or not) option. I think this is the standard on Internet. Alex El 22/03/2010 4:06, Thadeus Burgess escribió: There is current on-going discussion of the default functionality of the drop boxes widget. This is an attempt to gather information from the community on this discussion. The results of this survey will determine what this default functionality will be. Here is the comparison of the two options currently being considered. zero= This is when a drop box is rendered, there is an empty OPTION tag rendered in the first that is selected. zero=None This is when only the options in the list are rendered. The first option in the list is selected. https://spreadsheets.google.com/viewform?formkey=dE9jS1VHSWdyd08xX2x6NU0yaEs1cnc6MA Thank You, -Thadeus -- Alejandro Fanjul Fdez. alex.fan...@gmail.com www.mhproject.org -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] web2py production deployment on vps.net (VIDEO)
Massimo, If Im not wrong you should put your real hostname (myvps.example.com) in the Common Name field of the selfsign certificate to avoid certificate errors refering to incorrect domain certificate association alex El 23/03/2010 16:49, mdipierro escribió: The video: http://vimeo.com/10377947 Please use this link below to sign up for vps.net. http://www.vps.net/?bid=190aid=CD3792opt= If you want to use vps.net, by using the link to register you will be making a zero cost donation. -- Alejandro Fanjul Fdez. alex.fan...@gmail.com www.mhproject.org -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] web2py production deployment on vps.net (VIDEO)
Of course you dont avoid the selfcertificate warning El 24/03/2010 1:46, Alex Fanjul escribió: Massimo, If Im not wrong you should put your real hostname (myvps.example.com) in the Common Name field of the selfsign certificate to avoid certificate errors refering to incorrect domain certificate association alex El 23/03/2010 16:49, mdipierro escribió: The video: http://vimeo.com/10377947 Please use this link below to sign up for vps.net. http://www.vps.net/?bid=190aid=CD3792opt= If you want to use vps.net, by using the link to register you will be making a zero cost donation. -- Alejandro Fanjul Fdez. alex.fan...@gmail.com www.mhproject.org -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] web2py production deployment on vps.net (VIDEO)
The video is great and the deployment process is braindead simple. Awesome. Thanks! :) Keep up the good work. Tiago - On Tue, Mar 23, 2010 at 3:49 PM, mdipierro mdipie...@cs.depaul.edu wrote: The video: http://vimeo.com/10377947 Please use this link below to sign up for vps.net. http://www.vps.net/?bid=190aid=CD3792opt= If you want to use vps.net, by using the link to register you will be making a zero cost donation. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.comweb2py%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] web2py production deployment on vps.net (VIDEO)
On Tue, Mar 23, 2010 at 12:49, mdipierro mdipie...@cs.depaul.edu wrote: The video: http://vimeo.com/10377947 Please use this link below to sign up for vps.net. http://www.vps.net/?bid=190aid=CD3792opt= If you want to use vps.net, by using the link to register you will be making a zero cost donation. Cool, thanks! I'm working on some ways to deploy apps when web2py environment is just working on the server. Things like: 0- I push from my Mercurial local repo to my server 1- My server run all tests in my app (yes, TDD[1] and continuous integration[2] are very important). 2- If all tests returned OK it updates the app that is in production, do database migrations (note that we generally use migrate=False for production environments) etc. [1] http://en.wikipedia.org/wiki/Test-driven_development [2] http://en.wikipedia.org/wiki/Continuous_integration -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- Álvaro Justen - Turicas http://blog.justen.eng.br/ 21 9898-0141 -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: clueless about db insert: IntegrityError: participant.type may not be NULL
On Mar 23, 5:49 pm, Sven svenstrin...@gmail.com wrote: Thanks! Adding the field as invisible works. But I prefer to dump - drop - create - restore approach. After fiddling around I have two questions about that though 1) Why can I see the db object with corresponding tables in shell, but not access the database behind it? (ProgrammingError: Cannot operate on a closed database.) I assume either my admin or my application is locking it. But why would it do that if no transactions are going on? It is a known bug with web based shell. Will from from console based shell. 2) In added tot the end of db.py: for table in db.tables: db[table].drop() The sql.log shows that most of the tables are indeed dropped (and recreated in next request ). But two of my tables are not dropped and no mention is made in sql.log. (no other error messages either) db.tables in shell shows which tables remained: ['auth_group', 'auth_permission', 'participant', 'svo_answer'] So my question becomes how do I get rid of the 'participant' and 'svo_answer' tables using web2py (both shell and application)? mmm. make sure you drop in the order they are references. If you still have a problem, let me know. Thanks again. Sven On Mar 23, 7:39 am, mdipierro mdipie...@cs.depaul.edu wrote: Because you used sqlite and your made the field type as notnull=True. sqlite does not support ALTER TABLE DROP COLUMN so the field is still there. I suggest you dump the dump the db, recerate it and restore the dump or add the field again as invisible (not sure if this will work, give it a try): Field('type',default='',writable=False,readable=False) On Mar 23, 6:16 am, Sven svenstrin...@gmail.com wrote: Hi, I am new to web2py and really like it so far. I just ran into trouble though, and can't find the solution myself. The error message is: IntegrityError: participant.type may not be NULL as a result of calling: db.participant.insert(unique_ref=ref, batch_type=session.batch_type, batch_name=session.batch_name) I have defined a table 'participants' and 'type' used to be one of its fields. However, I changed the definition and the field is now called 'batch_type'. Since there is currently no 'participant.type' in my code, why does it show up in the error message? I hope someone has a suggestion. Thanks . Sven -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Displaying Foreign Key
No joins on gae. On Mar 23, 6:12 pm, Al albertsec...@gmail.com wrote: Would this work in GAE which does not handle table join? or the DAL automatically handle this for you? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Survey: Functionality of the Drop Boxes widget
Fixed text cannot be set by default, because default is set outside the app and therefore would not be internationalized. On Mar 23, 7:24 pm, Alex Fanjul alex.fan...@gmail.com wrote: Sorry, maybe I come late, but the best default option for me is: Please choose an option at the first place, with null or empty value associate. Even better if we can customize the text like: Please choose your country, Please choose your gender, etc. Of course we should be able to validate it... with a required (or not) option. I think this is the standard on Internet. Alex El 22/03/2010 4:06, Thadeus Burgess escribi : There is current on-going discussion of the default functionality of the drop boxes widget. This is an attempt to gather information from the community on this discussion. The results of this survey will determine what this default functionality will be. Here is the comparison of the two options currently being considered. zero= This is when a drop box is rendered, there is an empty OPTION tag rendered in the first that is selected. zero=None This is when only the options in the list are rendered. The first option in the list is selected. https://spreadsheets.google.com/viewform?formkey=dE9jS1VHSWdyd08xX2x6... Thank You, -Thadeus -- Alejandro Fanjul Fdez. alex.fan...@gmail.comwww.mhproject.org -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Python 2.4 compatibility issues
Are we aiming to be 2.4 compatible? There are several more problems that I've found but I won't worry about it if not. On Mar 23, 6:41 pm, mr.freeze nat...@freezable.com wrote: On python 2.4, I had to make these changes to tools.py to get web2py running: line 2562: Before: data = data if data is None else urllib.urlencode(data) After: if data !=None: data = urllib.urlencode(data) line 2571: Before: method = urlfetch.GET if data is None else urlfetch.POST After: method = urlfetch.POST if data == None: method = urlfetch.GET It seems to work after that. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] using syslog from a web2py app
I'd like to use syslog http://docs.python.org/library/syslog.html from my app. However, it's a .so on my system, so I can't see what it is and how it works, exactly. So my question is: If I open syslog and use it, and don't close it, will it get closed when my controller exits and the object is (presumably) destroyed? A related question: is there a hook by which I can guarantee to get called at the end of a controller transaction? Or does that even make sense? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Python 2.4 compatibility issues
Yes. Please report them. This was tested once but somethink may have slipped is with patches On Mar 23, 10:01 pm, mr.freeze nat...@freezable.com wrote: Are we aiming to be 2.4 compatible? There are several more problems that I've found but I won't worry about it if not. On Mar 23, 6:41 pm, mr.freeze nat...@freezable.com wrote: On python 2.4, I had to make these changes to tools.py to get web2py running: line 2562: Before: data = data if data is None else urllib.urlencode(data) After: if data !=None: data = urllib.urlencode(data) line 2571: Before: method = urlfetch.GET if data is None else urlfetch.POST After: method = urlfetch.POST if data == None: method = urlfetch.GET It seems to work after that. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: using syslog from a web2py app
You can redefine response._caller= lambda a: a() but that only wraps controllers, not views. On Mar 23, 10:07 pm, Jonathan Lundell jlund...@pobox.com wrote: I'd like to use syslog http://docs.python.org/library/syslog.html from my app. However, it's a .so on my system, so I can't see what it is and how it works, exactly. So my question is: If I open syslog and use it, and don't close it, will it get closed when my controller exits and the object is (presumably) destroyed? A related question: is there a hook by which I can guarantee to get called at the end of a controller transaction? Or does that even make sense? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Python 2.4 compatibility issues
In appadmin.html line 75 change this: {{cond = '!=' if table[fieldname].type in ['string','text'] else '0'}} to this: {{cond = '0'}} {{if table[fieldname].type in ['string','text']:}} {{cond = '!='}} {{pass}} line 95 do the same thing. On Mar 23, 10:10 pm, mdipierro mdipie...@cs.depaul.edu wrote: Yes. Please report them. This was tested once but somethink may have slipped is with patches On Mar 23, 10:01 pm, mr.freeze nat...@freezable.com wrote: Are we aiming to be 2.4 compatible? There are several more problems that I've found but I won't worry about it if not. On Mar 23, 6:41 pm, mr.freeze nat...@freezable.com wrote: On python 2.4, I had to make these changes to tools.py to get web2py running: line 2562: Before: data = data if data is None else urllib.urlencode(data) After: if data !=None: data = urllib.urlencode(data) line 2571: Before: method = urlfetch.GET if data is None else urlfetch.POST After: method = urlfetch.POST if data == None: method = urlfetch.GET It seems to work after that. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Python 2.4 compatibility issues
fixed On Mar 23, 10:26 pm, mr.freeze nat...@freezable.com wrote: In appadmin.html line 75 change this: {{cond = '!=' if table[fieldname].type in ['string','text'] else '0'}} to this: {{cond = '0'}} {{if table[fieldname].type in ['string','text']:}} {{cond = '!='}} {{pass}} line 95 do the same thing. On Mar 23, 10:10 pm, mdipierro mdipie...@cs.depaul.edu wrote: Yes. Please report them. This was tested once but somethink may have slipped is with patches On Mar 23, 10:01 pm, mr.freeze nat...@freezable.com wrote: Are we aiming to be 2.4 compatible? There are several more problems that I've found but I won't worry about it if not. On Mar 23, 6:41 pm, mr.freeze nat...@freezable.com wrote: On python 2.4, I had to make these changes to tools.py to get web2py running: line 2562: Before: data = data if data is None else urllib.urlencode(data) After: if data !=None: data = urllib.urlencode(data) line 2571: Before: method = urlfetch.GET if data is None else urlfetch.POST After: method = urlfetch.POST if data == None: method = urlfetch.GET It seems to work after that. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] book chapters
If you make a major contribution to the book (like a new section), you should sign it with your name. This is because if I incorporate the chapter in a future printed version, I will want to acknowledge your contribution. The changelog may give me your email address but not the name you want me to use in the acknowledgment. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.