[web2py] ajax and FieldStorage
Hi all, I am using ubuntu and chrome. When I pass as ajax param the vale of a input['file'] tag I obtain not a FieldStorage object in request.vars.filepath, but the string C: \fakepath\websys.py that isn't the real directory of file How can I get Fieldstorage object with filename and file stream? Thanks in advance. leone
[web2py] ajax and redirect
Hi all, how can I use redirect() inside a ajax callback? Thanks in advance leone
[web2py] Re: Selecting a few latest records
Ah got it, thanks =) Missed that bit. On Nov 13, 8:40 pm, villas villa...@gmail.com wrote: Hi Ruiwen, See also 'orderby' in the book. Do something like this: db().select(db.person.ALL, orderby=~db.yourtable.created_date, limitby=(0, 15)) Don't overlook the tilde (~), this is important because it makes reverse order i.e. latest dates first -D On Nov 13, 10:10 am, Ruiwen Chua rwc...@gmail.com wrote: Hi, I have a table full of records and would like to retrieve only the 15 most recent records, sorted by their creation date. I've tried using the limitby= argument to select() in the DAL, but the online book only shows one example that uses limitby to select 2 records starting from 0, ie. limitby=(0,2). However, if I'd like to select the 15 most recent records, the database offset most likely isn't going to be 0. What should I pass to limitby in this case? //Ruiwen
[web2py] web2py Version 1.89.1 bug?
Hi, I have now installed web2py Version 1.89.1. From /admin/default/index it return Internal error Ticket issued: admin/ 127.0.0.1.2010-11-14.10-27-16.28da5829-363a-47d4-8295-814808f71b52 It is impossible to open ticket, that calls another ticket in deadlock loop. (ubuntu os)
[web2py] Re: crud settings
Thanks. I must be more trusted in web2py! On Nov 12, 3:16 pm, mdipierro mdipie...@cs.depaul.edu wrote: crud.settings.update_next = URL(c=request,f='select') should be crud.settings.update_next = URL(r=request,f='select') or crud.settings.update_next = URL('select') On Nov 12, 6:52 am, leone handja...@gmail.com wrote: Hi, peraphs a bias in def mycontroller(): crud.settings.update_next = URL(c=request,f='select') return dict(crud=crud.update(db.balance, request.args(0))) that redirect to: http://.../../Storage%20{'function':%20'update',%20'body':%20cStringIO.StringO%20object %20at%200x9ea60e0,%20'wsgi':%20Storage%20{'start_response':%20function%2 0lambda%20at%200x9f890d4,%20'middleware':%20function%20lambda%20at%20 0x9f8910c,%20'environ':%20{'wsgi.multiprocess':%20False,%20'HTTP_COOKIE':% 20'rootCA= Bye leone
[web2py] Re: web2py Version 1.89.1 bug?
Restart the Web2py server. -D On Nov 14, 9:36 am, leone handja...@gmail.com wrote: Hi, I have now installed web2py Version 1.89.1. From /admin/default/index it return Internal error Ticket issued: admin/ 127.0.0.1.2010-11-14.10-27-16.28da5829-363a-47d4-8295-814808f71b52 It is impossible to open ticket, that calls another ticket in deadlock loop. (ubuntu os)
Re: [web2py] Re: Discussion: Why is web2py bad for large deployments?
On Sun, Nov 14, 2010 at 1:44 AM, b00m_chef r...@devshell.org wrote: Let me just say that the chance that your app will have the traffic of facebook or twitter or even livejournal (yes it is still alive) is so small, that you really don't need to worry about it too much at such an early stage. True. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
[web2py] Re: Discussion: Why is web2py bad for large deployments?
+1 Totally agree with that. Speed is a luxary problem - concentrate on making an awesome app, not a fast one. On Nov 14, 1:44 am, b00m_chef r...@devshell.org wrote: Let me just say that the chance that your app will have the traffic of facebook or twitter or even livejournal (yes it is still alive) is so small, that you really don't need to worry about it too much at such an early stage. On Nov 13, 3:11 pm, Branko Vukelic bg.bra...@gmail.com wrote: On Sat, Nov 13, 2010 at 9:49 PM, Jason Brower encomp...@gmail.com wrote: These are encouraging. In large deployment I mean it in the most external sense of it. Facebook is big, myspace is big, those kinds of object were what I was aiming for. And For that kind of large deployment, you'll probably hit the limitation of the Python programming language sooner or later, too. Erlang seems to have become quite popular lately and even Facebook uses it for some backend stuff. The main reason is out-of-box concurrency, and great reliability under load which comes from supervisor-worker setup that is built-in. A good example of what this means is Yaws http server which is virtually impossible to kill even if you bombard it with a huge (as in MUCH more than http server X) number of concurrent requests. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guildhttp://bit.ly/gbg-group
Re: [web2py] Re: Discussion: Why is web2py bad for large deployments?
And I wonder.. in large large large deployments: I suppose we should use distributed deployment as GAE, EC2.. or run on our servers APPScale, typhoonae, eucalyptus. I know we are not talking about the same, but there's related with that. On Sun, Nov 14, 2010 at 11:38 AM, Branko Vukelic bg.bra...@gmail.comwrote: On Sun, Nov 14, 2010 at 1:44 AM, b00m_chef r...@devshell.org wrote: Let me just say that the chance that your app will have the traffic of facebook or twitter or even livejournal (yes it is still alive) is so small, that you really don't need to worry about it too much at such an early stage. True. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
[web2py] Re: app uses SQLite but needs to also connect to MSSQL as well
Hi Mart, No problem, you can define a second connection, say db_ms, that connects to your ms sql database. And then query and insert across databases. Nico On 14 nov, 07:30, mart msenecal...@gmail.com wrote: Hi, So, application build system uses SQLite for most current and future software builds. But would also like the application to connect to an MSSQL which which hosts legacy software builds. The legacy builds will continue to be used and even updated for some time, so daily updates would need to be caught as well. SO, the requirement is to build the older builds with the new build systems, but without changing anything on the older legacy side. Suggestions? Would I be able with web2py to do some context switching? I.e query MSSQL DB, grab some data, then store that in the newly generated tables of an SQLite db, then begin as normal. Or, i'm thinking it would be better to replicate/convert the MSSQL DB to SQLite (with daily updates) Would the DAL support that kind of activity ? The optimal scenario is that the the build system owns that activity which use the DAL with web2py ad also as Stand ALone Again, any help or direction would be much appreciated. Thanks Mart :)
Re: [web2py] Re: Idea on web2py wizard
Hello, On Sun, Nov 14, 2010 at 2:11 AM, mdipierro mdipie...@cs.depaul.edu wrote: I do not remember the reason for that suggestion. My only concerns are: 1) I would be best to have just one verison online (the most updated one) even if hosted at multiple places. You can host it by yourself or reuse mine at already mentioned location (it is hosted on gae). Attached application can be deployed to GAE directly after adding corresponding route files 2) not break the link in web2py admin (or make a case for changing the link). Are you Boris the only one maintaining sqldesigner or are there mutliple forks? Massimo My web2py code is just used for saving results of working with www sql designer ( http://code.google.com/p/wwwsqldesigner/ ) nothing more than that, and as i already pushed my changes to upstream ( to www sql designer ) year ago, there is nothing to maintain really on my side. Boris On Nov 13, 6:06 pm, Boris Manojlovic boris.manojlo...@gmail.com wrote: Hello all, For some reason Massimo decided it is much better to redirect from my version athttp://designer.bojanka.net/to older code base but ok that is his call... Anyway for others who would like really working designer application (local) please use attached application and follow steps when first run. As usual i did not change anything in javascript application except config.js (pristine www sql designer as can it be) my stuff really is in models/db.py, controllers/default.py and routes.py* Please when adding this application call it sqldesigner if you don't wanna change anything in code provided. If you decide name is stupid or something else look in both routes.py to fix name of application and same in controllers/default.py Boris On Sun, Nov 14, 2010 at 12:07 AM, Anthony abasta...@gmail.com wrote: On Nov 13, 5:18 pm, blackthorne francisco@gmail.com wrote: Or else, just integrate the SQL designer inhttp:// gaesql.appspot.com/ for the job. I think it's even better for this kind of thing... Hmm, I notice it still uses SQLField in web2py table definitions instead of Field. -- Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein web2py.app.sqldesigner.w2p 237KViewDownload -- Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
Re: [web2py] Re: Discussion: Why is web2py bad for large deployments?
A good advise, but, not always possible. I am considering to migrate an App in the range of 70-100 tables to web2py and there are tables that are like pillars, belong to several groups (customers, employees, projects,...) How we could manage this shared tables? Also sometimes its hard to determine an order for the tables to avoid referencing a still undefined table. There is another type of large applications, enterprise level with hundreds or thousands of tables. The approach of multiples apps sharing same database is useful, but how could we solve the division of tables in apps, is it better to define the model in one place and import the required tables on the apps? Jose. 2010/11/14 mdipierro mdipie...@cs.depaul.edu I agree that there are things we can improve in web2py. Yet, if a complex application have many pieces that are untangled, the import mechanism does not necessarily help you. The solution is trying to design components that are relatively independent. If you can do this, web2py does not bet in the way. For example, you have 100 tables functionally grouped in ~10 and all they need to share is authentication, you may want to separate the functions in 10 different web2py applications (all sharing one database, each defining only the tables it needs, and sharing one session cookie). This modular design solves lots of problems. I have heard of people who have developed complex applications in Django (which uses the import you suggest) and run into problems because they were using more ram than needed since all modules were always imported. In web2py controllers are executed only when called and if you make many small controllers you save lots of memory. Controllers than then import the modules they need and only those. Massimo On Nov 13, 7:28 pm, Thadeus Burgess thade...@thadeusb.com wrote: The biggest contributing factor is that web2py is executed and not import. The coder must always be sure to align objects and database in the correct order, including any auxiliary functions, class mappings, queries. He/she has to worry about the order of everything. Sometimes you can't have such order for complex systems. I think an import based system solves this in that the import statements declare the order instead of the physical location of the code doing that. -- Thadeus On Sat, Nov 13, 2010 at 2:49 PM, Jason Brower encomp...@gmail.com wrote: These are encouraging. In large deployment I mean it in the most external sense of it. Facebook is big, myspace is big, those kinds of object were what I was aiming for. And with Massimo's comment about the database size. I think your right, the framework does become less relavent. In what ways in a large codebase making web2py code messier and is there a solution to it in another framework? BR, J On Sat, 2010-11-13 at 11:48 -0600, Thadeus Burgess wrote: What is large deployment? Is it a large codebase that you must manage for an internal dashbaord, or just alot of users/database io that needs to scale out for worldwide access? If its the first case, web2py can get really complicated in dealing with lots of models and difficult to manage in an efficient manner. The larger your codebase the messier web2py apps will become. In the end, this would ultimately be up to the preferences of you and your team and what your willing to put up with. In the second case, framework hardly matters at that point. Disqus uses django, facebook uses php, reddit uses pylons, myspace uses coldfusion, microsoft uses asp, oracle uses java. Its always the database that becomes an issue regardless of programming language or web framework. -- Thadeus On Sat, Nov 13, 2010 at 10:53 AM, mdipierro mdipie...@cs.depaul.edu wrote: I agree with Villas. The larger the development the more the database becomes the bottleneck and the framework irrelevant. Massimo On Nov 13, 8:35 am, villas villa...@gmail.com wrote: Hi Jason I guess you have to define 'large deployment' first of all. Number of records and size of DB? Number of concurrent users? Large data model or number of forms etc? Number of servers -- or replication? Global coverage? In principle I don't think there's any reason why Web2py would be worse than other frameworks. Usually it is much better! As an example, I think deploying to the Google App Engine should be able to scale sufficiently for everything but extreme cases :) If you specify more about what you wish to achieve this group may be able to give more specific advice how best to organise your project. -D On Nov 13, 7:12 am, Jason Brower encomp...@gmail.com wrote: I love web2py and it's the only framework i feel i am fully capable to do or learn to do quickly. However, I remember see that this framework is intended for
Re: [web2py] Re: Discussion: Why is web2py bad for large deployments?
2010/11/14 José Ignacio Hurtado jose.i.hurt...@gmail.com: A good advise, but, not always possible. I am considering to migrate an App in the range of 70-100 tables to web2py and there are tables that are like I thought it would become obvious by now that you cannot _keep your existing architecture_ if your app hits the limits of scalability of _that_ architecture... -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
Re: [web2py] Re: Discussion: Why is web2py bad for large deployments?
On Sun, Nov 14, 2010 at 1:51 PM, Branko Vukelic bg.bra...@gmail.com wrote: 2010/11/14 José Ignacio Hurtado jose.i.hurt...@gmail.com: A good advise, but, not always possible. I am considering to migrate an App in the range of 70-100 tables to web2py and there are tables that are like I thought it would become obvious by now that you cannot _keep your existing architecture_ if your app hits the limits of scalability of _that_ architecture... Substitute architecture with design (or whatever you find more fitting) if my hobbyist terminology is not correct. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
Re: [web2py] Re: Idea on web2py wizard
On Sun, Nov 14, 2010 at 1:20 PM, Boris Manojlovic boris.manojlo...@gmail.com wrote: You can host it by yourself or reuse mine at already mentioned location (it is hosted on gae). Attached application can be deployed to GAE directly after adding corresponding route files Couldn't it just be included in the distribution if it's a separate w2p app? The admin interface could detect the presence of the app and offer the button then. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
Re: [web2py] Re: Discussion: Why is web2py bad for large deployments?
I was trying to make a point and talk about boundaries of web2py and large applications, or better, applications with large models. I see the limits of scalability way far ;) 2010/11/14 Branko Vukelic bg.bra...@gmail.com On Sun, Nov 14, 2010 at 1:51 PM, Branko Vukelic bg.bra...@gmail.com wrote: 2010/11/14 José Ignacio Hurtado jose.i.hurt...@gmail.com: A good advise, but, not always possible. I am considering to migrate an App in the range of 70-100 tables to web2py and there are tables that are like I thought it would become obvious by now that you cannot _keep your existing architecture_ if your app hits the limits of scalability of _that_ architecture... Substitute architecture with design (or whatever you find more fitting) if my hobbyist terminology is not correct. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group -- Un saludo, José Ignacio Hurtado López
Re: [web2py] Re: Discussion: Why is web2py bad for large deployments?
A good advise, but, not always possible. I am considering to migrate an App in the range of 70-100 tables to web2py and there are tables that are like pillars, belong to several groups (customers, employees, projects,...) How we could manage this shared tables? Also sometimes its hard to determine an order for the tables to avoid referencing a still undefined table. There is another type of large applications, enterprise level with hundreds or thousands of tables. The approach of multiples apps sharing same database is useful, but how could we solve the division of tables in apps, is it better to define the model in one place and import the required tables on the apps? This is why I prefer Flask + SQLAlchemy. -- Thadeus 2010/11/14 José Ignacio Hurtado jose.i.hurt...@gmail.com A good advise, but, not always possible. I am considering to migrate an App in the range of 70-100 tables to web2py and there are tables that are like pillars, belong to several groups (customers, employees, projects,...) How we could manage this shared tables? Also sometimes its hard to determine an order for the tables to avoid referencing a still undefined table. There is another type of large applications, enterprise level with hundreds or thousands of tables. The approach of multiples apps sharing same database is useful, but how could we solve the division of tables in apps, is it better to define the model in one place and import the required tables on the apps? Jose. 2010/11/14 mdipierro mdipie...@cs.depaul.edu I agree that there are things we can improve in web2py. Yet, if a complex application have many pieces that are untangled, the import mechanism does not necessarily help you. The solution is trying to design components that are relatively independent. If you can do this, web2py does not bet in the way. For example, you have 100 tables functionally grouped in ~10 and all they need to share is authentication, you may want to separate the functions in 10 different web2py applications (all sharing one database, each defining only the tables it needs, and sharing one session cookie). This modular design solves lots of problems. I have heard of people who have developed complex applications in Django (which uses the import you suggest) and run into problems because they were using more ram than needed since all modules were always imported. In web2py controllers are executed only when called and if you make many small controllers you save lots of memory. Controllers than then import the modules they need and only those. Massimo On Nov 13, 7:28 pm, Thadeus Burgess thade...@thadeusb.com wrote: The biggest contributing factor is that web2py is executed and not import. The coder must always be sure to align objects and database in the correct order, including any auxiliary functions, class mappings, queries. He/she has to worry about the order of everything. Sometimes you can't have such order for complex systems. I think an import based system solves this in that the import statements declare the order instead of the physical location of the code doing that. -- Thadeus On Sat, Nov 13, 2010 at 2:49 PM, Jason Brower encomp...@gmail.com wrote: These are encouraging. In large deployment I mean it in the most external sense of it. Facebook is big, myspace is big, those kinds of object were what I was aiming for. And with Massimo's comment about the database size. I think your right, the framework does become less relavent. In what ways in a large codebase making web2py code messier and is there a solution to it in another framework? BR, J On Sat, 2010-11-13 at 11:48 -0600, Thadeus Burgess wrote: What is large deployment? Is it a large codebase that you must manage for an internal dashbaord, or just alot of users/database io that needs to scale out for worldwide access? If its the first case, web2py can get really complicated in dealing with lots of models and difficult to manage in an efficient manner. The larger your codebase the messier web2py apps will become. In the end, this would ultimately be up to the preferences of you and your team and what your willing to put up with. In the second case, framework hardly matters at that point. Disqus uses django, facebook uses php, reddit uses pylons, myspace uses coldfusion, microsoft uses asp, oracle uses java. Its always the database that becomes an issue regardless of programming language or web framework. -- Thadeus On Sat, Nov 13, 2010 at 10:53 AM, mdipierro mdipie...@cs.depaul.edu wrote: I agree with Villas. The larger the development the more the database becomes the bottleneck and the framework irrelevant. Massimo On Nov 13, 8:35 am, villas villa...@gmail.com wrote: Hi Jason I guess you have to define 'large deployment' first of all. Number of records and size
Re: [web2py] Re: ajax and redirect
On Nov 14, 2010, at 8:31 AM, leone wrote: Right, i must be more specific. I have javascript code that call back (by ajax) a controller function in which i compute variables sent from ajax and i redirect forward a new address with args. Python code is simple but doesn't redirect using redirect(URL(...)). Is it possible redirect from python code (raising something), or i must return back to javascript? I think you need to return the new URL to javascript (as the return value of the Ajax call) and let javascript do the redirection. If I understand your description, the redirection is being returned as the response to the Ajax call; the browser doesn't see it as a request to load a new page into the window unless javascript tells it to. Thanks. On Nov 14, 4:34 pm, qqsaqq sla...@gmx.net wrote: I assume you mean a redirect from within the browser, after recieving the ajax response and evaluating the retrieved data. In that case you must set the window.location object in your javascript. In the view you could do smthg like that: script //... your callback code here window.location.href = {{=URL(way2go.html)}}; /script On 14 Nov., 10:23, leone handja...@gmail.com wrote: Hi all, how can I use redirect() inside a ajax callback? Thanks in advance leone
[web2py] Re: ajax and FieldStorage
input file requires multipart forms. To use them via ajax you need this: http://jquery.malsup.com/form/ On Nov 14, 2:59 am, leone handja...@gmail.com wrote: Hi all, I am using ubuntu and chrome. When I pass as ajax param the vale of a input['file'] tag I obtain not a FieldStorage object in request.vars.filepath, but the string C: \fakepath\websys.py that isn't the real directory of file How can I get Fieldstorage object with filename and file stream? Thanks in advance. leone
[web2py] Re: app uses SQLite but needs to also connect to MSSQL as well
connect to mssql db.export_to_csv_file(file) change uri to connect to sqlite db.import_from_csv_file(file) Should work On Nov 14, 8:54 am, mart msenecal...@gmail.com wrote: I guess another question, is ... does the DAL support migrating the MSSQL DB (MS SQL server 2005) to SQLite? Thanks Mart :) On Nov 14, 9:37 am, mart msenecal...@gmail.com wrote: sounds easy enough then :) I think I equated something I configured wrong to something not supported. SO, will do the second connection as you suggest. Thanks for the reply :) Mart On Nov 14, 6:28 am, Nico de Groot ndegr...@chello.nl wrote: Hi Mart, No problem, you can define a second connection, say db_ms, that connects to your ms sql database. And then query and insert across databases. Nico On 14 nov, 07:30, mart msenecal...@gmail.com wrote: Hi, So, application build system uses SQLite for most current and future software builds. But would also like the application to connect to an MSSQL which which hosts legacy software builds. The legacy builds will continue to be used and even updated for some time, so daily updates would need to be caught as well. SO, the requirement is to build the older builds with the new build systems, but without changing anything on the older legacy side. Suggestions? Would I be able with web2py to do some context switching? I.e query MSSQL DB, grab some data, then store that in the newly generated tables of an SQLite db, then begin as normal. Or, i'm thinking it would be better to replicate/convert the MSSQL DB to SQLite (with daily updates) Would the DAL support that kind of activity ? The optimal scenario is that the the build system owns that activity which use the DAL with web2py ad also as Stand ALone Again, any help or direction would be much appreciated. Thanks Mart :)
[web2py] Re: Discussion: Why is web2py bad for large deployments?
Nothing prevents you in web2py to create a modules/models/mymodel.py then import applications.yourapp/modules/models.mymodel.py and then call a function in there that defines the tables you need. And you can have more than one mymodel. This anyway will be easy if we add support for lazy tables and thread local globals. On Nov 14, 10:36 am, Thadeus Burgess thade...@thadeusb.com wrote: A good advise, but, not always possible. I am considering to migrate an App in the range of 70-100 tables to web2py and there are tables that are like pillars, belong to several groups (customers, employees, projects,...) How we could manage this shared tables? Also sometimes its hard to determine an order for the tables to avoid referencing a still undefined table. There is another type of large applications, enterprise level with hundreds or thousands of tables. The approach of multiples apps sharing same database is useful, but how could we solve the division of tables in apps, is it better to define the model in one place and import the required tables on the apps? This is why I prefer Flask + SQLAlchemy. -- Thadeus 2010/11/14 José Ignacio Hurtado jose.i.hurt...@gmail.com A good advise, but, not always possible. I am considering to migrate an App in the range of 70-100 tables to web2py and there are tables that are like pillars, belong to several groups (customers, employees, projects,...) How we could manage this shared tables? Also sometimes its hard to determine an order for the tables to avoid referencing a still undefined table. There is another type of large applications, enterprise level with hundreds or thousands of tables. The approach of multiples apps sharing same database is useful, but how could we solve the division of tables in apps, is it better to define the model in one place and import the required tables on the apps? Jose. 2010/11/14 mdipierro mdipie...@cs.depaul.edu I agree that there are things we can improve in web2py. Yet, if a complex application have many pieces that are untangled, the import mechanism does not necessarily help you. The solution is trying to design components that are relatively independent. If you can do this, web2py does not bet in the way. For example, you have 100 tables functionally grouped in ~10 and all they need to share is authentication, you may want to separate the functions in 10 different web2py applications (all sharing one database, each defining only the tables it needs, and sharing one session cookie). This modular design solves lots of problems. I have heard of people who have developed complex applications in Django (which uses the import you suggest) and run into problems because they were using more ram than needed since all modules were always imported. In web2py controllers are executed only when called and if you make many small controllers you save lots of memory. Controllers than then import the modules they need and only those. Massimo On Nov 13, 7:28 pm, Thadeus Burgess thade...@thadeusb.com wrote: The biggest contributing factor is that web2py is executed and not import. The coder must always be sure to align objects and database in the correct order, including any auxiliary functions, class mappings, queries. He/she has to worry about the order of everything. Sometimes you can't have such order for complex systems. I think an import based system solves this in that the import statements declare the order instead of the physical location of the code doing that. -- Thadeus On Sat, Nov 13, 2010 at 2:49 PM, Jason Brower encomp...@gmail.com wrote: These are encouraging. In large deployment I mean it in the most external sense of it. Facebook is big, myspace is big, those kinds of object were what I was aiming for. And with Massimo's comment about the database size. I think your right, the framework does become less relavent. In what ways in a large codebase making web2py code messier and is there a solution to it in another framework? BR, J On Sat, 2010-11-13 at 11:48 -0600, Thadeus Burgess wrote: What is large deployment? Is it a large codebase that you must manage for an internal dashbaord, or just alot of users/database io that needs to scale out for worldwide access? If its the first case, web2py can get really complicated in dealing with lots of models and difficult to manage in an efficient manner. The larger your codebase the messier web2py apps will become. In the end, this would ultimately be up to the preferences of you and your team and what your willing to put up with. In the second case, framework hardly matters at that point. Disqus uses django, facebook uses php, reddit uses pylons, myspace uses coldfusion, microsoft uses asp, oracle uses java. Its always the database that becomes
[web2py] Re: ajax and redirect
depends how you make the ajax callback. If you use LOAD() the redirect should work. If you use ajax(...,':eval') you can return document.location='%s' % URL(...) On Nov 14, 3:23 am, leone handja...@gmail.com wrote: Hi all, how can I use redirect() inside a ajax callback? Thanks in advance leone
[web2py] Re: Cookie stealing attack
Well, I'm afraid all the solutions you gave, though seem reasonable, won't solve the scenerio I talked about. The problem is with the face the session won't change on login (so I can just get into the website, before someone else does, copy the session data, and then wait for him to log in). On Nov 13, 1:38 am, mdipierro mdipie...@cs.depaul.edu wrote: There are two things you can do. 1) session.secure() # will force session over https 2) call auth.logout() to delete all auth information from the session (this will not change the session cookie) 3) auth.settings.logout_onlogout=lambda user: os.unlink(response.session_filename) This will delete the session and will force a new session cookie next request. On Nov 12, 4:42 pm, guruyaya guruy...@gmail.com wrote: I've inspected web2py cookies, and I think I'm on to a problem. Say, I'm going into a public internet cafe. I'm getting into a web2py websute, that use the default auth. I'm looking at the cookie data, saving it then, I'm sitting in the next chair, and some other guy goes to the same website, and logs in. At this point - the cookie didn't change. And as we're both behind firewall, we also have the same IP,so I can easly implant the logged in session, into my browser, and do horrible, and unspeakable things on his behalf. Is there a way to force new session, once a use is logged in? This way, I can be sure no cookie is stolen. Yair
[web2py] Re: web2py 1.89.1 is OUT
I installed a modified version of timeentry instead of timepicker in trunk. It has less options, it is smaller, and has a more natural behaviour (in respect to tab and if you type a valid time, it will take it) Please give it a try and let us know if it works with your browser. Massimo On Nov 13, 11:32 pm, Christopher Steel chris.st...@gmail.com wrote: Hi Branko, LOL, At first glance I had the same reaction but I just checked out timeEntry's features and it looks like a excellent fit for the Web2py community. In addition it appears to be fairly easy to customize everything but drop downs (although this may be possible) Now I love it... Good Web2py Fit Features: * Internationalization / Regionalhttp://keith-wood.name/timeEntry.html#l10nPkgs * Highly Customizable / CSS / The tooltip text for the spinner buttons. * 24:00 or 12:00 clock and so on * Many other customizations * Excellent keyboard navigation features * Highly compact (mobiles, iphone, other small screen devices) * Actively developed * GPL and MIT licences * jQuery I would agree that the spinner (control) is is not my fav, I would probably customize it for Web2py which I think would would take a lot less time than creating an old style drop down system with features that will work for Web2py users everywhere. Features:http://keith-wood.name/timeEntryRef.html# Config:http://keith-wood.name/timeEntryRef.html# Chris On Nov 13, 12:06 pm, Branko Vukelic bg.bra...@gmail.com wrote: Oh, noes! This widget suffers from so many usability issues I can't believe it still exists.
[web2py] Re: web2py 1.89.1 is OUT
P.S. I also removed the spinner and mouse wheel support. I hate the spinner. On Nov 14, 11:57 am, mdipierro mdipie...@cs.depaul.edu wrote: I installed a modified version of timeentry instead of timepicker in trunk. It has less options, it is smaller, and has a more natural behaviour (in respect to tab and if you type a valid time, it will take it) Please give it a try and let us know if it works with your browser. Massimo On Nov 13, 11:32 pm, Christopher Steel chris.st...@gmail.com wrote: Hi Branko, LOL, At first glance I had the same reaction but I just checked out timeEntry's features and it looks like a excellent fit for the Web2py community. In addition it appears to be fairly easy to customize everything but drop downs (although this may be possible) Now I love it... Good Web2py Fit Features: * Internationalization / Regionalhttp://keith-wood.name/timeEntry.html#l10nPkgs * Highly Customizable / CSS / The tooltip text for the spinner buttons. * 24:00 or 12:00 clock and so on * Many other customizations * Excellent keyboard navigation features * Highly compact (mobiles, iphone, other small screen devices) * Actively developed * GPL and MIT licences * jQuery I would agree that the spinner (control) is is not my fav, I would probably customize it for Web2py which I think would would take a lot less time than creating an old style drop down system with features that will work for Web2py users everywhere. Features:http://keith-wood.name/timeEntryRef.html# Config:http://keith-wood.name/timeEntryRef.html# Chris On Nov 13, 12:06 pm, Branko Vukelic bg.bra...@gmail.com wrote: Oh, noes! This widget suffers from so many usability issues I can't believe it still exists.
[web2py] Re: app uses SQLite but needs to also connect to MSSQL as well
great! was going through the book and had just spotted something looking like that:) thanks :) One issue though: have been trying to connect to the remote mssql db for a while, and not really getting anywhere :( any tips and tricks with that one? I'm on MAC OS, 10.6 installed pyodbc the MSSQL db sits on a remote server, and I am connected through VPN (although this shouldn't make a difference) then made the connection to look like this (not sure if I need the port number - but fails with or without): db = DAL(mssql://sa:passw...@build-control:1433/quickbuild) Thanks again and any suggestion will be much appreciated :) Mart On Nov 14, 12:19 pm, mdipierro mdipie...@cs.depaul.edu wrote: connect to mssql db.export_to_csv_file(file) change uri to connect to sqlite db.import_from_csv_file(file) Should work On Nov 14, 8:54 am, mart msenecal...@gmail.com wrote: I guess another question, is ... does the DAL support migrating the MSSQL DB (MS SQL server 2005) to SQLite? Thanks Mart :) On Nov 14, 9:37 am, mart msenecal...@gmail.com wrote: sounds easy enough then :) I think I equated something I configured wrong to something not supported. SO, will do the second connection as you suggest. Thanks for the reply :) Mart On Nov 14, 6:28 am, Nico de Groot ndegr...@chello.nl wrote: Hi Mart, No problem, you can define a second connection, say db_ms, that connects to your ms sql database. And then query and insert across databases. Nico On 14 nov, 07:30, mart msenecal...@gmail.com wrote: Hi, So, application build system uses SQLite for most current and future software builds. But would also like the application to connect to an MSSQL which which hosts legacy software builds. The legacy builds will continue to be used and even updated for some time, so daily updates would need to be caught as well. SO, the requirement is to build the older builds with the new build systems, but without changing anything on the older legacy side. Suggestions? Would I be able with web2py to do some context switching? I.e query MSSQL DB, grab some data, then store that in the newly generated tables of an SQLite db, then begin as normal. Or, i'm thinking it would be better to replicate/convert the MSSQL DB to SQLite (with daily updates) Would the DAL support that kind of activity ? The optimal scenario is that the the build system owns that activity which use the DAL with web2py ad also as Stand ALone Again, any help or direction would be much appreciated. Thanks Mart :)
[web2py] Re: ajax and redirect
Thanks, i understand. On Nov 14, 6:24 pm, mdipierro mdipie...@cs.depaul.edu wrote: depends how you make the ajax callback. If you use LOAD() the redirect should work. If you use ajax(...,':eval') you can return document.location='%s' % URL(...) On Nov 14, 3:23 am, leone handja...@gmail.com wrote: Hi all, how can I use redirect() inside a ajax callback? Thanks in advance leone
[web2py] Re: Cookie stealing attack
session.secure() does solve the problem since it forces the session over https and therefore it cannot be stolen. Even if the session were to be reset at login, without a https connection it can still be stolen after login. One solution is session.client=session.client or request.client if not session.client==request.client: raise HTTP(500,not authorized) On Nov 14, 11:37 am, guruyaya guruy...@gmail.com wrote: Well, I'm afraid all the solutions you gave, though seem reasonable, won't solve the scenerio I talked about. The problem is with the face the session won't change on login (so I can just get into the website, before someone else does, copy the session data, and then wait for him to log in). On Nov 13, 1:38 am, mdipierro mdipie...@cs.depaul.edu wrote: There are two things you can do. 1) session.secure() # will force session over https 2) call auth.logout() to delete all auth information from the session (this will not change the session cookie) 3) auth.settings.logout_onlogout=lambda user: os.unlink(response.session_filename) This will delete the session and will force a new session cookie next request. On Nov 12, 4:42 pm, guruyaya guruy...@gmail.com wrote: I've inspected web2py cookies, and I think I'm on to a problem. Say, I'm going into a public internet cafe. I'm getting into a web2py websute, that use the default auth. I'm looking at the cookie data, saving it then, I'm sitting in the next chair, and some other guy goes to the same website, and logs in. At this point - the cookie didn't change. And as we're both behind firewall, we also have the same IP,so I can easly implant the logged in session, into my browser, and do horrible, and unspeakable things on his behalf. Is there a way to force new session, once a use is logged in? This way, I can be sure no cookie is stolen. Yair
[web2py] Select with autocomplete
Is it possible to use the autocomplete widget on a select box where when someone clicks into the text field the dropdown with all the selections are available and then the user has the option to type and have the possible selections reduced? I have tried using the SQLFORM.widgets.autocomplete with min_length=0 and this kind of does what I want except that you have to start typing something to get the dropdown. I also tried the jquery autocomplete widget on web2pyslices, but couldn't get the result I wanted. I thought I had seen an answer to this in this group a while ago, but I haven't been able to find it so apologies if this has already been answered. Thanks in advance for any help. Sam
[web2py] is there a trick to install pyodbc on mac os?
Hi, there must be a trick maybe? I can connect using something razor, but unable with web2py Just hoping has an undocumented trick :) I am on MAC OS 10.6. this is the connection string: db = DAL(mssql://sa:passw...@build-control:1433/quickbuild) ran it through a debugger, and drilled down and followed through class MSSQLAdapter /def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8'): everything seems ok (I think). except maybe the following? urlargs is returning str: argpattern is returning an object (_sre.SRE_Pattern object at 0x100570750) but obviously no matches are found here while doing this: for argmatch in argpattern.finditer(urlargs): Is my connection string wrong, or is the driver not loaded correctly, or configured badly? Any help (again) would be appreciated (again), thanks, Mart :)
[web2py] Re: Select with autocomplete
as a test... leave min_lenght=0 and in gluon.sqlhtml.py after attr['_onkeyup'] = add attr['_onfocues'] = attr['_onkeyup'] (occurs in two places) Does it do what you ask? On Nov 14, 1:56 pm, oneroler samuel.ha...@gmail.com wrote: Is it possible to use the autocomplete widget on a select box where when someone clicks into the text field the dropdown with all the selections are available and then the user has the option to type and have the possible selections reduced? I have tried using the SQLFORM.widgets.autocomplete with min_length=0 and this kind of does what I want except that you have to start typing something to get the dropdown. I also tried the jquery autocomplete widget on web2pyslices, but couldn't get the result I wanted. I thought I had seen an answer to this in this group a while ago, but I haven't been able to find it so apologies if this has already been answered. Thanks in advance for any help. Sam
[web2py] Re: web2py organization - important for consultants !!!
We have a new layout. Thanks Branko. Some people have not uploaded a profile. You must upload one. About the picture. You must upload a picture of yourself in decent quality. An orange does not qualify. Massimo On Nov 12, 9:42 am, mdipierro mdipie...@cs.depaul.edu wrote: Thank you for all the reported corrections. I think I have incorporated them all. Please check. Branko is already at work for a better layout. Massimo On Nov 12, 4:06 am, Paul Gerrard p...@gerrardconsulting.com wrote: Here are my comments on the Guidelines page. Some of these are duplicates with other peoples' comments - but what the heck. --- is my suggestion ...Our choice of technologies is motivated but a belief in Rapid Application Development(RAD) ---by ...application. The occurrence of faled prototypes -failed ... A system analyst should be endowed with decision -systems ---granted ... It may compromise on aestetic issues and ---aesthetic ... evelopment, but, it is not as an --remove comma ... executing the full project project. ---remove repeated 'project'. ... we dare to say so and start again. add 'or withdraw from the project'? ... The business model behind FOSS is that --- define FOSS Use Open Standards and Interoprability Interoperability ... by the Europen Union in its European Interoperability Framework: add a link to the standard? Use Industry Standard Tehcnologies Technologies ... and it plays a singificantrole in the ---significant role ... therefore less wise-spread. This gives us an hedge vs our competitors. ---widespread ---edge over our competitors. ... Portability is crytical to maximize ---critical ... We build software is portable and can un efficienly on most computing Clouds. ---add 'that' ---run ... optimization may be specific of each individual cloud technologies --to A more general point: There's no mention of Agile approaches - surely we need to include that? Question: Do you register an interest by using the 'Contact Us' page? It's not clear, I'm afraid. I'm interested!
Re: [web2py] Re: web2py organization - important for consultants !!!
On Sun, Nov 14, 2010 at 10:20 PM, mdipierro mdipie...@cs.depaul.edu wrote: quality. An orange does not qualify. Unless you actually are an orange, obviously. :) -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
[web2py] Re: provide a development flag for applications II
On Nov 13, 11:33 pm, Christopher Steel chris.st...@gmail.com wrote: Works fine for me from the web2py shell: 1) install plugin 2) run the web2py shell:http://web2py.com/book/default/chapter/04?search=shell OR 3) run shell from browser: http://127.0.0.1:8000/admin/shell/index/yourapp 3) set the variable: _debug_on=True This does not seems easier than setting the variable somewhere in the model. What is the plug-in offering?
[web2py] Re: web2py organization - important for consultants !!!
What a great idea! I don't yet have the skills to join, but for now e4s will certainly have my moral support (maybe some casual proofreading, too ;-). For those of us not directly involved in e4s, I think it would still be interesting to hear what's going on from time to time, so hopefully there will be some occassional updates posted on the web2py list. I like the idea of e4s eventually replacing the web2py.com Support page. I think something like that would really set web2py apart (as if it's not already distinctive enough). OK, as promised, here's some proofreading -- on the Guidelines page, Tehcnologies should be Technologies in Use Industry Standard Tehcnologies. Godspeed. Anthony On Nov 11, 9:52 am, mdipierro mdipie...@cs.depaul.edu wrote: This is important. Please read! These days I am getting a lot of private requests from people/ businesses who need consulting development jobs in web2py. This is more than can I can handle. I need to keep track who is available and who is capable so that I can refer those jobs to them. Long ago we had discussions on the list about giving a more professional facade to the group (at least some part of the group) so that members could bid for larger contracts as if we were a business. If you think about IBM it is not more than a collection of consultants, exactly as are we. The difference is that in their case the shareholders take a cut of the revenues of the consultants and they have a legal status. We do not. One proposed solution was to create a professional organization. We discussed options. I came up with this: -- http://www.experts4solutions.com -- I registered experts4solutions as an LLC to shield myself from liability and give it a more professional legal status. If you have contributed to web2py or have created a public web2py application you are invited to join. By joining you are saying you are willing to work on paid web2py projects and have your work reviewed (by me and other members). I will initially review and approve applications until we have a solid core of members who can help draft better rules, improve the page, offer more services. The more members the more strict the admission rules will be since they will be revised. Let's be clear on this... there is no cost of joining and it does not take any cut in your revenues when you are contacted directly by a client. experts4solutions will provide additional optional services also provided by me and other members. For example you may want to take a contract but you or your client may wants to purchase code review, and/or a long time support contract, and/or something you cannot provide as an individual but we may be able to provide as a group. You can be listed even if you have a company (actually it is better if you have one and your company name will be listed too). Eventually this may replace: http://web2py.com/examples/default/support The point of this is that I am impressed by the expertise I find on this list. Some of the skills you have are hard to find. I want to help you capitalize on it. I love working with you guys. web2py is what today keeps us together but web2py is a tool and one day (2100?) it will be replaced by a better one. Yet there is a value in our group and perhaps it may outlive web2py. experts4solutions is not a discussion group and will not affect this mailing list. Massimo
[web2py] Re: web2py organization - important for consultants !!!
The idea is that clients contact the members directly so I may not always know what is going on but I will report things that I know. Massimo On Nov 14, 3:56 pm, Anthony abasta...@gmail.com wrote: What a great idea! I don't yet have the skills to join, but for now e4s will certainly have my moral support (maybe some casual proofreading, too ;-). For those of us not directly involved in e4s, I think it would still be interesting to hear what's going on from time to time, so hopefully there will be some occassional updates posted on the web2py list. I like the idea of e4s eventually replacing the web2py.com Support page. I think something like that would really set web2py apart (as if it's not already distinctive enough). OK, as promised, here's some proofreading -- on the Guidelines page, Tehcnologies should be Technologies in Use Industry Standard Tehcnologies. Godspeed. Anthony On Nov 11, 9:52 am, mdipierro mdipie...@cs.depaul.edu wrote: This is important. Please read! These days I am getting a lot of private requests from people/ businesses who need consulting development jobs in web2py. This is more than can I can handle. I need to keep track who is available and who is capable so that I can refer those jobs to them. Long ago we had discussions on the list about giving a more professional facade to the group (at least some part of the group) so that members could bid for larger contracts as if we were a business. If you think about IBM it is not more than a collection of consultants, exactly as are we. The difference is that in their case the shareholders take a cut of the revenues of the consultants and they have a legal status. We do not. One proposed solution was to create a professional organization. We discussed options. I came up with this: -- http://www.experts4solutions.com -- I registered experts4solutions as an LLC to shield myself from liability and give it a more professional legal status. If you have contributed to web2py or have created a public web2py application you are invited to join. By joining you are saying you are willing to work on paid web2py projects and have your work reviewed (by me and other members). I will initially review and approve applications until we have a solid core of members who can help draft better rules, improve the page, offer more services. The more members the more strict the admission rules will be since they will be revised. Let's be clear on this... there is no cost of joining and it does not take any cut in your revenues when you are contacted directly by a client. experts4solutions will provide additional optional services also provided by me and other members. For example you may want to take a contract but you or your client may wants to purchase code review, and/or a long time support contract, and/or something you cannot provide as an individual but we may be able to provide as a group. You can be listed even if you have a company (actually it is better if you have one and your company name will be listed too). Eventually this may replace: http://web2py.com/examples/default/support The point of this is that I am impressed by the expertise I find on this list. Some of the skills you have are hard to find. I want to help you capitalize on it. I love working with you guys. web2py is what today keeps us together but web2py is a tool and one day (2100?) it will be replaced by a better one. Yet there is a value in our group and perhaps it may outlive web2py. experts4solutions is not a discussion group and will not affect this mailing list. Massimo
Re: [web2py] Re: web2py organization - important for consultants !!!
On Sun, Nov 14, 2010 at 10:58 PM, mdipierro mdipie...@cs.depaul.edu wrote: The idea is that clients contact the members directly so I may not always know what is going on but I will report things that I know. You could add a page where clients can submit their impression of how the project went. That way you'll know what is going on. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
Re: [web2py] Re: web2py organization - important for consultants !!!
I've sent Massimo the more changes to the current theme. Please keep in mind that the profile image will be (brutally) rescaled to 100px x 100px using width and height CSS properties so I suggest you crop and scale your profile images. If you need a hand with that, please send me the image (privately) and I'll send you the appropriate scaled image. (No sex-change, youthification, or similar Photoshopping, please.) On Sun, Nov 14, 2010 at 11:01 PM, Branko Vukelic bg.bra...@gmail.com wrote: On Sun, Nov 14, 2010 at 10:58 PM, mdipierro mdipie...@cs.depaul.edu wrote: The idea is that clients contact the members directly so I may not always know what is going on but I will report things that I know. You could add a page where clients can submit their impression of how the project went. That way you'll know what is going on. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
[web2py] Re: web2py organization - important for consultants !!!
Could it be that the corrected version is not online yet ?
Re: [web2py] Re: web2py organization - important for consultants !!!
On Sun, Nov 14, 2010 at 11:32 PM, Stefaan Himpe stefaan.hi...@gmail.com wrote: Could it be that the corrected version is not online yet ? It's not online yet. I've sent Massimo the last version minutes ago. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
[web2py] Re: web2py organization - important for consultants !!!
Hello, thanks for designing a beautiful theme! One remark though: on my screen the white experts4solutions logo (as inlined in the text) is hard to read. Best regards, Stefaan.
[web2py] Re: Custom JSON-RPC error codes
Hi Massimo, There's a small bug in this code. The line (3491) in Tools.py except Service.JsonRpcException, e: -- return return_error(id, e.code, e.info) Needs to include the id. As above. Cheers, Matt On Nov 12, 9:12 am, Matt mjwat...@gmail.com wrote: Thanks Massimo :) Will check it out. Matt Ok. In trunk. Please give this a try raise service.JsonRpcException(100,info) On Nov 10, 10:07 pm, Matt mjwat...@gmail.com wrote: Hi there, (This is probably more or a small request that a question.) The JSON-RPC service by default always returns error codes of 100. Can we possibly have this amended so that we could say raise a custom JsonRpcException (from within our methods) provide a code, and message and have that code and message returned instead? Thoughts? Matt
Re: [web2py] Re: web2py organization - important for consultants !!!
On Sun, Nov 14, 2010 at 11:35 PM, Stefaan Himpe stefaan.hi...@gmail.com wrote: Hello, thanks for designing a beautiful theme! One remark though: on my screen the white experts4solutions logo (as inlined in the text) is hard to read. Yes, I'm aware of that. I'll think of a better solution. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
[web2py] Re: web2py organization - important for consultants !!!
Stefaan Himpe wrote: Could it be that the corrected version is not online yet ? To be clear: I'm referring to the spelling corrected version.
Re: [web2py] Re: web2py organization - important for consultants !!!
On Sun, Nov 14, 2010 at 11:37 PM, Stefaan Himpe stefaan.hi...@gmail.com wrote: Stefaan Himpe wrote: Could it be that the corrected version is not online yet ? To be clear: I'm referring to the spelling corrected version. Oh that. Massimo gave me the application files before the spelling corrections were implemented, so I think they will need to be corrected again (along with any new mistakes I might have introduced while editing the text). -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
Re: [web2py] Re: web2py organization - important for consultants !!!
Nice theme, The expert name at the top should be capitalized. http://www.experts4solutions.com/e4s/default/expert/2 Would be good to have a badge for linking this. Enviado via iPhone Em 14/11/2010, às 20:51, Branko Vukelic bg.bra...@gmail.com escreveu: On Sun, Nov 14, 2010 at 11:37 PM, Stefaan Himpe stefaan.hi...@gmail.com wrote: Stefaan Himpe wrote: Could it be that the corrected version is not online yet ? To be clear: I'm referring to the spelling corrected version. Oh that. Massimo gave me the application files before the spelling corrections were implemented, so I think they will need to be corrected again (along with any new mistakes I might have introduced while editing the text). -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
[web2py] jqgrid with drowdown list
Good night. I am starting with jqgrid and i need a litle grid with a drowndonw list, and in line edit. Options to add a line and delele a line. It looks a bit complicated to me, I wonder if someone has something to start to work on it Thanks
[web2py] Re: web2py organization - important for consultants !!!
e4s should probably have its own favicon too (currently using the web2py favicon)... From: Branko Vukelic bg.bra...@gmail.com Date: Nov 14, 5:44 pm Subject: web2py organization - important for consultants !!! To: web2py-users On Sun, Nov 14, 2010 at 11:35 PM, Stefaan Himpe stefaan.hi...@gmail.com wrote: Hello, thanks for designing a beautiful theme! One remark though: on my screen the white experts4solutions logo (as inlined in the text) is hard to read. Yes, I'm aware of that. I'll think of a better solution. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guildhttp://bit.ly/gbg-group attachment: e4s_favicon.png
Re: [web2py] Re: Discussion: Why is web2py bad for large deployments?
Doesn't work with code completion, and will be a maintenance nightmare! I spent weeks trying different code organisation patterns with web2py including what you mentioned, everything I attempted just caused more problems and made the code less maintainable. Like I keep saying, it all comes down to programmers preference. I started programming with Java, therefore I like object oriented programming that Flask+SQLAlchemy uses. -- Thadeus On Sun, Nov 14, 2010 at 11:23 AM, mdipierro mdipie...@cs.depaul.edu wrote: Nothing prevents you in web2py to create a modules/models/mymodel.py then import applications.yourapp/modules/models.mymodel.py and then call a function in there that defines the tables you need. And you can have more than one mymodel. This anyway will be easy if we add support for lazy tables and thread local globals. On Nov 14, 10:36 am, Thadeus Burgess thade...@thadeusb.com wrote: A good advise, but, not always possible. I am considering to migrate an App in the range of 70-100 tables to web2py and there are tables that are like pillars, belong to several groups (customers, employees, projects,...) How we could manage this shared tables? Also sometimes its hard to determine an order for the tables to avoid referencing a still undefined table. There is another type of large applications, enterprise level with hundreds or thousands of tables. The approach of multiples apps sharing same database is useful, but how could we solve the division of tables in apps, is it better to define the model in one place and import the required tables on the apps? This is why I prefer Flask + SQLAlchemy. -- Thadeus 2010/11/14 José Ignacio Hurtado jose.i.hurt...@gmail.com A good advise, but, not always possible. I am considering to migrate an App in the range of 70-100 tables to web2py and there are tables that are like pillars, belong to several groups (customers, employees, projects,...) How we could manage this shared tables? Also sometimes its hard to determine an order for the tables to avoid referencing a still undefined table. There is another type of large applications, enterprise level with hundreds or thousands of tables. The approach of multiples apps sharing same database is useful, but how could we solve the division of tables in apps, is it better to define the model in one place and import the required tables on the apps? Jose. 2010/11/14 mdipierro mdipie...@cs.depaul.edu I agree that there are things we can improve in web2py. Yet, if a complex application have many pieces that are untangled, the import mechanism does not necessarily help you. The solution is trying to design components that are relatively independent. If you can do this, web2py does not bet in the way. For example, you have 100 tables functionally grouped in ~10 and all they need to share is authentication, you may want to separate the functions in 10 different web2py applications (all sharing one database, each defining only the tables it needs, and sharing one session cookie). This modular design solves lots of problems. I have heard of people who have developed complex applications in Django (which uses the import you suggest) and run into problems because they were using more ram than needed since all modules were always imported. In web2py controllers are executed only when called and if you make many small controllers you save lots of memory. Controllers than then import the modules they need and only those. Massimo On Nov 13, 7:28 pm, Thadeus Burgess thade...@thadeusb.com wrote: The biggest contributing factor is that web2py is executed and not import. The coder must always be sure to align objects and database in the correct order, including any auxiliary functions, class mappings, queries. He/she has to worry about the order of everything. Sometimes you can't have such order for complex systems. I think an import based system solves this in that the import statements declare the order instead of the physical location of the code doing that. -- Thadeus On Sat, Nov 13, 2010 at 2:49 PM, Jason Brower encomp...@gmail.com wrote: These are encouraging. In large deployment I mean it in the most external sense of it. Facebook is big, myspace is big, those kinds of object were what I was aiming for. And with Massimo's comment about the database size. I think your right, the framework does become less relavent. In what ways in a large codebase making web2py code messier and is there a solution to it in another framework? BR, J On Sat, 2010-11-13 at 11:48 -0600, Thadeus Burgess wrote: What is large deployment? Is it a large codebase that you must manage for an internal dashbaord, or just alot
[web2py] Re: Custom JSON-RPC error codes
in trunk. thanks. On Nov 14, 4:42 pm, Matt mjwat...@gmail.com wrote: Hi Massimo, There's a small bug in this code. The line (3491) in Tools.py except Service.JsonRpcException, e: -- return return_error(id, e.code, e.info) Needs to include the id. As above. Cheers, Matt On Nov 12, 9:12 am, Matt mjwat...@gmail.com wrote: Thanks Massimo :) Will check it out. Matt Ok. In trunk. Please give this a try raise service.JsonRpcException(100,info) On Nov 10, 10:07 pm, Matt mjwat...@gmail.com wrote: Hi there, (This is probably more or a small request that a question.) The JSON-RPC service by default always returns error codes of 100. Can we possibly have this amended so that we could say raise a custom JsonRpcException (from within our methods) provide a code, and message and have that code and message returned instead? Thoughts? Matt
[web2py] Bug in saving changes to the about page for my application?
I just downloaded Version 1.89.1 source code version of web2py to upgrade (I skipped a few versions, in case that matters.) When I go to the about screen and click edit, I get an edit window and can type changes, but I can't save them. I clicked the disk icon in the upper left corner, but nothing happens (date is not updated, changes are not saved.) I tried CTRL-S, but an explorer window comes up asking me where to save the file. (In CHROME browser the default name of the file is edit myapplication ABOUT.htm; in Firefox, it saves it as About.htm, so the original text is not touched and the timestamp on it is not updated.) I'm running in WinXP. If this is not a bug but user error, please help me figure out how to save my changes. Thanks, Audra
[web2py] Trouble automatically updating dynamically generated image
Hello, I am using web2py to monitor and control an instrument. I am dynamically generating plots using matplotlib following the DNA application example from SC2009 (http://www.web2py.com/examples/static/ sc/sc_dna_talk.pdf) I was able to get the basic aspects working based on that example. However, I want to automatically display new plots as new data is available. I am using the following code in the view: script var auto_refresh = setInterval( function() { $('#loaddiv').load('statusbox.load'); $('#threshpng').html('img src=/myapp/default/dataThreshPlot.png'); }, 5000); /script div id=loaddivloading.../div div id=threshpngpng loading/div The statusbox.load generates a table with some statistics about the data, and this successfully updates every 5 seconds as desired. However, the dataThreshPlot never gets refreshed, only the initial version is displayed. (a timestamp is written to the plot when it is generated so I can verify this fact). If I simply browse to localhost:8000/myapp/default/dataThreshPlot.png the plot is properly generated and displayed each time I refresh the page. I have tried adding this code to the dataThreshPlot function in the controller: response.headers['Expires'] = time.strftime(%a, %d %b %Y %H:%M:%S +, time.gmtime(time.time()+1)) to try to avoid caching, but still no luck. I also tried making a very simple controller function as follows: def dataThreshPage(): return dict(threshim= URL(r=request,f=dataThreshPlot)) and view: img src={{=threshim}} and tested that localhost:8000/myapp/default/dataThreshPage presents the plot as expected. I then modified the jquery refresh code to: script var auto_refresh = setInterval( function() { $('#loaddiv').load('statusbox.load'); $('#threshpng').load('/myapp/default/dataThreshPage'); }, 5000); /script div id=loaddivloading.../div div id=threshpngpng loading/div but still no luck. Any suggestions for how to get these plots to refresh? Thank you, G
[web2py] Stick web2py to one CPU?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 What do you think, would it be good idea to attach web2py process to one CPU core to avoid overhead related to switching between cores? Ryan Kelly writes: I just halved the running time of one of my test suites. http://www.rfk.id.au/blog/entry/a-gil-adventure-threading2 David - -- David Zejda, Open-IT cz web development services http://www.o-it.info -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkzgddIACgkQ3oCkkciamVEuRACfUrHv8hKlkFWPmdmFDEzF4Ww4 GZ8An0Yub2C+83nb+Ghu6gTc+NNmhbkv =TyFn -END PGP SIGNATURE-
Re: [web2py] Re: web2py organization - important for consultants !!!
On Mon, Nov 15, 2010 at 12:39 AM, Anthony abasta...@gmail.com wrote: e4s should probably have its own favicon too (currently using the web2py favicon)... Mental note to self: * Capitalize names of experts in subheader area * Make a favicon for e4s * Go over typos again That should cover it? 1AM here, so if you'll excuse me, I'm off to bed. :) If you guys catch anything else, please add to this list. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
[web2py] Re: Manipulate Rows Object and/or SQLTABLE
I want to customize the result of SQLTABLE so that it can make me a nice table without lines and lines of code in my view file. To achieve that, I need for example to: 1) Add columns to hold icons and links and extra stuff. 2) Customize the rows, e.g. links which depend on content, different icons etc You can add any column to select result. The result can be passed to SQLTABLE. See: http://groups.google.com/group/web2py/browse_thread/thread/826a37f56c26d689/210036457d278cdc?lnk=gstq=patch+to+make+Rows.setvirtualfields+work+with+SQLTABLE#210036457d278cdc
[web2py] Re: Manipulate Rows Object and/or SQLTABLE
I want to customize the result of SQLTABLE so that it can make me a nice table without lines and lines of code in my view file. To achieve that, I need for example to: You can add any column to select result. The result can be passed to SQLTABLE. See: http://groups.google.com/group/web2py/browse_thread/thread/826a37f56c26d689/210036457d278cdc?lnk=gstq=patch+to+make+Rows.setvirtualfields+work+with+SQLTABLE#210036457d278cdc
[web2py] Re: Stick web2py to one CPU?
yes. On Nov 14, 5:50 pm, David Zejda d...@atlas.cz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 What do you think, would it be good idea to attach web2py process to one CPU core to avoid overhead related to switching between cores? Ryan Kelly writes: I just halved the running time of one of my test suites. http://www.rfk.id.au/blog/entry/a-gil-adventure-threading2 David - -- David Zejda, Open-IT cz web development serviceshttp://www.o-it.info -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org iEYEARECAAYFAkzgddIACgkQ3oCkkciamVEuRACfUrHv8hKlkFWPmdmFDEzF4Ww4 GZ8An0Yub2C+83nb+Ghu6gTc+NNmhbkv =TyFn -END PGP SIGNATURE-
[web2py] Re: Manipulate Rows Object and/or SQLTABLE
Nice one Ivan! Will the patch be included in Web2py? I hope Massimo likes it. -D On Nov 15, 12:27 am, Ivan Matveev imatvee...@gmail.com wrote: I want to customize the result of SQLTABLE so that it can make me a nice table without lines and lines of code in my view file. To achieve that, I need for example to: 1) Add columns to hold icons and links and extra stuff. 2) Customize the rows, e.g. links which depend on content, different icons etc You can add any column to select result. The result can be passed to SQLTABLE. See:http://groups.google.com/group/web2py/browse_thread/thread/826a37f56c...
[web2py] Unable to edit language files
Hello, I've tried to edit my language files but my changes are all the time overwritten. When I use the web interface of web2py to edit these files, some fields are in yellow. What is the meaning of this? How should I edit these files to have permanent changes?
Re: [web2py] Re: Manipulate Rows Object and/or SQLTABLE
Will the patch be included in Web2py? I hope Massimo likes it. So do I. Otherwise I will have to patch after every web2py update.
[web2py] Re: Select with autocomplete
Massimo, Thanks, this basically does what I asked. Is the best way to get more advanced selection dropdowns to build a widget? What I'm really after is a dropdown more like the one linked here. http://developer.yahoo.com/yui/examples/autocomplete/ac_combobox.html Thanks again for you quick response. Best, Sam On Nov 14, 1:13 pm, mdipierro mdipie...@cs.depaul.edu wrote: as a test... leave min_lenght=0 and in gluon.sqlhtml.py after attr['_onkeyup'] = add attr['_onfocues'] = attr['_onkeyup'] (occurs in two places) Does it do what you ask? On Nov 14, 1:56 pm, oneroler samuel.ha...@gmail.com wrote: Is it possible to use the autocomplete widget on a select box where when someone clicks into the text field the dropdown with all the selections are available and then the user has the option to type and have the possible selections reduced? I have tried using the SQLFORM.widgets.autocomplete with min_length=0 and this kind of does what I want except that you have to start typing something to get the dropdown. I also tried the jquery autocomplete widget on web2pyslices, but couldn't get the result I wanted. I thought I had seen an answer to this in this group a while ago, but I haven't been able to find it so apologies if this has already been answered. Thanks in advance for any help. Sam
[web2py] Re: web2py 1.89.1 is OUT
Hi Massimo Thanks for addressing this. Interesting that you removed the spinner altogether, I got a feeling from this thread that many users wanted to use the mouse almost exclusively for picking the time. Anyway that decision is fine with me. I only have one issue so far, that is tabbing out of the field. For usability, it is very important we can tab through the whole form. -D
[web2py] Re: databases folder not created in shell
^bump^
[web2py] Re: The primary key constraint on legacy tables
On Nov 13, 10:25 pm, Ivan Matveev imatvee...@gmail.com wrote: DAL keyed tables support is fragile and outdated. Could you expand on why you say it is?.
[web2py] Re: Bug in saving changes to the about page for my application?
I have also encountered a similar problem. I have a View file called status.load that I could not save changes to. By renaming it to status.html, I could save changes as usual. It seems like some issue with file types that are not recognized. On Nov 14, 3:45 pm, Audra Rudys sphin...@gmail.com wrote: I just downloaded Version 1.89.1 source code version of web2py to upgrade (I skipped a few versions, in case that matters.) When I go to the about screen and click edit, I get an edit window and can type changes, but I can't save them. I clicked the disk icon in the upper left corner, but nothing happens (date is not updated, changes are not saved.) I tried CTRL-S, but an explorer window comes up asking me where to save the file. (In CHROME browser the default name of the file is edit myapplication ABOUT.htm; in Firefox, it saves it as About.htm, so the original text is not touched and the timestamp on it is not updated.) I'm running in WinXP. If this is not a bug but user error, please help me figure out how to save my changes. Thanks, Audra
[web2py] Re: jqgrid with drowdown list
Good night I currently could make a basic grid using the plugin_jqgrid or the plugin_editable_jqgrid. But i need include a drowndown list in a cell of the grid and the options to add or delete a line. Thanks for any advice. Napoleon On Sun, Nov 14, 2010 at 6:20 PM, Napoleon Moreno napoleo...@gmail.comwrote: Good night. I am starting with jqgrid and i need a litle grid with a drowndonw list, and in line edit. Options to add a line and delele a line. It looks a bit complicated to me, I wonder if someone has something to start to work on it Thanks
[web2py] Re: Unable to edit language files
On Nov 14, 7:00 pm, pierreth pierre.thibau...@gmail.com wrote: Hello, I've tried to edit my language files but my changes are all the time overwritten. Do you use windows? If so, do you Mark hammond win32 extesions When I use the web interface of web2py to edit these files, some fields are in yellow. What is the meaning of this? It means the translation is the same as the original so probably they were not translated. How should I edit these files to have permanent changes? There is a button at the end. When you save them they should be permanent. Can you help isolate what causes them to be overwritten. I cannot reproduce it.
[web2py] Re: Manipulate Rows Object and/or SQLTABLE
I am confused. Where is the patch? On Nov 14, 7:16 pm, Ivan Matveev imatvee...@gmail.com wrote: Will the patch be included in Web2py? I hope Massimo likes it. So do I. Otherwise I will have to patch after every web2py update.
[web2py] Re: Select with autocomplete
The change is in trunk On Nov 14, 7:18 pm, oneroler samuel.ha...@gmail.com wrote: Massimo, Thanks, this basically does what I asked. Is the best way to get more advanced selection dropdowns to build a widget? What I'm really after is a dropdown more like the one linked here. http://developer.yahoo.com/yui/examples/autocomplete/ac_combobox.html Thanks again for you quick response. Best, Sam On Nov 14, 1:13 pm, mdipierro mdipie...@cs.depaul.edu wrote: as a test... leave min_lenght=0 and in gluon.sqlhtml.py after attr['_onkeyup'] = add attr['_onfocues'] = attr['_onkeyup'] (occurs in two places) Does it do what you ask? On Nov 14, 1:56 pm, oneroler samuel.ha...@gmail.com wrote: Is it possible to use the autocomplete widget on a select box where when someone clicks into the text field the dropdown with all the selections are available and then the user has the option to type and have the possible selections reduced? I have tried using the SQLFORM.widgets.autocomplete with min_length=0 and this kind of does what I want except that you have to start typing something to get the dropdown. I also tried the jquery autocomplete widget on web2pyslices, but couldn't get the result I wanted. I thought I had seen an answer to this in this group a while ago, but I haven't been able to find it so apologies if this has already been answered. Thanks in advance for any help. Sam
[web2py] Re: web2py 1.89.1 is OUT
I modified this... not sure if this is what you asked or not. In my version [tab] moves you to the next INPUT and [shift]+[tab] moves you back. To move across HH:MM:SS fields you have to use arrow keys. Massimo On Nov 14, 7:59 pm, villas villa...@gmail.com wrote: Hi Massimo Thanks for addressing this. Interesting that you removed the spinner altogether, I got a feeling from this thread that many users wanted to use the mouse almost exclusively for picking the time. Anyway that decision is fine with me. I only have one issue so far, that is tabbing out of the field. For usability, it is very important we can tab through the whole form. -D
[web2py] Re: Web2py Application Exhibition ( Version 2.0 )
Hi, Can we submit closed w2p applications without source code? Any specific rules if one does not want to expose the code? Rahul On Nov 12, 5:23 pm, selecta gr...@delarue-berlin.de wrote: How do I submit? Should I just send you (NetAdmin) the code by email? I am working on the project constantly, will you accept updates after the first submission? Or should I wait till the deadline and submit what I got until then? On Nov 11, 9:21 pm, GoldenTiger goldenboy...@gmail.com wrote: I'll be there, actually I am devoting most of my time studyingweb2py. I hope to do a niceapplication. :) On 8 nov, 20:20, Mr admin mr.netad...@gmail.com wrote: Sure! Plugins are just miniature applications right? :-) Mr.NetAdmin On Mon, Nov 8, 2010 at 1:13 PM, mr.freeze nat...@freezable.com wrote: Can we submit be a plugin? On Nov 3, 3:18 pm, NetAdmin mr.netad...@gmail.com wrote: Web2pyApplicationExhibitionVersion2.0 Do you have aWeb2pyapp that you'd like to show the world? If so, you may be interested in theWeb2pyApplicationExhibition. The WAE is a way to... 1. Demonstrate what can be done withWeb2py. 2. Share and learn about usefulweb2py, python, Javascript, jQuery etc. techniques. 3. Earn some money toward that new you've been craving. Projects will be judged in the following areas. Ease of use Usefulness Visual Appeal The Rules 1. Applications must be submitted no later than December 15, 2010 2. Source must be included with your submissions. 3. If theapplicationis written by a team, Massimo can NOT be part of the team. 4. After a 2 week review period, on December 31, 2010, the winners will be announced on theweb2py-users list. 5. The 1st place winner will receive $100 US Dollars, 2nd place will receive $50 6. You must enjoy usingWeb2py! 7. Previous winners must wait 365 days before being eligible to win again. Martin Mulone, the winner of the lastExhibitionwith his entry titled Instant Press, has volunteered to help tally your votes using an application he wrote. ( UsingWeb2pyof course! ) Submissions must be mailed to mr.netad...@gmail.com Good Luck! Mr.NetAdmin at gmail.com
[web2py] Re: databases folder not created in shell
fixed in trunk On Nov 14, 8:13 pm, DenesL denes1...@yahoo.ca wrote: ^bump^
[web2py] Re: Bug in saving changes to the about page for my application?
fixed in trunk, although I may have to revise this solution. On Nov 14, 10:40 pm, G glenn.calt...@gmail.com wrote: I have also encountered a similar problem. I have a View file called status.load that I could not save changes to. By renaming it to status.html, I could save changes as usual. It seems like some issue with file types that are not recognized. On Nov 14, 3:45 pm, Audra Rudys sphin...@gmail.com wrote: I just downloaded Version 1.89.1 source code version of web2py to upgrade (I skipped a few versions, in case that matters.) When I go to the about screen and click edit, I get an edit window and can type changes, but I can't save them. I clicked the disk icon in the upper left corner, but nothing happens (date is not updated, changes are not saved.) I tried CTRL-S, but an explorer window comes up asking me where to save the file. (In CHROME browser the default name of the file is edit myapplication ABOUT.htm; in Firefox, it saves it as About.htm, so the original text is not touched and the timestamp on it is not updated.) I'm running in WinXP. If this is not a bug but user error, please help me figure out how to save my changes. Thanks, Audra
[web2py] db.export_to_csv_file(file) failing on Windows?
Hi, Since connecting remotely is an issue for now, I went to the server hosting the MSSQL DB. I am cinnecting fine (to localhost), but this cmd : db.export_to_csv_file('quickbuild.csv') is getting this error: File C:\Documents and Settings\buildmonkey\Desktop\blue_framework copy\src\mssql_test.py, line 33, in main db.export_to_csv_file('quickbuild.csv') ... dal.py, line 2193, in export_to_csv_file ofile.write('END') AttributeError: 'str' object has no attribute 'write' I did not get an error when doing verbatim what the book says: db.export_to_csv_file(open('somefile.csv', 'wb')) but this only yielded one word in the target file, 'END' Any idea what I should be looking at? Thanks, Mart :)
[web2py] Question about unique=True and IS_NOT_IN_DB
I am getting unexpected results using the IS_NOT_IN_DB validator and also the unique=True validator. I have the following code: Field('unique_id', type='integer', default=auth.user_id, label=T('Unique ID'),readable=True,writable=False,unique=True) db.bio.requires=IS_NOT_IN_DB(db, 'bio.unique_id') The table is called bio. All I want to do is make sure that a user can only post one entry in the bio table. I don't want a user to be able to post multiple entries. A user should only be able to edit his or her single original entry. But for some reason, even with the above code, when I test I am able to create as many entries as I desire with the same account. Is there an easier way to do this? Is there something wrong with the way I am using the validator? I have it set to readable=True and writable=False for testing purposes only. Thanks in advance. -Percy
[web2py] Re: Question about unique=True and IS_NOT_IN_DB
Hi Percy, The validator should read: db.bio.unique_id.requires=IS_NOT_IN_DB(db,'bio.unique_id') I hope this solves the problem. Annet.