Re: [web2py] Re: uWSGI 0.9.9
the one that works with 0.9.8.5 uwsgi --protocol http --socket 127.0.0.1: --pythonpath /home/myusername/web2py --module wsgihandler -d /home/myusername/tmp/uwsgi.log -t 20 --async 24 --ugreen --limit-as 64 -r --no-orphans -M -p 1 --touch-reload /home/myusername/tmp/uwsgireload.txt --reload-on-rss 50 the one that works with 0.9.9.1 but exits on touch (to reload) and dispatches 2 child processes instead of one uwsgi --http 127.0.0.1: --pythonpath /home/myusername/web2py --module wsgihandler -d /home/myusername/tmp/uwsgi.log -t 20 --async 12 --ugreen --limit-as 36 -r --no-orphans -M -p 1 --touch-reload /home/myusername/tmp/uwsgireload.txt --reload-on-rss 50
[web2py] Re: web2py received 2011 BOSSIE Award by InfoWorld.com
In this community there's a rumor that he is a cyborg. Take a look at posts stats: 17918 mdipierro 2324 Massimo Di Pierro 2116 Yarko 1814 thade...@thadeusb.com 1776 Jonathan Lundell 1461 DenesL 1454 rochacbruno 1401 Anthony 1311 pbreit 1104 nat...@freezable.com On 10 sep, 22:46, António Ramos ramstei...@gmail.com wrote: hey, we are here all fascinated about web2py and i was thinking , who is Massimo as a man in the society, among friends, does he drive a Ferrary or a fiat 500? Does he eat meat or is a vegetarian. Is he good at other stuff or was just born to bring us web2py ? What are his projects in the future. How does he sees Web2py in 5 years? Let me be curious about a guy that created such a powerfull and funny tool. I envy you :) Let me suggest to you all Stop programming and give Massimo an Applause for making the clock ticking + 2011/9/9 mikech mp.ch...@gmail.com Congratulations! Hey DePaul you just got some PR from one of your esteemed faculty!
Re: [web2py] Re: uWSGI 0.9.9
the one that works with 0.9.8.5 uwsgi --protocol http --socket 127.0.0.1: --pythonpath /home/myusername/web2py --module wsgihandler -d /home/myusername/tmp/uwsgi.log -t 20 --async 24 --ugreen --limit-as 64 -r --no-orphans -M -p 1 --touch-reload /home/myusername/tmp/uwsgireload.txt --reload-on-rss 50 the one that works with 0.9.9.1 but exits on touch (to reload) and dispatches 2 child processes instead of one uwsgi --http 127.0.0.1: --pythonpath /home/myusername/web2py --module wsgihandler -d /home/myusername/tmp/uwsgi.log -t 20 --async 12 --ugreen --limit-as 36 -r --no-orphans -M -p 1 --touch-reload /home/myusername/tmp/uwsgireload.txt --reload-on-rss 50 Oh ok, you are pratically using --http addr instead of --http-socket addr The first one spawn a dedicated http server, the second one is a shortcut for --protocol http --socket addr -- Roberto De Ioris http://unbit.it
Re: [web2py] Re: web2py received 2011 BOSSIE Award by InfoWorld.com
http://blog.gilsondev.com/2011/01/13/interview-creator-of-web2py/
[web2py]Web2py MVC and Qooxdoo
Anyone have a working tutorial for web2py MVC and Qooxdoo ? I am wondering how to use Web2py's response.view template code inside JS files coz Qooxdoo's class definations are in JS file . Somthing i haven't tried.
[web2py] Re: Crud.update Multiple
Sure, I know that. But I am explicitly looking for the convenience of crud that also automatically generates the forms for that. I basically want to auto-generate forms that allow updating of multiple values. I know how to do it with custom forms, but that is quite tedious. A crud solution would be much better. On Sep 10, 11:12 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: for fieldvalue in list of values: db.person.insert(name=fieldvalue) Off coarse you can do it for multiple values : list1=[(valfield1,valfield2,valfield3),(etc.),(etc.)] # Note : first tuples = first rows you want to insert for field1, field2, field3 in list1 db.person.insert(field1=field1, field2=field2, field3=field3) db.commit # or you wait and the end of the loop better only one commit Richard On Sat, Sep 10, 2011 at 4:12 PM, Serbitar rserbi...@googlemail.com wrote: To be more specific: Multiple records (found via a query), all with different values of course and one text field for each record. Just one submit button. On Sep 10, 9:55 pm, Serbitar rserbi...@googlemail.com wrote: is there any way toupdatemultiplerecordswith crud.update, or evenrecordswith a given query?
[web2py] Re: what other tools do you use with web2py
I use SASS provided by compass http://compass-style.org/ and it really makes CSS more pleasant. I never used CoffeeScript as I stay on jQuery syntax 95% of javascript code.
Re: [web2py] what other tools do you use with web2py
I have checked pyjs, looks great. What can't you do with pyjs? I want to make cockpit like application with tabs and embedded graphs. Must be possible with pyjs. Do you agree? regards, Richard Op 10 sep 2011, om 22:22 heeft Carl het volgende geschreven: Have a look at pyjs.org It converts Pyrhon into JavaScript.
[web2py] Re: Use the bundled python interpreter
No one any idea? On 9 Sep., 16:04, Christian hff...@googlemail.com wrote: Hello, I'd like to use the python interpreter bundled with the web2py.app (on mac) to have a clean environment on every host. When trying to start from commandline with web2py.app/Contents/MacOS/python web2py.app/Contents/Resources/ web2py.py I get a Could not find platform independent libraries prefix Could not find platform dependent libraries exec_prefix Consider setting $PYTHONHOME to prefix[:exec_prefix] 'import site' failed; use -v for traceback Traceback (most recent call last): File web2py.app/Contents/Resources/web2py.py, line 4, in module import os ImportError: No module named os Any ideas, how to do this? Regards, Christian
Re: [web2py] what other tools do you use with web2py
I would say it's worth a look for charts graphs. Here's one example: http://pyjs.org/examples/gcharttestapp/output/GChartTestApp.html
Re: [web2py] what other tools do you use with web2py
That example and the info hierarchy and tabs example are the widgets we will be using. Looks fine to us. however I do not have a clear view on how pyjama is used within web2py. I have looked at the pyjamas example http://www.web2py.com/appliances/default/show/45 but I can't figure out what is specific pyjama besides the ajax code. Op 11 sep 2011, om 12:37 heeft Carl het volgende geschreven: I would say it's worth a look for charts graphs. Here's one example: http://pyjs.org/examples/gcharttestapp/output/GChartTestApp.html
Re: [web2py] what other tools do you use with web2py
The AJAX is the only 'bit' that is Web2py specific. Your mental model will need to shift to writing an application in Pyjamas rather than writing web pages. That applications, thru ajax can communicate with your Web2py instance. On 11 September 2011 11:52, Richard Dijkstra richard.dijks...@planet.nlwrote: That example and the info hierarchy and tabs example are the widgets we will be using. Looks fine to us. however I do not have a clear view on how pyjama is used within web2py. I have looked at the pyjamas example http://www.web2py.com/appliances/default/show/45 but I can't figure out what is specific pyjama besides the ajax code. Op 11 sep 2011, om 12:37 heeft Carl het volgende geschreven: I would say it's worth a look for charts graphs. Here's one example: http://pyjs.org/examples/gcharttestapp/output/GChartTestApp.html
Re: [web2py] what other tools do you use with web2py
This is the same problem i am facing too. And i am looking into Qooxdoo for that. So far it is very promising in UI part of the code. Zero HTML , Zero CSS needed and code is quite simple (just the tutorial make it so complex , actual coding does not need to be that complex). Only problem i am having with qooxdoo is integrating it with MVC pattern of web2py. www,qooxdoo.com On 9/11/11, Carl Roach m...@carlroach.com wrote: The AJAX is the only 'bit' that is Web2py specific. Your mental model will need to shift to writing an application in Pyjamas rather than writing web pages. That applications, thru ajax can communicate with your Web2py instance. On 11 September 2011 11:52, Richard Dijkstra richard.dijks...@planet.nlwrote: That example and the info hierarchy and tabs example are the widgets we will be using. Looks fine to us. however I do not have a clear view on how pyjama is used within web2py. I have looked at the pyjamas example http://www.web2py.com/appliances/default/show/45 but I can't figure out what is specific pyjama besides the ajax code. Op 11 sep 2011, om 12:37 heeft Carl het volgende geschreven: I would say it's worth a look for charts graphs. Here's one example: http://pyjs.org/examples/gcharttestapp/output/GChartTestApp.html
Re: [web2py] what other tools do you use with web2py
Carl, Thank for the conceptual advise. Besides the examples is also a tutorial for pyjama - web2py available. Op 11 sep 2011, om 12:55 heeft Carl Roach het volgende geschreven: Or a brief pyjama-w2p cookbook recipe like: - create database - create webpage thru pyjama - connect ... using ajax - ... Would be convenient. I do not know whow wrote the pyjama example on web2py, maybe he/she might give some tips. The AJAX is the only 'bit' that is Web2py specific. Your mental model will need to shift to writing an application in Pyjamas rather than writing web pages. That applications, thru ajax can communicate with your Web2py instance. On 11 September 2011 11:52, Richard Dijkstra richard.dijks...@planet.nl wrote: That example and the info hierarchy and tabs example are the widgets we will be using. Looks fine to us. however I do not have a clear view on how pyjama is used within web2py. I have looked at the pyjamas example http://www.web2py.com/appliances/default/show/45 but I can't figure out what is specific pyjama besides the ajax code. Op 11 sep 2011, om 12:37 heeft Carl het volgende geschreven: I would say it's worth a look for charts graphs. Here's one example: http://pyjs.org/examples/gcharttestapp/output/GChartTestApp.html
Re: [web2py] what other tools do you use with web2py
you might try asking for help here: http://www.linkedin.com/groups?gid=3634078trk=hb_side_g otherwise... work through the example of ajax and then look at the examples folder of pyjamas for code that creates and manages UI. On 11 September 2011 12:39, Richard Dijkstra richard.dijks...@planet.nlwrote: Carl, Thank for the conceptual advise. Besides the examples is also a tutorial for pyjama - web2py available. Op 11 sep 2011, om 12:55 heeft Carl Roach het volgende geschreven: Or a brief pyjama-w2p cookbook recipe like: - create database - create webpage thru pyjama - connect ... using ajax - ... Would be convenient. I do not know whow wrote the pyjama example on web2py, maybe he/she might give some tips. The AJAX is the only 'bit' that is Web2py specific. Your mental model will need to shift to writing an application in Pyjamas rather than writing web pages. That applications, thru ajax can communicate with your Web2py instance. On 11 September 2011 11:52, Richard Dijkstra richard.dijks...@planet.nlwrote: That example and the info hierarchy and tabs example are the widgets we will be using. Looks fine to us. however I do not have a clear view on how pyjama is used within web2py. I have looked at the pyjamas example http://www.web2py.com/appliances/default/show/45 but I can't figure out what is specific pyjama besides the ajax code. Op 11 sep 2011, om 12:37 heeft Carl het volgende geschreven: I would say it's worth a look for charts graphs. Here's one example: http://pyjs.org/examples/gcharttestapp/output/GChartTestApp.html
Re: [web2py] what other tools do you use with web2py
and when you need to take a break try this app written in Pyjamas... http://pymines.appspot.com/ On 11 September 2011 12:43, Carl Roach m...@carlroach.com wrote: you might try asking for help here: http://www.linkedin.com/groups?gid=3634078trk=hb_side_g otherwise... work through the example of ajax and then look at the examples folder of pyjamas for code that creates and manages UI. On 11 September 2011 12:39, Richard Dijkstra richard.dijks...@planet.nlwrote: Carl, Thank for the conceptual advise. Besides the examples is also a tutorial for pyjama - web2py available. Op 11 sep 2011, om 12:55 heeft Carl Roach het volgende geschreven: Or a brief pyjama-w2p cookbook recipe like: - create database - create webpage thru pyjama - connect ... using ajax - ... Would be convenient. I do not know whow wrote the pyjama example on web2py, maybe he/she might give some tips. The AJAX is the only 'bit' that is Web2py specific. Your mental model will need to shift to writing an application in Pyjamas rather than writing web pages. That applications, thru ajax can communicate with your Web2py instance. On 11 September 2011 11:52, Richard Dijkstra richard.dijks...@planet.nlwrote: That example and the info hierarchy and tabs example are the widgets we will be using. Looks fine to us. however I do not have a clear view on how pyjama is used within web2py. I have looked at the pyjamas example http://www.web2py.com/appliances/default/show/45 but I can't figure out what is specific pyjama besides the ajax code. Op 11 sep 2011, om 12:37 heeft Carl het volgende geschreven: I would say it's worth a look for charts graphs. Here's one example: http://pyjs.org/examples/gcharttestapp/output/GChartTestApp.html
Re: [web2py]Web2py MVC and Qooxdoo
I don't have much experience with qooxdoo, but I've used it to build a web app that adds phonetic transcription to English texts www.phonetizer.com I use web2py on the back end and qooxdoo on the front end. I use a simple json-rpc web service to communicate between web2py and qooxdoo. I also have a port of pyjamas todo tutorial. The result is viewable at http://www.vocabilis.net/ You need to register at the site to see the qooxdoo app. I use json-rpc for all communication in that app too. If you are interested, I'll try and get you the source code for the todo app. On Sun, Sep 11, 2011 at 2:42 PM, Phyo Arkar phyo.arkarl...@gmail.comwrote: Anyone have a working tutorial for web2py MVC and Qooxdoo ? I am wondering how to use Web2py's response.view template code inside JS files coz Qooxdoo's class definations are in JS file . Somthing i haven't tried. -- Alexei Vinidiktov
Re: [web2py]Web2py MVC and Qooxdoo
Anyone have experience with qooxdoo? It seems that only way web2py applicable with QooXDoo is as a JSON-RPC Server. Whole view logic will be only in Qooxdoo , cannot use any Template langauge of web2py i guess. If anyone have any expeirence , enlighten me. On 9/11/11, Phyo Arkar phyo.arkarl...@gmail.com wrote: Anyone have a working tutorial for web2py MVC and Qooxdoo ? I am wondering how to use Web2py's response.view template code inside JS files coz Qooxdoo's class definations are in JS file . Somthing i haven't tried.
Re: [web2py]Web2py MVC and Qooxdoo
Forgot you say that you can add todo items both by clicking tha Add task button and pressing the enter key when entering a task. You can delete todo items by clicking them in the todo list. On Sun, Sep 11, 2011 at 6:59 PM, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: I don't have much experience with qooxdoo, but I've used it to build a web app that adds phonetic transcription to English texts www.phonetizer.com I use web2py on the back end and qooxdoo on the front end. I use a simple json-rpc web service to communicate between web2py and qooxdoo. I also have a port of pyjamas todo tutorial. The result is viewable at http://www.vocabilis.net/ You need to register at the site to see the qooxdoo app. I use json-rpc for all communication in that app too. If you are interested, I'll try and get you the source code for the todo app. On Sun, Sep 11, 2011 at 2:42 PM, Phyo Arkar phyo.arkarl...@gmail.comwrote: Anyone have a working tutorial for web2py MVC and Qooxdoo ? I am wondering how to use Web2py's response.view template code inside JS files coz Qooxdoo's class definations are in JS file . Somthing i haven't tried. -- Alexei Vinidiktov -- Alexei Vinidiktov
Re: [web2py]Web2py MVC and Qooxdoo
Yes, that sounds right. The whole view logic resides within the qooxdoo app. On Sun, Sep 11, 2011 at 6:59 PM, Phyo Arkar phyo.arkarl...@gmail.comwrote: Anyone have experience with qooxdoo? It seems that only way web2py applicable with QooXDoo is as a JSON-RPC Server. Whole view logic will be only in Qooxdoo , cannot use any Template langauge of web2py i guess. If anyone have any expeirence , enlighten me. On 9/11/11, Phyo Arkar phyo.arkarl...@gmail.com wrote: Anyone have a working tutorial for web2py MVC and Qooxdoo ? I am wondering how to use Web2py's response.view template code inside JS files coz Qooxdoo's class definations are in JS file . Somthing i haven't tried. -- Alexei Vinidiktov
Re: [web2py]Web2py MVC and Qooxdoo
AH sorry i write this post before read the previous post. Yeah as it seems all view code needs to go into Qooxdoo , and web2py as Json RPC only. hmm.. so half of web2py potential will only be used, pyjamas todo tutorial i cannot register at all , ur mail sender seems to be down. it saids unable to send email. On 9/11/11, Phyo Arkar phyo.arkarl...@gmail.com wrote: Anyone have experience with qooxdoo? It seems that only way web2py applicable with QooXDoo is as a JSON-RPC Server. Whole view logic will be only in Qooxdoo , cannot use any Template langauge of web2py i guess. If anyone have any expeirence , enlighten me. On 9/11/11, Phyo Arkar phyo.arkarl...@gmail.com wrote: Anyone have a working tutorial for web2py MVC and Qooxdoo ? I am wondering how to use Web2py's response.view template code inside JS files coz Qooxdoo's class definations are in JS file . Somthing i haven't tried.
Re: [web2py]Web2py MVC and Qooxdoo
Oops, sorry. I'll see if I can fix it. It's been a long time since I touched the app last. On Sun, Sep 11, 2011 at 7:05 PM, Phyo Arkar phyo.arkarl...@gmail.comwrote: AH sorry i write this post before read the previous post. Yeah as it seems all view code needs to go into Qooxdoo , and web2py as Json RPC only. hmm.. so half of web2py potential will only be used, pyjamas todo tutorial i cannot register at all , ur mail sender seems to be down. it saids unable to send email. On 9/11/11, Phyo Arkar phyo.arkarl...@gmail.com wrote: Anyone have experience with qooxdoo? It seems that only way web2py applicable with QooXDoo is as a JSON-RPC Server. Whole view logic will be only in Qooxdoo , cannot use any Template langauge of web2py i guess. If anyone have any expeirence , enlighten me. On 9/11/11, Phyo Arkar phyo.arkarl...@gmail.com wrote: Anyone have a working tutorial for web2py MVC and Qooxdoo ? I am wondering how to use Web2py's response.view template code inside JS files coz Qooxdoo's class definations are in JS file . Somthing i haven't tried. -- Alexei Vinidiktov
[web2py] web2py app with no CSS or javascript?
I'm using the latest stable release of web2py. I need to produce an app that has no CSS or javascript. Is the quickest way to do this just stripping these things from layout.html or is there a setting somewhere that would cause the rendering to go plain-jane? Thanks, David
Re: [web2py]Web2py MVC and Qooxdoo
That page should have a CAPCHA . spambots will like to spam registration it till your mailserver down with registrations. One thing i am liking about qooxdoo is that really eliminate HTML CSS and Graphics skills needed to develop a desktop like web-app easily. Normally desiging web2py app needs all those skills. I am good at linux , system engineering and python + js not at those art skills so i believes good intergration of qooxdoo with web2py will be perfect. On 9/11/11, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: Oops, sorry. I'll see if I can fix it. It's been a long time since I touched the app last. On Sun, Sep 11, 2011 at 7:05 PM, Phyo Arkar phyo.arkarl...@gmail.comwrote: AH sorry i write this post before read the previous post. Yeah as it seems all view code needs to go into Qooxdoo , and web2py as Json RPC only. hmm.. so half of web2py potential will only be used, pyjamas todo tutorial i cannot register at all , ur mail sender seems to be down. it saids unable to send email. On 9/11/11, Phyo Arkar phyo.arkarl...@gmail.com wrote: Anyone have experience with qooxdoo? It seems that only way web2py applicable with QooXDoo is as a JSON-RPC Server. Whole view logic will be only in Qooxdoo , cannot use any Template langauge of web2py i guess. If anyone have any expeirence , enlighten me. On 9/11/11, Phyo Arkar phyo.arkarl...@gmail.com wrote: Anyone have a working tutorial for web2py MVC and Qooxdoo ? I am wondering how to use Web2py's response.view template code inside JS files coz Qooxdoo's class definations are in JS file . Somthing i haven't tried. -- Alexei Vinidiktov
Re: [web2py]Web2py MVC and Qooxdoo
You are right about the CAPTCHA. The reason I'm not using it is that at the moment the site is only a playground where I'm getting familiar with web2py and qooxdoo and testing things out. Please try again. Registration should work this time. On Sun, Sep 11, 2011 at 7:20 PM, Phyo Arkar phyo.arkarl...@gmail.comwrote: That page should have a CAPCHA . spambots will like to spam registration it till your mailserver down with registrations. One thing i am liking about qooxdoo is that really eliminate HTML CSS and Graphics skills needed to develop a desktop like web-app easily. Normally desiging web2py app needs all those skills. I am good at linux , system engineering and python + js not at those art skills so i believes good intergration of qooxdoo with web2py will be perfect. On 9/11/11, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: Oops, sorry. I'll see if I can fix it. It's been a long time since I touched the app last. On Sun, Sep 11, 2011 at 7:05 PM, Phyo Arkar phyo.arkarl...@gmail.com wrote: AH sorry i write this post before read the previous post. Yeah as it seems all view code needs to go into Qooxdoo , and web2py as Json RPC only. hmm.. so half of web2py potential will only be used, pyjamas todo tutorial i cannot register at all , ur mail sender seems to be down. it saids unable to send email. On 9/11/11, Phyo Arkar phyo.arkarl...@gmail.com wrote: Anyone have experience with qooxdoo? It seems that only way web2py applicable with QooXDoo is as a JSON-RPC Server. Whole view logic will be only in Qooxdoo , cannot use any Template langauge of web2py i guess. If anyone have any expeirence , enlighten me. On 9/11/11, Phyo Arkar phyo.arkarl...@gmail.com wrote: Anyone have a working tutorial for web2py MVC and Qooxdoo ? I am wondering how to use Web2py's response.view template code inside JS files coz Qooxdoo's class definations are in JS file . Somthing i haven't tried. -- Alexei Vinidiktov -- Alexei Vinidiktov
Re: [web2py] Re: Computing a field from the value of another field
Thank you everyone for the advice. Chris On Sep 11, 2011 4:47 AM, pbreit pbreitenb...@gmail.com wrote: Good point.
[web2py] web2py.com is down
http://www.downforeveryoneorjustme.com/web2py.com
[web2py] Howto customize DB(or Form) Validator in web2py?
Here are my 2 tables defintion: db.define_table('question', Field('category_id',db.category), Field('content'), Field('number_of_options','integer'), Field('has_options_detail','boolean',default=False)) ## Has or not has detail for each option db.define_table('options_detail', ## This table only for options that have detail explanation Field('question_id',db.question), Field('serial'), ## Option ordering Field('detail')) ## Detail explanation of option How can I restrict that: db.options_detail.question_id must belong to questions that have field has_options_detail == True? Thanks in advance, folks!
[web2py] Re: Howto customize DB(or Form) Validator in web2py?
This should do it: db.options_detail.question_id.requires = IS_IN_DB( db(db.question.has_options_detail==True), 'question.id') Note, the IS_IN_DB validator can take a DAL Set object as the first argument, which enables you to filter the referenced table based on any criteria. (You could also specify the above requires argument directly in the Field()declaration.) http://stackoverflow.com/questions/7376787/howto-customize-dbor-form-validator-in-web2py/7378577#7378577 Anthony On Sunday, September 11, 2011 3:00:45 AM UTC-4, minhcd wrote: Here are my 2 tables defintion: db.define_table('question', Field('category_id',db.category), Field('content'), Field('number_of_options','integer'), Field('has_options_detail','boolean',default=False)) ## Has or not has detail for each option db.define_table('options_detail', ## This table only for options that have detail explanation Field('question_id',db.question), Field('serial'), ## Option ordering Field('detail')) ## Detail explanation of option How can I restrict that: db.options_detail.question_id must belong to questions that have field has_options_detail == True? Thanks in advance, folks!
[web2py] Re: web2py app with no CSS or javascript?
I don't think there's any setting. You could strip them out of layout.html, or create your own layout.html. On Sunday, September 11, 2011 8:16:15 AM UTC-4, David Watson wrote: I'm using the latest stable release of web2py. I need to produce an app that has no CSS or javascript. Is the quickest way to do this just stripping these things from layout.html or is there a setting somewhere that would cause the rendering to go plain-jane? Thanks, David
[web2py] Re: Use the bundled python interpreter
I don't know how it works on the Mac, but on Windows, you start the binary version at the command line by entering 'web2py.exe' (can also pass command line options). Maybe it's the same on Mac -- i.e., just enter 'web2py.app'? On Sunday, September 11, 2011 6:32:46 AM UTC-4, Christian wrote: No one any idea? On 9 Sep., 16:04, Christian hff...@googlemail.com wrote: Hello, I'd like to use the python interpreter bundled with the web2py.app (on mac) to have a clean environment on every host. When trying to start from commandline with web2py.app/Contents/MacOS/python web2py.app/Contents/Resources/ web2py.py I get a Could not find platform independent libraries prefix Could not find platform dependent libraries exec_prefix Consider setting $PYTHONHOME to prefix[:exec_prefix] 'import site' failed; use -v for traceback Traceback (most recent call last): File web2py.app/Contents/Resources/web2py.py, line 4, in module import os ImportError: No module named os Any ideas, how to do this? Regards, Christian
Re: [web2py] what other tools do you use with web2py
Anthony, Do you (and Massimo, I belief you are working closely together) have experience with Pyjama and web2py? I have only found a posting in 2009 when it all started. Richard D. Op 11 sep 2011, om 13:50 heeft Richard Dijkstra het volgende geschreven: Carl, Thanx, we'll meet on linkedin. Richard Op 11 sep 2011, om 13:43 heeft Carl Roach het volgende geschreven: you might try asking for help here: http://www.linkedin.com/groups?gid=3634078trk=hb_side_g otherwise... work through the example of ajax and then look at the examples folder of pyjamas for code that creates and manages UI. On 11 September 2011 12:39, Richard Dijkstra richard.dijks...@planet.nl wrote: Carl, Thank for the conceptual advise. Besides the examples is also a tutorial for pyjama - web2py available. Op 11 sep 2011, om 12:55 heeft Carl Roach het volgende geschreven: Or a brief pyjama-w2p cookbook recipe like: - create database - create webpage thru pyjama - connect ... using ajax - ... Would be convenient. I do not know whow wrote the pyjama example on web2py, maybe he/she might give some tips. The AJAX is the only 'bit' that is Web2py specific. Your mental model will need to shift to writing an application in Pyjamas rather than writing web pages. That applications, thru ajax can communicate with your Web2py instance. On 11 September 2011 11:52, Richard Dijkstra richard.dijks...@planet.nl wrote: That example and the info hierarchy and tabs example are the widgets we will be using. Looks fine to us. however I do not have a clear view on how pyjama is used within web2py. I have looked at the pyjamas example http://www.web2py.com/appliances/default/show/45 but I can't figure out what is specific pyjama besides the ajax code. Op 11 sep 2011, om 12:37 heeft Carl het volgende geschreven: I would say it's worth a look for charts graphs. Here's one example: http://pyjs.org/examples/gcharttestapp/output/GChartTestApp.html
Re: [web2py] Re: web2py app with no CSS or javascript?
On Sep 11, 2011, at 6:48 AM, Anthony wrote: I don't think there's any setting. You could strip them out of layout.html, or create your own layout.html. I believe that certain aspects of the interface depend on JavaScript, like anything requiring a second button (delete?), the delete confirmation dialog, the display of response.flash. I'm not very current on that code, though. What are you trying to accomplish, David? One's motivations for omitting JavaScript would seem to be very different from those for omitting CSS. On Sunday, September 11, 2011 8:16:15 AM UTC-4, David Watson wrote: I'm using the latest stable release of web2py. I need to produce an app that has no CSS or javascript. Is the quickest way to do this just stripping these things from layout.html or is there a setting somewhere that would cause the rendering to go plain-jane? Thanks, David
Re: [web2py] Re: Use the bundled python interpreter
On Sep 11, 2011, at 6:53 AM, Anthony wrote: I don't know how it works on the Mac, but on Windows, you start the binary version at the command line by entering 'web2py.exe' (can also pass command line options). Maybe it's the same on Mac -- i.e., just enter 'web2py.app'? In OS X use the command 'open' to launch an app. man open for details. On Sunday, September 11, 2011 6:32:46 AM UTC-4, Christian wrote: No one any idea? On 9 Sep., 16:04, Christian hff...@googlemail.com wrote: Hello, I'd like to use the python interpreter bundled with the web2py.app (on mac) to have a clean environment on every host. When trying to start from commandline with web2py.app/Contents/MacOS/python web2py.app/Contents/Resources/ web2py.py I get a Could not find platform independent libraries prefix Could not find platform dependent libraries exec_prefix Consider setting $PYTHONHOME to prefix[:exec_prefix] 'import site' failed; use -v for traceback Traceback (most recent call last): File web2py.app/Contents/Resources/web2py.py, line 4, in module import os ImportError: No module named os Any ideas, how to do this? Regards, Christian
Re: [web2py] what other tools do you use with web2py
I use Wijmo. www.wijmo.com http://zerp.ly/rochacbruno Em 10/09/2011 14:39, apple simo...@gmail.com escreveu: The two best things about web2py: Ability to achieve a lot with a very small number of lines of code Being able to use python in the view templates The worst thing: Finding that 2/3 of the time is now spent on jquery and CSS! What tools are there to make this easier? Are jquery and CSS the best available?
Re: [web2py] Re: Crud.update Multiple
I made this a wild ago, but never go any further... Here the thread... http://groups.google.com/group/web2py/browse_thread/thread/50af0d67554c94d9/dfc30ce6fb4455eb?pli=1 Richard On Sun, Sep 11, 2011 at 3:55 AM, Serbitar rserbi...@googlemail.com wrote: Sure, I know that. But I am explicitly looking for the convenience of crud that also automatically generates the forms for that. I basically want to auto-generate forms that allow updating of multiple values. I know how to do it with custom forms, but that is quite tedious. A crud solution would be much better. On Sep 10, 11:12 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: for fieldvalue in list of values: db.person.insert(name=fieldvalue) Off coarse you can do it for multiple values : list1=[(valfield1,valfield2,valfield3),(etc.),(etc.)] # Note : first tuples = first rows you want to insert for field1, field2, field3 in list1 db.person.insert(field1=field1, field2=field2, field3=field3) db.commit # or you wait and the end of the loop better only one commit Richard On Sat, Sep 10, 2011 at 4:12 PM, Serbitar rserbi...@googlemail.com wrote: To be more specific: Multiple records (found via a query), all with different values of course and one text field for each record. Just one submit button. On Sep 10, 9:55 pm, Serbitar rserbi...@googlemail.com wrote: is there any way toupdatemultiplerecordswith crud.update, or evenrecordswith a given query?
[web2py] Re: web2py.com is down
Yes it is down. I am trying to restart but the console form the host does not allow me to. It allowed me to shut it down but not to reboot. I tried restore an image and I get the same issue. It seems a problem is with the datacenter. I am out of town today so I cannot check very frequently. I trust this will be resolved within the day but I will not be resolved within the next hour. Sorry. On Sep 11, 8:34 am, Anthony abasta...@gmail.com wrote: http://www.downforeveryoneorjustme.com/web2py.com
Re: [web2py] Re: web2py.com is down
what hosting You use? VPS ? On 9/11/11, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Yes it is down. I am trying to restart but the console form the host does not allow me to. It allowed me to shut it down but not to reboot. I tried restore an image and I get the same issue. It seems a problem is with the datacenter. I am out of town today so I cannot check very frequently. I trust this will be resolved within the day but I will not be resolved within the next hour. Sorry. On Sep 11, 8:34 am, Anthony abasta...@gmail.com wrote: http://www.downforeveryoneorjustme.com/web2py.com
[web2py] Re: web2py.com is down
Yes. New data point... the host is now running a task. Not sure if the restore or the restart... On Sep 11, 10:45 am, Phyo Arkar phyo.arkarl...@gmail.com wrote: what hosting You use? VPS ? On 9/11/11, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Yes it is down. I am trying to restart but the console form the host does not allow me to. It allowed me to shut it down but not to reboot. I tried restore an image and I get the same issue. It seems a problem is with the datacenter. I am out of town today so I cannot check very frequently. I trust this will be resolved within the day but I will not be resolved within the next hour. Sorry. On Sep 11, 8:34 am, Anthony abasta...@gmail.com wrote: http://www.downforeveryoneorjustme.com/web2py.com
Re: [web2py]Web2py MVC and Qooxdoo
that never runs , giving me error in json response , too bad. And the javascript alone really have 600KB ? is that compiled with source-all ? On 9/11/11, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: You are right about the CAPTCHA. The reason I'm not using it is that at the moment the site is only a playground where I'm getting familiar with web2py and qooxdoo and testing things out. Please try again. Registration should work this time. On Sun, Sep 11, 2011 at 7:20 PM, Phyo Arkar phyo.arkarl...@gmail.comwrote: That page should have a CAPCHA . spambots will like to spam registration it till your mailserver down with registrations. One thing i am liking about qooxdoo is that really eliminate HTML CSS and Graphics skills needed to develop a desktop like web-app easily. Normally desiging web2py app needs all those skills. I am good at linux , system engineering and python + js not at those art skills so i believes good intergration of qooxdoo with web2py will be perfect. On 9/11/11, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: Oops, sorry. I'll see if I can fix it. It's been a long time since I touched the app last. On Sun, Sep 11, 2011 at 7:05 PM, Phyo Arkar phyo.arkarl...@gmail.com wrote: AH sorry i write this post before read the previous post. Yeah as it seems all view code needs to go into Qooxdoo , and web2py as Json RPC only. hmm.. so half of web2py potential will only be used, pyjamas todo tutorial i cannot register at all , ur mail sender seems to be down. it saids unable to send email. On 9/11/11, Phyo Arkar phyo.arkarl...@gmail.com wrote: Anyone have experience with qooxdoo? It seems that only way web2py applicable with QooXDoo is as a JSON-RPC Server. Whole view logic will be only in Qooxdoo , cannot use any Template langauge of web2py i guess. If anyone have any expeirence , enlighten me. On 9/11/11, Phyo Arkar phyo.arkarl...@gmail.com wrote: Anyone have a working tutorial for web2py MVC and Qooxdoo ? I am wondering how to use Web2py's response.view template code inside JS files coz Qooxdoo's class definations are in JS file . Somthing i haven't tried. -- Alexei Vinidiktov -- Alexei Vinidiktov
[web2py] Re: web2py.com is down
http://www.web2py.com/ is up and running.
Re: [web2py] Re: web2py.com is down
confirmed , its back yay! was it coz bossie award , too many hits flooded and downed? On 9/12/11, Valter Foresto valter.fore...@gmail.com wrote: http://www.web2py.com/ is up and running.
Re: [web2py] Re: web2py.com is down
On Sep 11, 2011, at 10:38 AM, Phyo Arkar wrote: was it coz bossie award , too many hits flooded and downed? I'd guess that it's up to us to make use of the Bossie to drive traffic to the site. I wonder how many potential users read InfoWorld? The biggest utility of the award is that it helps to make potential users a little more confident it making the (right) choice.
Re: [web2py] what other tools do you use with web2py
I don't have experience with Pyjamas, but there is this section in the book: http://web2py.com/book/default/chapter/09#JSONRPC-and-Pyjamas Anthony On Sunday, September 11, 2011 10:03:43 AM UTC-4, Richard wrote: Anthony, Do you (and Massimo, I belief you are working closely together) have experience with Pyjama and web2py? I have only found a posting in 2009 when it all started. Richard D. Op 11 sep 2011, om 13:50 heeft Richard Dijkstra het volgende geschreven: Carl, Thanx, we'll meet on linkedin. Richard Op 11 sep 2011, om 13:43 heeft Carl Roach het volgende geschreven: you might try asking for help here: http://www.linkedin.com/groups?gid=3634078trk=hb_side_g otherwise... work through the example of ajax and then look at the examples folder of pyjamas for code that creates and manages UI. On 11 September 2011 12:39, Richard Dijkstra richard@planet.nlwrote: Carl, Thank for the conceptual advise. Besides the examples is also a tutorial for pyjama - web2py available. Op 11 sep 2011, om 12:55 heeft Carl Roach het volgende geschreven: Or a brief pyjama-w2p cookbook recipe like: - create database - create webpage thru pyjama - connect ... using ajax - ... Would be convenient. I do not know whow wrote the pyjama example on web2py, maybe he/she might give some tips. The AJAX is the only 'bit' that is Web2py specific. Your mental model will need to shift to writing an application in Pyjamas rather than writing web pages. That applications, thru ajax can communicate with your Web2py instance. On 11 September 2011 11:52, Richard Dijkstra richard@planet.nlwrote: That example and the info hierarchy and tabs example are the widgets we will be using. Looks fine to us. however I do not have a clear view on how pyjama is used within web2py. I have looked at the pyjamas example http://www.web2py.com/appliances/default/show/45 but I can't figure out what is specific pyjama besides the ajax code. Op 11 sep 2011, om 12:37 heeft Carl het volgende geschreven: I would say it's worth a look for charts graphs. Here's one example: http://pyjs.org/examples/gcharttestapp/output/GChartTestApp.html
[web2py] web2ruby possible?
hello why not translate web2py to ruby? is this a good question or what?
[web2py] Re: confused about permissions
I don't know when that will be fixed (up to Massimo). Quick simple workaround -- somewhere in a model file after the last table definition (or even in the appadmin.py controller): auth.settings.table_permission.table_name.requires=IS_EMPTY_OR(IS_IN_SET(db.tables)) That will update the validator with the full list of all DB tables, which should then appear in the dropdown. Actually, another option would be to set requires=None, which will then allow you to enter any text at all in the at field (could be a table name, or any other name). Technically, the table_name field is supposed to allow for any objects to be named, not just tables, so that may make the most sense (that's what Massimo was suggesting in his comment on the Google Code issue). Anthony On Sunday, September 11, 2011 2:25:31 PM UTC-4, monotasker wrote: Thanks Anthony. I notice it's been a few months since that issue was posted. I realize that changes can't happen overnight, but is there any sense of when a fix might be released? At the moment this basically means the (simple and elegant) crud authorization is useless to me. (I've never learned how to install patches, so I can't easily use the patch posted on that issue). Ian On Sep 9, 11:42 pm, Anthony abas...@gmail.com wrote: Yes, that issue has been reported:http://code.google.com/p/web2py/issues/detail?id=349 Anthony On Friday, September 9, 2011 11:13:04 PM UTC-4, monotasker wrote: One other thing: When I try to create a new permission (on db.auth_permissions) the selectbox for the Table name field isn't showing any of my custom tables. It's only populated with the built in auth tables. Is this the way it's supposed to be? I thought that I could create a permission that links a group name with any table in db. Thanks again, Ian On Sep 9, 6:14 pm, Massimo Di Pierro massi...@gmail.com wrote: Basically you default they do nothing. You can take the fields to mean what you want. You can set them auth.add_persmission(...) and you can check them auth.has_permission(...) or with decorator @auth.requires_permission(...). Things change if you set crud.settings.auth = auth in this case crud will recognize permissions with names = 'read','create','update','delete', and 'select' on the tables that you have specified. The record_id is optional. If not set the permission applied to the entire table. If set the permission applied to the record only. Hope this helps. There is not much more to it really. On Sep 9, 4:31 pm, monotasker sco...@gmail.com wrote: I'm climbing up the learning curve with web2py (which really isn't very steep compared to other tools I've worked with!) and have run into something that I can't figure out from the book: the permissions system. When I create a permission in auth_permissions (using appadmin) I don't understand what each of the field values does (table? name?). The book seems to skip over this very quickly. (I feel compelled to add that the book is the best official documentation I've ever seen for an open source project, with nowhere near the lag or holes in jQuery or Drupal docs. I bought the pdf version because I know the time investment that represents!). Ian
[web2py] Error running on Ubuntu 10.10 using source
Hey guys i started working on my new ubuntu10.10 and as soon as i start the administrative interface i get an error saying - Traceback (most recent call last): File gluon/restricted.py, line 192, in restricted File C:/_dev/temp/web2py/applications/welcome/models/db.py, line 18, in module File gluon/dal.py, line 3981, in __init__ RuntimeError: Failure to connect, tried 5 times: 'NoneType' object has no attribute 'connect' I use Python 2.5.6 due to the constraints of it suporting GAE. Appreciate any help Thanks in advance !
Re: [web2py] what other tools do you use with web2py
Thanx, for the tip; we will update you on our progress. Op 11 sep 2011, om 20:21 heeft Anthony het volgende geschreven: http://web2py.com/book/default/chapter/09#JSONRPC-and-Pyjamas
[web2py] Issues with TAG() encoding and XML().flatten()
Hi List, I just started my first Web2Py sample project (the Wiki from the book) and got it even managed to integrate the HTML5 editor Aloha: http://aloha-editor.org/ My pages should use Markmin instead of HTML and therefore I am converting the HTML to Markmin using TAG().flatten() and markmin_serializer. In general it is working and the content is stored as Markmin code, but when using eg. German umlauts like 'öä', TAG() seems to get confused and doesn't handle the encoding properly. On the other hand, when trying to use XML().flatten(render=markmin_serializer) instead of TAG().flatten(render=markmin_serializer), nothing changes at all. XML().flatten(render=markmin_serializer) will return the input HTML string as is, instead of converting it to Markmin. I am trying to solve this issue for two days now and read lots of posts regarding handling of UTF-8 in Python, tried lots of third party modules to workaround this issue, but had no luck so far. I really appreciate your help/tips. :) Various sample code using the Web2Py Shell: https://gist.github.com/caec7bd5b41624d50b01 Thanks in advance!
[web2py] Re: web2ruby possible?
Or to node.js :-)
Re: [web2py] web2ruby possible?
On Sep 11, 2011, at 11:21 AM, António Ramos wrote: hello why not translate web2py to ruby? is this a good question or what? Go for it.
[web2py] Re: Making slides with web2py and markmin
Ummm, why are you using [[ for links and images instead of just one [ ? It doesn't work for me, when I user the [[ syntax. On Sep 11, 1:36 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: No. It makes the view. You just return it. On Sep 10, 3:53 pm, António Ramos ramstei...@gmail.com wrote: Humm, dont i need a view? Em 10 de setembro de 2011 21:52, António Ramos ramstei...@gmail.comescreveu: Working now :) Em 10 de setembro de 2011 21:29, António Ramos ramstei...@gmail.comescreveu: Traceback (most recent call last): File gluon/restricted.py, line 191, in restricted File gluon/restricted.py, line 178, in compile2 TypeError: compile() expected string without null bytes :( Just a screenshot please 2011/9/10 Michele Comitini michele.comit...@gmail.com +1 Terrific! mic Il giorno 10/set/2011 21:24, Massimo Di Pierro mdipie...@cs.depaul.edu ha scritto: Based on desk.js now you can do this Put the attached slide.py under models (any app). Write a controller like def test(): content = # My slides title ## Slide One this allows you to create slides using markmin ## Slide Two - you can use lists - you can use [[linkshttp://www.google.com]] - you can use images [[imagehttp://image.example.comcenter]] return SLIDE(content,title=My slides) Notice the resulting file is pure html5 with external links therefore it can be downloaded as an independent document.
[web2py] Re: Ajax Call -Determining which button was pressed
Assuming you build your buttons in the controller, you could make this: input type=button id=1 value=1 class=button input type=button id=2 value=2 class=button input type=hidden name=tmp id=tmp div id=target name=target/div Then in your javascript, after document.ready, something like this: jQuery('.button').click(function(){ //any browser-side processing code would go here val value=this.id; jQuery('#tmp').val(value); ajax('your_server_side_function', ['tmp'], 'target'); }); Caution: javascript code may contain typos. On Sep 10, 6:45 pm, António Ramos ramstei...@gmail.com wrote: Hello, the ajax function example in the web2py book ajax('{{=URL('new_post')}}',['your_message'], 'target'); sends the value of the field *your_message* to the controller function I dont want to send the value of a field but a button onclick action My webpage can have 2,4 10 or 20 buttons. It depends . And each time i press a button i need to call the ajax function to process that button can the ajax function process a button instead of a text field? Thank you
[web2py] jqueryui testing Sortable
hello i´m testing jqueryui examples - Sortable http://jqueryui.com/demos/sortable/ but it does not work *this is my controller* def test(): return dict() *my view* {{extend 'layout.html'}} style #sortable { list-style-type: none; margin: 0; padding: 0; width: 60%; } #sortable li { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.4em; height: 18px; } #sortable li span { position: absolute; margin-left: -1.3em; } /style script *jQuery(document).ready(function(){* *jQuery*( #sortable ).sortable(); *jQuery*( #sortable ).disableSelection(); }); /script div class=demo ul id=sortable li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 1/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 2/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 3/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 4/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 5/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 6/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 7/li /ul /div What am i missing Thank you
Re: [web2py] web2ruby possible?
I am more interested in some web2go http://golang.org/
Re: [web2py] jqueryui testing Sortable
Have you included jqueryui JavaScript and Css files? 2011/9/11 António Ramos ramstei...@gmail.com hello i´m testing jqueryui examples - Sortable http://jqueryui.com/demos/sortable/ but it does not work *this is my controller* def test(): return dict() *my view* {{extend 'layout.html'}} style #sortable { list-style-type: none; margin: 0; padding: 0; width: 60%; } #sortable li { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.4em; height: 18px; } #sortable li span { position: absolute; margin-left: -1.3em; } /style script *jQuery(document).ready(function(){* *jQuery*( #sortable ).sortable(); *jQuery*( #sortable ).disableSelection(); }); /script div class=demo ul id=sortable li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 1/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 2/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 3/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 4/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 5/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 6/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 7/li /ul /div What am i missing Thank you -- -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ] [ Aprenda a programar: http://CursoDePython.com.br ] [ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ] [ Consultoria em desenvolvimento web: http://www.blouweb.com ]
Re: [web2py] jqueryui testing Sortable
{{extend 'layout.html'}} *link rel=stylesheet href= http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/ui-lightness/jquery-ui.css; type=text/css media=all / script src= http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js; type=text/javascript/script* style #sortable { list-style-type: none; margin: 0; padding: 0; width: 60%; } #sortable li { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.4em; height: 18px; } #sortable li span { position: absolute; margin-left: -1.3em; } /style script *jQuery(document).ready(function(){* *jQuery*( #sortable ).sortable(); *jQuery*( #sortable ).disableSelection(); }); /script div class=demo ul id=sortable li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 1/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 2/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 3/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 4/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 5/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 6/li li class=ui-state-defaultspan class=ui-icon ui-icon-arrowthick-2-n-s/spanItem 7/li /ul /div
Re: [web2py] jqueryui testing Sortable
Also, have you seen this: http://dev.s-cubism.com/plugin_tablepermuter or this: http://web2py.com/plugins/default/sortable
Re: [web2py] jqueryui testing Sortable
I tought that jqueryui was includes in web2py. Thank you 2011/9/11 Bruno Rocha rochacbr...@gmail.com Also, have you seen this: http://dev.s-cubism.com/plugin_tablepermuter or this: http://web2py.com/plugins/default/sortable
[web2py] set current languages error [open]
Why when I set current languages: T.set_current_languages('en','en-en') do I get this ticket when I try to go to appadmin/index? Traceback (most recent call last): File N:\web2py\gluon\restricted.py, line 192, in restricted exec ccode in environment File N:/web2py/applications/YAKiToMe/views/appadmin.html, line 339, in module File N:\web2py\gluon\languages.py, line 217, in get_possible_languages possible_languages.append(file_ending.sub('',langfile)) AttributeError: 'tuple' object has no attribute 'append'
Re: [web2py] web2ruby possible?
On Sep 11, 2011, at 1:35 PM, Bruno Rocha wrote: I am more interested in some web2go http://golang.org/ You'd have to work the compiler into the app-development cycle. But I don't think Go is sufficiently dynamic.
[web2py] Re: web2ruby possible?
1+ vote for node.js ;) On 11 Sep., 21:14, David Marko dma...@tiscali.cz wrote: Or to node.js :-)
[web2py] How to create a many-to-one (foreign key) relation to a table not yet defined?
I have two tables, let's call them pages and revisions. Every page has many revisions, so every revision contains the page as a foreign key. The page has also one special revision which is the live one. I am doing (cutting out the unnecessary code): db.define_table('page', Field('live_revision', db.revision), ) db.define_table('revision', Field('page', db.page), ) Now, the first reference to db.revision before the table is created raises an error. In Django, this is solved by quoting the relation name, as in 'db.revision'. Is there a way to solve this in web2py? I could of course create a Field('live_revision_id', 'integer') but I see two problems with it: first, I lose the automatic way of doing e.g. page.live_revision.author to refer to the revision author, and second, I don't think that there is an universal guarantee that auto-generated row ids are integers (are they integers also in GAE?). This must be an issue that comes up often; what's the solution?
[web2py] Re: How to create a many-to-one (foreign key) relation to a table not yet defined?
Oh, I think I see; I should do the first as Field('live_revision', 'reference revision')
Re: [web2py] Re: error in import pyserial
I'm dealing whit this exact issue now, i cant import pyserial. same thing above, its not finding wintypes. and it seems that some manage to import it. I'm willing to control a external device with web2py through serial port.
[web2py] Re: web2py.com is down
Because I was in a hurry and had limited connectivity I did restore a september 4 backup. (which is good because I never tried a VPS.net restore and I am glad worked out of the box). So I do not have the logs of the last few days. I run thin on ram and that may be the problem. I will try get more ram... On Sep 11, 12:50 pm, Jonathan Lundell jlund...@pobox.com wrote: On Sep 11, 2011, at 10:38 AM, Phyo Arkar wrote: was it coz bossie award , too many hits flooded and downed? I'd guess that it's up to us to make use of the Bossie to drive traffic to the site. I wonder how many potential users read InfoWorld? The biggest utility of the award is that it helps to make potential users a little more confident it making the (right) choice.
[web2py] Re: Error running on Ubuntu 10.10 using source
What's in your db.py? On Sep 11, 12:23 pm, aXe akshayminoc...@gmail.com wrote: Hey guys i started working on my new ubuntu10.10 and as soon as i start the administrative interface i get an error saying - Traceback (most recent call last): File gluon/restricted.py, line 192, in restricted File C:/_dev/temp/web2py/applications/welcome/models/db.py, line 18, in module File gluon/dal.py, line 3981, in __init__ RuntimeError: Failure to connect, tried 5 times: 'NoneType' object has no attribute 'connect' I use Python 2.5.6 due to the constraints of it suporting GAE. Appreciate any help Thanks in advance !
[web2py] Re: Issues with TAG() encoding and XML().flatten()
Are you sure your input is UTF8? The web2py markmin_serializer is in gluon/html.py and it is relatively straightforward. Nothing can really go bad there. I suspect your input has not been parsed at all into the web2py object representation. the parsing is done by TAG(input) (not by XML(input)) and it is based on the python built-in XML parser which chokes on non-utf8 chars. It may not be parsting the XML at all and returning the XML as a single string. Massimo On Sep 11, 2:01 pm, jotbe jan.beili...@gmail.com wrote: Hi List, I just started my first Web2Py sample project (the Wiki from the book) and got it even managed to integrate the HTML5 editor Aloha:http://aloha-editor.org/ My pages should use Markmin instead of HTML and therefore I am converting the HTML to Markmin using TAG().flatten() and markmin_serializer. In general it is working and the content is stored as Markmin code, but when using eg. German umlauts like 'öä', TAG() seems to get confused and doesn't handle the encoding properly. On the other hand, when trying to use XML().flatten(render=markmin_serializer) instead of TAG().flatten(render=markmin_serializer), nothing changes at all. XML().flatten(render=markmin_serializer) will return the input HTML string as is, instead of converting it to Markmin. I am trying to solve this issue for two days now and read lots of posts regarding handling of UTF-8 in Python, tried lots of third party modules to workaround this issue, but had no luck so far. I really appreciate your help/tips. :) Various sample code using the Web2Py Shell:https://gist.github.com/caec7bd5b41624d50b01 Thanks in advance!
[web2py] Re: Making slides with web2py and markmin
markmin requires [[...]] not [...] On Sep 11, 2:29 pm, guruyaya guruy...@gmail.com wrote: Ummm, why are you using [[ for links and images instead of just one [ ? It doesn't work for me, when I user the [[ syntax. On Sep 11, 1:36 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: No. It makes the view. You just return it. On Sep 10, 3:53 pm, António Ramos ramstei...@gmail.com wrote: Humm, dont i need a view? Em 10 de setembro de 2011 21:52, António Ramos ramstei...@gmail.comescreveu: Working now :) Em 10 de setembro de 2011 21:29, António Ramos ramstei...@gmail.comescreveu: Traceback (most recent call last): File gluon/restricted.py, line 191, in restricted File gluon/restricted.py, line 178, in compile2 TypeError: compile() expected string without null bytes :( Just a screenshot please 2011/9/10 Michele Comitini michele.comit...@gmail.com +1 Terrific! mic Il giorno 10/set/2011 21:24, Massimo Di Pierro mdipie...@cs.depaul.edu ha scritto: Based on desk.js now you can do this Put the attached slide.py under models (any app). Write a controller like def test(): content = # My slides title ## Slide One this allows you to create slides using markmin ## Slide Two - you can use lists - you can use [[linkshttp://www.google.com]] - you can use images [[imagehttp://image.example.comcenter]] return SLIDE(content,title=My slides) Notice the resulting file is pure html5 with external links therefore it can be downloaded as an independent document.
[web2py] Re: set current languages error [open]
pushing a fix in trunk, please check it in 5 mins. On Sep 11, 4:06 pm, weheh richard_gor...@verizon.net wrote: Why when I set current languages: T.set_current_languages('en','en-en') do I get this ticket when I try to go to appadmin/index? Traceback (most recent call last): File N:\web2py\gluon\restricted.py, line 192, in restricted exec ccode in environment File N:/web2py/applications/YAKiToMe/views/appadmin.html, line 339, in module File N:\web2py\gluon\languages.py, line 217, in get_possible_languages possible_languages.append(file_ending.sub('',langfile)) AttributeError: 'tuple' object has no attribute 'append'
[web2py] Re: web2ruby possible?
I would prefer coffeescript on top of node.js On Sep 11, 4:40 pm, dustin.b dustin.bens...@googlemail.com wrote: 1+ vote for node.js ;) On 11 Sep., 21:14, David Marko dma...@tiscali.cz wrote: Or to node.js :-)
Re: [web2py] Instant Admin third-party security audit?
Hello Eric, It seems that Massimo as already kind of reviewed it : http://groups.google.com/group/web2py/browse_thread/thread/52bd952c11127462/650cb90d4d4ab680?hide_quotes=nopli=1 It seems to be planned to include/replace the actual admin... RIchard On Sat, Sep 10, 2011 at 5:51 PM, Eric hu5...@gmail.com wrote: I'm just writing to find out if a third-party has audited the code for the new instant admin plug-in for web2py (https://github.com/sramana/ web2py-instant-admin). It's a beautiful interface for the db, and I mean nothing personal against the developers, who have done a fantastic job building a great-looking way to access the db. It's just this is a lot of code, and I've not yet gone over the whole thing myself (and would not be the ideal candidate for doing a security audit anyway). And before I give access to my db to a new third-party plug-in, I'd like to know at least that others are using it in production, and ideally that someone skilled in auditing python code for security has taken a close look at it. It would be a great admin interface for admins to use with an app I've created.
[web2py] Re: error in import pyserial
If you are running from source you may need to install Mark Hammond win32 extensions. On Sep 11, 6:27 pm, Fabiano Faver far...@gmail.com wrote: I'm dealing whit this exact issue now, i cant import pyserial. same thing above, its not finding wintypes. and it seems that some manage to import it. I'm willing to control a external device with web2py through serial port.
[web2py] Re: Instant Admin third-party security audit?
I have not reviewed it for security, although I did not find anything suspicious either. On Sep 11, 7:43 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello Eric, It seems that Massimo as already kind of reviewed it :http://groups.google.com/group/web2py/browse_thread/thread/52bd952c11... It seems to be planned to include/replace the actual admin... RIchard On Sat, Sep 10, 2011 at 5:51 PM, Eric hu5...@gmail.com wrote: I'm just writing to find out if a third-party has audited the code for the new instant admin plug-in for web2py (https://github.com/sramana/ web2py-instant-admin). It's a beautiful interface for the db, and I mean nothing personal against the developers, who have done a fantastic job building a great-looking way to access the db. It's just this is a lot of code, and I've not yet gone over the whole thing myself (and would not be the ideal candidate for doing a security audit anyway). And before I give access to my db to a new third-party plug-in, I'd like to know at least that others are using it in production, and ideally that someone skilled in auditing python code for security has taken a close look at it. It would be a great admin interface for admins to use with an app I've created.
[web2py] Re: confused about permissions
OK, looks like this has now been fixed in trunk: http://code.google.com/p/web2py/source/detail?r=dc83425d850190b0306cf59285178f106b1ae9d3 On Sunday, September 11, 2011 2:39:17 PM UTC-4, Anthony wrote: I don't know when that will be fixed (up to Massimo). Quick simple workaround -- somewhere in a model file after the last table definition (or even in the appadmin.py controller): auth.settings.table_permission.table_name.requires=IS_EMPTY_OR(IS_IN_SET(db.tables)) That will update the validator with the full list of all DB tables, which should then appear in the dropdown. Actually, another option would be to set requires=None, which will then allow you to enter any text at all in the at field (could be a table name, or any other name). Technically, the table_name field is supposed to allow for any objects to be named, not just tables, so that may make the most sense (that's what Massimo was suggesting in his comment on the Google Code issue). Anthony On Sunday, September 11, 2011 2:25:31 PM UTC-4, monotasker wrote: Thanks Anthony. I notice it's been a few months since that issue was posted. I realize that changes can't happen overnight, but is there any sense of when a fix might be released? At the moment this basically means the (simple and elegant) crud authorization is useless to me. (I've never learned how to install patches, so I can't easily use the patch posted on that issue). Ian On Sep 9, 11:42 pm, Anthony aba...@gmail.com wrote: Yes, that issue has been reported:http://code.google.com/p/web2py/issues/detail?id=349 Anthony On Friday, September 9, 2011 11:13:04 PM UTC-4, monotasker wrote: One other thing: When I try to create a new permission (on db.auth_permissions) the selectbox for the Table name field isn't showing any of my custom tables. It's only populated with the built in auth tables. Is this the way it's supposed to be? I thought that I could create a permission that links a group name with any table in db. Thanks again, Ian On Sep 9, 6:14 pm, Massimo Di Pierro mass...@gmail.com wrote: Basically you default they do nothing. You can take the fields to mean what you want. You can set them auth.add_persmission(...) and you can check them auth.has_permission(...) or with decorator @auth.requires_permission(...). Things change if you set crud.settings.auth = auth in this case crud will recognize permissions with names = 'read','create','update','delete', and 'select' on the tables that you have specified. The record_id is optional. If not set the permission applied to the entire table. If set the permission applied to the record only. Hope this helps. There is not much more to it really. On Sep 9, 4:31 pm, monotasker sco...@gmail.com wrote: I'm climbing up the learning curve with web2py (which really isn't very steep compared to other tools I've worked with!) and have run into something that I can't figure out from the book: the permissions system. When I create a permission in auth_permissions (using appadmin) I don't understand what each of the field values does (table? name?). The book seems to skip over this very quickly. (I feel compelled to add that the book is the best official documentation I've ever seen for an open source project, with nowhere near the lag or holes in jQuery or Drupal docs. I bought the pdf version because I know the time investment that represents!). Ian
[web2py] Re: error in import pyserial
i'm using admin interface. just tried a 'import serial' and copied pyserial from python site-packages to web2py site-packages
[web2py] Re: Crud.update Multiple
I don't think this can be done with crud, but I'm always ready and expecting to be amazed by some hidden web2py secret. In theory, I don't see why one shouldn't be able to give crud a list of records to be updated and then have crud build the form with multiple record entries. This could be mighty useful IMHO. However, my understanding is that crud is for updating 1 table, 1 record at a time. Custom forms and such are the way to go for more complex behaviors. On Sep 11, 3:55 am, Serbitar rserbi...@googlemail.com wrote: Sure, I know that. But I am explicitly looking for the convenience of crud that also automatically generates the forms for that. I basically want to auto-generate forms that allow updating of multiple values. I know how to do it with custom forms, but that is quite tedious. A crud solution would be much better. On Sep 10, 11:12 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: for fieldvalue in list of values: db.person.insert(name=fieldvalue) Off coarse you can do it for multiple values : list1=[(valfield1,valfield2,valfield3),(etc.),(etc.)] # Note : first tuples = first rows you want to insert for field1, field2, field3 in list1 db.person.insert(field1=field1, field2=field2, field3=field3) db.commit # or you wait and the end of the loop better only one commit Richard On Sat, Sep 10, 2011 at 4:12 PM, Serbitar rserbi...@googlemail.com wrote: To be more specific: Multiple records (found via a query), all with different values of course and one text field for each record. Just one submit button. On Sep 10, 9:55 pm, Serbitar rserbi...@googlemail.com wrote: is there any way toupdatemultiplerecordswith crud.update, or evenrecordswith a given query?
[web2py] Re: Crud.update Multiple
rows = db(yourquery).select(mytable.id, mytable.myfield) form = SQLFORM.factory(*[Field('name_%s'%r.id, default=r.myfield) for r in rows]) if form.process().accepted: for key,value in form.vars.items(): db(mytable.id==key[5:]).update(myfield = value) form.process().accepted is the same as form.accepted(request,session) but shorter. On Sep 10, 2:55 pm, Serbitar rserbi...@googlemail.com wrote: is there any way to update multiple records with crud.update, or even records with a given query?
[web2py] Re: error in import pyserial
If you are using the binary for windows than I do not know what is wrong. If you are suing the source distribution of web2py then you may be missing the win32 extensions and you need to install those separately. I never understood why they do not ship with Python. On Sep 11, 8:57 pm, Fabiano Faver far...@gmail.com wrote: i'm using admin interface. just tried a 'import serial' and copied pyserial from python site-packages to web2py site-packages
[web2py] physics examples in web2py + processing.js
Not really server side intensive, mostly client side but fun project. http://tests.web2py.com/physics2d
[web2py] How to flash a message after a callback
I have a button which does the following callback: ajax('{{=URL('callback')}}',['btn1'],':eval'); Then I have the following callback function in my controller: def callback(): db(db.tbl.id==100).update(data='sampledata') jquery = ??? return jquery I can use jquery = alert('Lame table update message'); but it doesn't appear as good as the response.flash message. 1) How do I emulate response.flash? 2) How to determine if the db update is successful or not so I can flash the appropriate message. Thanks!
Re: [web2py] How to flash a message after a callback
On Sep 11, 2011, at 7:57 PM, Noel Villamor wrote: I have a button which does the following callback: ajax('{{=URL('callback')}}',['btn1'],':eval'); Then I have the following callback function in my controller: def callback(): db(db.tbl.id==100).update(data='sampledata') jquery = ??? return jquery I can use jquery = alert('Lame table update message'); but it doesn't appear as good as the response.flash message. 1) How do I emulate response.flash? To emulate response.flash, you need to put the text into the div with class .flash (the page's js refers to it in jQuery just as .flash); IIRC you're setting that object's html. Then cause it to show itself however you want to--slideDown, like that. 2) How to determine if the db update is successful or not so I can flash the appropriate message. Can't help you there.
[web2py] Re: How to flash a message after a callback
On Sunday, September 11, 2011 10:57:27 PM UTC-4, Noel Villamor wrote: I have a button which does the following callback: ajax('{{=URL('callback')}}',['btn1'],':eval'); Then I have the following callback function in my controller: def callback(): db(db.tbl.id==100).update(data='sampledata') jquery = ??? return jquery I can use jquery = alert('Lame table update message'); but it doesn't appear as good as the response.flash message. 1) How do I emulate response.flash? jQuery('.flash').html('your flash message').slideDown() That's how the web2py_ajax_page() function in /static/js/web2py_ajax.js does it when an Ajax component returns a flash message. 2) How to determine if the db update is successful or not so I can flash the appropriate message. .update() should return the number of rows updated, so maybe just: if db(db.tbl.id==100).update(data='sampledata'): flash='success' else: flash='failure' Anthony
[web2py] Trunk - rev 894137606632 breaks web2py!
Massimo, The change made to gluon/compileapp.py in rev 894137606632http://code.google.com/p/web2py/source/detail?r=8941376066324ba710a2d0885dea7a6fe500982dappears to breakboth web2py under worth Windows 7 and Ubuntu 11.04. The failure is such that a ticket is immediately created and when you try to view the ticket you actually get an error too. After undoing the change, the ticket can be viewed and says: Traceback (most recent call last): File C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\main.py, line 489, in wsgibase serve_controller(request, response, session) File C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\main.py, line 188, in serve_controller environment = build_environment(request, response, session) File C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\compileapp.py, line 269, in build_environment __builtins__['__import__'] = __builtin__.__import__ ### WHY? AttributeError: 'dict' object has no attribute '__import__' The new scheduler (the latest trunk rev 16e51fec2980http://code.google.com/p/web2py/source/detail?r=16e51fec2980146fee2a165db7b4ee91f1e3b47c). The same traceback happens under both Windows 7 and Ubuntu 11.04 C:\Users\Brian\Documents\development\web2py\google hg repo\trunkpython web2py.p y -K scheduler web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.98.2 (2011-09-11 20:21:15) Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB starting scheduler for scheduler... Currently running 1 scheduler processes Processes started Process Process-1: Traceback (most recent call last): File C:\Python26\lib\multiprocessing\process.py, line 232, in _bootstrap self.run() File C:\Python26\lib\multiprocessing\process.py, line 88, in run self._target(*self._args, **self._kwargs) File C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s hell.py, line 189, in run _env = env(a, c=c, import_models=import_models) File C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\s hell.py, line 127, in env environment = build_environment(request, response, session) File C:\Users\Brian\Documents\development\web2py\google hg repo\trunk\gluon\c ompileapp.py, line 269, in build_environment __builtins__.__import__ = __builtin__.__import__ ### WHY? AttributeError: 'dict' object has no attribute '__import__' What issue was the change from __builtins__.__import__ to __builtins['__import__'] supposed to fix? I've been using web2py with Windows 7 without a problem. ~Brian
[web2py] question about loading a component during a callback
I have a component. The controller is standard: # controller def index(): blah blah form=crud(db.mytable,record_id) return dict(form=form) # view index.html ... LOAD(index,index.load,ajax=True) # view index.load {{=show_form(form)}} # model def show_form(form): return DIV(form) Later on, in an onclick triggers for a link causes a server-side callback to select a new record for mytable. I want to get the same form to load up again but with this new record selected. The question is, how can I get the callback to force the new form to get loaded? I tried having the callback return a URL(r=request,c='mycontroller',f='index',args=[new_record_id]) but this didn't seem to work. I figure I could get this to work if I push the form creation onto the view side, but this somehow seems wrong. Suggestions are much appreciated.
[web2py] Re: How to flash a message after a callback
Thank you guys!
[web2py] Re: How to flash a message after a callback
Book states: Code in models, views and controllers is enclosed in web2py code that looks like this: try: execute models, controller function and view except: rollback all connections log the traceback send a ticket to the visitor else: commit all connections save cookies, sessions and return the page If the db update failed in the regular controller I would assume that a ticket page would appear. But what if the db update is in a callback function? @Anthony, it seems that a db update failure would cause the rest of the callback code to be not executed and so the flash='failure' message won't appear at all. On Sep 12, 3:19 pm, Anthony abasta...@gmail.com wrote: .update() should return the number of rows updated, so maybe just: if db(db.tbl.id==100).update(data='sampledata'): flash='success' else: flash='failure' Anthony
[web2py] Re: physics examples in web2py + processing.js
Massimo, I feel like a toddler in a playpen right now. Too many toys I can't decide which one to play! Nice and fun projects you have there. On Sep 12, 2:56 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Not really server side intensive, mostly client side but fun project. http://tests.web2py.com/physics2d