Re: [web2py] Re: Problem with SQLFORM.grid
On 5 September 2011 20:04, brushek luk...@chrustek.net wrote: Can anybody help ? or grid and smartgrid shouldn't be used with custom fields ? I have tried your model and controller and get the following error when I try to use SQLFORM.smartgrid or -grid: File /home/js/web2py/applications/isi_proef/controllers/default.py http://localhost:8000/admin/default/edit/isi_proef/controllers/default.py, line 71, in dodajserwer form = SQLFORM.smartgrid(db.serwery) File /home/js/web2py/gluon/sqlhtml.py, line 1631, in smartgrid user_signature=user_signature,**kwargs) File /home/js/web2py/gluon/sqlhtml.py, line 1386, in grid if field.type in ('string','text')]) TypeError: reduce() of empty sequence with no initial value The setup works with SQLTABLE so if I were you I would look at SOLIDTABLE as an alternative to SQLFORM.grid in this case. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a
[web2py] Re: Published my collection of plugins
Hi António, I implemented a file chooser for the elrte widget. Please try it: http://dev.s-cubism.com/plugin_elrte_widget Since the file chooser is very primitive, you may need to customize it. But, the customization would be easy with the expressive power of web2py (see the demo code). (Notice: I applied a small patch for the original elrte.js to make the file chooser available.) Thanks again for your valuable feedback, Kenji On 9月4日, 午後8:01, António Ramos ramstei...@gmail.com wrote: Thank you. I realy need your plugin ASAP but with the option to attach multiple pdf or doc files. 2011/9/4 kenji4569 hos...@s-cubism.jp the elRTE WYSIWYG Widget does not allow to import a file other than an image. It would be nice to import for example a pdf or a doc file Thanks for your proposal. I think it would be easy to implement it, because the image chooser can be customized to anything. I'll try to do this. Kenji On 9月4日, 午後6:02, António Ramos ramstei...@gmail.com wrote: Hello the elRTE WYSIWYG Widget does not allow to import a file other than an image. It would be nice to import for example a pdf or a doc file Thank you António 2011/9/4 kenji4569 hos...@s-cubism.jp Maybe the actual datepicker could be of some help to figure out how to make it moves... Thanks, but I couldn't read the source of the datepicker since it's compressed (I couldn't find the readable one in the host site). Other solution might be using jquery.ui.draggable, but it's not so light as to just make it draggable. So, for now, I leave the anytime.js unmodified. Kenji On 9月1日, 午後10:53, Richard Vézina ml.richard.vez...@gmail.com wrote: Great! It nice that you take care of feedback... Don't worry about IE ;-) For moving, I think it a most have feature since the actual datepicker has it... What has to be done to make it available? Maybe the actual datepicker could be of some help to figure out how to make it moves... Thank Kenji Richard On Thu, Sep 1, 2011 at 6:35 AM, kenji4569 hos...@s-cubism.jp wrote: Hi Richard, thank you for your feedback. It works great except that it seems to conflict with jQuery UI tabs and dialog... I fixed it (tested Chrome, FF, IE). See: http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui (The anytime css should precede the jquery ui css) It no show up when my form are called with LOAD() I also fixed it. See:http://dev.s-cubism.com/plugin_anytime_widget/test/_/load (I implemented a dynamic loader for js and css) Note however, since IE(=8?) could not put a dynamic css before loaded css, the conflict for jquery-ui still occurs for IE(=8?). see: http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui/load there is no way we can move it like the actual datepicker... This might be difficult to implement. Regards, Kenji On 9月1日, 午前4:25, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello, I just try anydate plugin... It works great except that it seems to conflict with jQuery UI tabs and dialog... It no show up when my form are called with LOAD(), so it also could it be conflicting with LOAD() of web2py. Also there is no way we can move it like the actual datepicker... Richard On Tue, Aug 30, 2011 at 9:47 PM, kenji4569 hos...@s-cubism.jp wrote: I still see the same problem with 'Format', 'Font size' and 'Font' dropdown selections. Sorry, I addressed the issue, and I think it would be fixed. The cause for this is null entry for the text area. Kenji On 8月31日, 午前12:14, tomt tom_tren...@yahoo.com wrote: Hi, I tried your update, and I can now successfully modify text color and background color with IE7 and IE8. Unfortunately I still see the same problem with 'Format', 'Font size' and 'Font' dropdown selections. That is, the dropdown selection is erased before I can select an option. - Tom On Aug 30, 4:05 am, kenji4569 hos...@s-cubism.jp wrote: Hi, Tom. Thank you for reporting the bug. I just fixed it. Please check:http://dev.s-cubism.com/plugin_elrte_widget (you might need to clear the browser cache) [modification detail] I upgraded theelrteversion from 1.2 to 1.3. Additionally, since the version 1.3 had a serious IE problem, I applied some patches for it. I also slightly modified the plugin css not to conflict with the site css. (https://github.com/kenji4569/sqlabs/issues/39) Kenji On 8月30日, 午前11:38, tomt
Re: [web2py] Re: how to avoid shell in the admin
You are the man... :) 2011/9/6 Anthony abasta...@gmail.com On Monday, September 5, 2011 12:18:28 PM UTC-4, Ramos wrote: hello, i dont like the shell in the admin because in windows i cannot repeat last command also the pythonwin is way more friendly... 1 - in windows how can i do the shame as the admin shell using pythonwin or just command line python? I'm not sure you can use PythonWin, but open a command window (cmd.exe), change directory to your \web2py folder, and enter: python web2py -S your_app -N -M You'll get the web2py environment (including the models for your app) in a Python shell. Note, -N tells it to turn off cron, and -M tells it to run the models from your app. See http://web2py.com/book/default/chapter/04#Command-Line-Options. 2 - in windows in command line python how do i execute a function in a controller? When you run the web2py shell (as described above), you can tell it to run a particular controller and function: python web2py -S your_app/your_controller/your_function -N -M Note, you could also just do your_app/your_controller, and once you're in the shell, you can run any function within the controller. Here's a simple batch file you can adapt -- when you click it, it will prompt you for an app (which can include app/controller/function), and it will change to the web2py folder and start the shell for you: @echo off set /P app=Enter web2py app/controller/function to run in the shell (controller/function optional): cd c:\path\to\web2py python web2py.py -S %app% -M -N If you want a nicer command window in Windows, in any command window, click the icon in the upper left, and select Defaults from the menu. There you can change the window size and position, colors, etc., and the changes will affect all command windows. Anthony
[web2py] T empty strings
Hi Massimo For some strange reason the update language mechanism leave out some empty strings. I'm not sure why this bug occurs, my guess is, it's one of the crazy things I'm doing in this project. I was wondering, why an empty string in the translation file, won't return the default string? It doesn't seem reasonable that I'd like a string to appear in one language, but not in another. If you'll take the patch, I'll do this the work of writing it. I just don't want to do a lot of work on the patch - to get it rejected. Thanks Yair
[web2py] Building a non-trivial SOAP service using web2py
Hello all, I'm looking at using web2py to build a SOAP service to work as a test harness for an infrastructure upgrade we're planning. Unfortunately, all the web2py SOAP info I've found has been trivial services such as adding 2 numbers together - in my case, I need my SOAP server to be able to do something more complicated. The sort of complexity I need to build is something like http://www.webservicex.com/stockquote.asmx?WSDL When I query this service from suds, the code looks something like: import suds url = 'http://www.webservicex.com/stockquote.asmx?WSDL' client = suds.client.Client(url) print client Suds ( https://fedorahosted.org/suds/ ) version: 0.4 GA build: R699-20100913 Service ( StockQuote ) tns=http://www.webserviceX.NET/; Prefixes (0) Ports (2): (StockQuoteSoap) Methods (1): GetQuote(xs:string symbol, ) Types (0): (StockQuoteSoap12) Methods (1): GetQuote(xs:string symbol, ) Types (0): client.service.GetQuote('IBM') StockQuotesStockSymbolIBM/SymbolLast166.98/LastDate9/2/2011/DateTime4:00pm/TimeChange0.00/ChangeOpenN/A/OpenHighN/A/HighLowN/A/LowVolume200/VolumeMktCap199.4B/MktCapPreviousClose166.98/PreviousClosePercentageChange0.00%/PercentageChangeAnnRange125.39 - 185.63/AnnRangeEarns12.315/EarnsP-E13.56/P-ENameInternational Bus/Name/Stock/StockQuotes I figure my web2py controller code to do this would look something like: from gluon.tools import Service service = Service(globals()) @service.soap('GetQuote', returns={SOMETHING_HERE}, args={'symbol':str}) def stock_quote(stock): Return stock quote info - everything is hardcoded... symbol = IBM last = 166.98 date = '9/2/2011' quote_time = '4:00pm' change = 0.00 #... return SOMETHING_HERE def call(): return service() I'm trying to work out what the 2 SOMETHING_HERE pieces should look like in the above code. Could someone please point me in the right direction? Thanks in advance Dave M.
Re: [web2py] Re: Problem with SQLFORM.grid
On Tue, Sep 6, 2011 at 4:05 AM, Johann Spies johann.sp...@gmail.com wrote: if field.type in ('string','text')]) TypeError: reduce() of empty sequence with no initial value That is a bug I already reported [0] grid does not works with tables without fields of type 'string' or 'text', also it can't work with fields of type list:integer http://code.google.com/p/web2py/issues/detail?id=386 -- 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 ]
[web2py] create server.crt and server.key certificates
anyone can help me with these file , i dont know what to put in them
[web2py] deploying web2py on IIS
how can i deploy web2py on IIS ??
Re: [web2py] create server.crt and server.key certificates
i followed this tutorial http://www.xenocafe.com/tutorials/linux/centos/openssl/self_signed_certificates/index.php 2011/9/6 Web2Py Freak halna...@gardeniatelco.com anyone can help me with these file , i dont know what to put in them
[web2py] Css Error
Ciao è la prima volta che partecipo ad un gruppo, complimenti per il web2py. Volevo segnalare un errore: quando si crea New application wizard, step1, voce Plugins, non è possibile visualizzare i contenuti, con nessun browser. Basta correggere la classe incriminata con float left .ui-multiselect-checkboxes { float: left; overflow-y: scroll; position: relative; } spero di esservi stato utile! Paolo
Re: [web2py] Re: how to avoid shell in the admin
Sorry, slight mistake -- it's: python web2py.py -S your_app -N -M (I left off the .py in my original reply.) Also, this assumes you have your own installation of Python and you are running the web2py source code version rather than the Windows binary version. If you are running the Windows binary version, instead of the above, do: web2py -S your_app -N -M Instead of asking Python to run the web2py.py file, in this case, you're telling Windows to run the web2py.exe file. Anthony On Tuesday, September 6, 2011 5:02:44 AM UTC-4, Ramos wrote: You are the man... :) 2011/9/6 Anthony abas...@gmail.com On Monday, September 5, 2011 12:18:28 PM UTC-4, Ramos wrote: hello, i dont like the shell in the admin because in windows i cannot repeat last command also the pythonwin is way more friendly... 1 - in windows how can i do the shame as the admin shell using pythonwin or just command line python? I'm not sure you can use PythonWin, but open a command window (cmd.exe), change directory to your \web2py folder, and enter: python web2py -S your_app -N -M You'll get the web2py environment (including the models for your app) in a Python shell. Note, -N tells it to turn off cron, and -M tells it to run the models from your app. See http://web2py.com/book/default/chapter/04#Command-Line-Options. 2 - in windows in command line python how do i execute a function in a controller? When you run the web2py shell (as described above), you can tell it to run a particular controller and function: python web2py -S your_app/your_controller/your_function -N -M Note, you could also just do your_app/your_controller, and once you're in the shell, you can run any function within the controller. Here's a simple batch file you can adapt -- when you click it, it will prompt you for an app (which can include app/controller/function), and it will change to the web2py folder and start the shell for you: @echo off set /P app=Enter web2py app/controller/function to run in the shell (controller/function optional): cd c:\path\to\web2py python web2py.py -S %app% -M -N If you want a nicer command window in Windows, in any command window, click the icon in the upper left, and select Defaults from the menu. There you can change the window size and position, colors, etc., and the changes will affect all command windows. Anthony
[web2py] Email client in Web2py ?
Hello, has anyone thought about creating an app in web2py that would be an email client? Thank you António
[web2py] Re: button calling a action
Thanks Noel and Anthony both have worked! what it was worrying me is that I didn't want to just redirect the user, it will have to run some code and will redirect to specific pages based on user group and data on page. I guess i would put these codes in a page anyway and redirect, but perhaps it will take a second in this page and it must be transparently. now I will insert the code at this function and continue tests.Thanks. ps:Sorry if was not so clear.
[web2py] Re: uploading my web2py website
Shared hosting is the cheapest type of hosting for simple web sites and blogs. In order to get your app to run on a web server, the web server must first have web2py installed. When web2py is installed and running on a server, it acts like an application server (server that runs individual apps). Java developers would relate web2py's server to something like Tomcat, Glassfish, or JBoss. Once these servers are installed, you simply upload your app to them and they run. web2py works the same way. Getting web2py running on a web server is the difficult part. Since you are new at deployments, you should look into FluxFlex, as it does web2py deployment for you and all you have to do is upload your app. Check out the video Massimo made: http://vimeo.com/28112026
[web2py] Re: request.args inconsistent behaviour and ignoring URI valid characters
Exactly! This is an importent security feature. On Sep 5, 9:39 pm, pbreit pbreitenb...@gmail.com wrote: It's hard to say exactly what is allowed but according to my reading ofhttp://tools.ietf.org/html/rfc3986* is definitely not allowed and . and .. may not be allowed in the path (since they have meaning in a file system).
[web2py] Re: deploying web2py on IIS
Try this and please report errors. Start web2py as usual on port 8000 python web2py -p 8000 -i 127.0.0.1 -a 'password' Create: C:\inetpub\wwwroot\web2py C:\inetpub\wwwroot\web2py\bin Download http://managedfusion.com/ and extract C:\inetpub\wwwroot\web2py\Web.config Create C:\inetpub\wwwroot\web2py\ManagedFusion.Rewriter.txt and in it write: RewriteEngine On RewriteCond %{HTTP_HOST} ^yourdomain.com$ [NC] RewriteRule ^(.*)$ http://localhost:8000$1 [P,QSA,L] On Sep 6, 5:03 am, Web2Py Freak halna...@gardeniatelco.com wrote: how can i deploy web2py on IIS ??
[web2py] Re: Css Error
Grazie Paolo. Decisamente utile. On Sep 6, 4:48 am, PaoloPk paolocaval...@gmail.com wrote: Ciao è la prima volta che partecipo ad un gruppo, complimenti per il web2py. Volevo segnalare un errore: quando si crea New application wizard, step1, voce Plugins, non è possibile visualizzare i contenuti, con nessun browser. Basta correggere la classe incriminata con float left .ui-multiselect-checkboxes { float: left; overflow-y: scroll; position: relative; } spero di esservi stato utile! Paolo
[web2py] Re: Email client in Web2py ?
If you are on linux you can create a ~/.forward file that contains |/home/youraccount/yourprogram.py (quotes required) and all received emails will be passed as stdin to / home/youraccount/yourprogram.py. That program can from gluon import * and you are in business! Massimo On Sep 6, 6:48 am, António Ramos ramstei...@gmail.com wrote: Hello, has anyone thought about creating an app in web2py that would be an email client? Thank you António
[web2py] Re: deploying web2py on IIS
where dose my application files go ? or my packed project go
[web2py] Re: deploying web2py on IIS
Massimo , if you may please , can you explain thing a little more this is my first time doing this . Thank you .
[web2py] Re: Published my collection of plugins
web2py gives the file in the download directory for example 5e74c950-95b2-4843-b4c6-53bc8efca8fe/plugin_elrte_widget/download/plugin_e lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63 .doc The former random string is a display file name, and just for demo. The latter one is an actual file name generated by web2py. Now, I remove the former, since it's confusing: http://dev.s-cubism.com/plugin_elrte_widget Changing the latter would require much work with deeper inspection into the web2py upload mechanism. Changing the look and feel such as replacing icons would be easier, and you should see the file_upload_or_choose() function in the usage code of the demo. Note that I do not implement a ready-made image/file chooser, and you have to implement it for your own application, starting from the usage code, including setting up your db and defining your image and file tables. Regards, Kenji On 9月6日, 午後6:01, António Ramos ramstei...@gmail.com wrote: Hello Kenji, Thank you for your fast work One problem! The form is not very friendly. In the submit form i choose a pdf for example myfile.pdf but in the name field you write the name that web2py gives the file in the download directory for example 5e74c950-95b2-4843-b4c6-53bc8efca8fe/plugin_elrte_widget/download/plugin_e lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63 .doc This has no meaning to the user! Please see attached file for what i think it would be really helpfull. Thank you again António 2011/9/6 kenji4569 hos...@s-cubism.jp Hi António, I implemented a file chooser for the elrte widget. Please try it: http://dev.s-cubism.com/plugin_elrte_widget Since the file chooser is very primitive, you may need to customize it. But, the customization would be easy with the expressive power of web2py (see the demo code). (Notice: I applied a small patch for the original elrte.js to make the file chooser available.) Thanks again for your valuable feedback, Kenji On 9月4日, 午後8:01, António Ramos ramstei...@gmail.com wrote: Thank you. I realy need your plugin ASAP but with the option to attach multiple pdf or doc files. 2011/9/4 kenji4569 hos...@s-cubism.jp the elRTE WYSIWYG Widget does not allow to import a file other than an image. It would be nice to import for example a pdf or a doc file Thanks for your proposal. I think it would be easy to implement it, because the image chooser can be customized to anything. I'll try to do this. Kenji On 9月4日, 午後6:02, António Ramos ramstei...@gmail.com wrote: Hello the elRTE WYSIWYG Widget does not allow to import a file other than an image. It would be nice to import for example a pdf or a doc file Thank you António 2011/9/4 kenji4569 hos...@s-cubism.jp Maybe the actual datepicker could be of some help to figure out how to make it moves... Thanks, but I couldn't read the source of the datepicker since it's compressed (I couldn't find the readable one in the host site). Other solution might be using jquery.ui.draggable, but it's not so light as to just make it draggable. So, for now, I leave the anytime.js unmodified. Kenji On 9月1日, 午後10:53, Richard Vézina ml.richard.vez...@gmail.com wrote: Great! It nice that you take care of feedback... Don't worry about IE ;-) For moving, I think it a most have feature since the actual datepicker has it... What has to be done to make it available? Maybe the actual datepicker could be of some help to figure out how to make it moves... Thank Kenji Richard On Thu, Sep 1, 2011 at 6:35 AM, kenji4569 hos...@s-cubism.jp wrote: Hi Richard, thank you for your feedback. It works great except that it seems to conflict with jQuery UI tabs and dialog... I fixed it (tested Chrome, FF, IE). See: http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui (The anytime css should precede the jquery ui css) It no show up when my form are called with LOAD() I also fixed it. See:http://dev.s-cubism.com/plugin_anytime_widget/test/_/load (I implemented a dynamic loader for js and css) Note however, since IE(=8?) could not put a dynamic css before loaded css, the conflict for jquery-ui still occurs for IE(=8?). see: http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui/load there is no way we can move it like the actual datepicker... This might be difficult to implement. Regards, Kenji On 9月1日, 午前4:25, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello, I just try anydate plugin... It works great except that it
[web2py] Re: Web2py in a pure python data acquisition system
Very cool! Thanks for sharing...
[web2py] Re: python isn´t in frozen sys.path
If you want to use your own Python installation, then download the web2py source code version instead of the Windows binary version. The Windows binary version includes its own Python interpreter and standard library and won't work with your regular Python installation. Anthony On Tuesday, September 6, 2011 10:42:45 AM UTC-4, Ramos wrote: what is this? i resolve this issue everytime i restart web2py i go to the shell and import sys del sys.frozen now i have a need to run a controller function every 5 minutes or so and i dont know how to work around this error thank you Antonio
[web2py] views
i wanna ask you guys , dose the html files in views should be working like normal html pages .. and anyone can tell me how to publish my projects ??
[web2py] Re: views
On Tuesday, September 6, 2011 11:05:29 AM UTC-4, Web2Py Freak wrote: i wanna ask you guys , dose the html files in views should be working like normal html pages Not exactly. They are intended to be processed by the web2py framework, which transforms them into standard HTML to be displayed in a browser. Check out http://web2py.com/book/default/chapter/04#Dispatching and http://web2py.com/book/default/chapter/05. .. and anyone can tell me how to publish my projects ?? Do you mean hosting/deployment? Have you looked at http://web2py.com/book/default/chapter/11? Anthony
[web2py] Re: views
would you take a look at my project and tell me what have i done wrong ??
Re: [web2py] Re: python isn´t in frozen sys.path
i´n not using my python instalation I´m using web2py binaries for windows the output you saw is from the web2py console,and not the python command line 2011/9/6 Anthony abasta...@gmail.com If you want to use your own Python installation, then download the web2py source code version instead of the Windows binary version. The Windows binary version includes its own Python interpreter and standard library and won't work with your regular Python installation. Anthony On Tuesday, September 6, 2011 10:42:45 AM UTC-4, Ramos wrote: what is this? i resolve this issue everytime i restart web2py i go to the shell and import sys del sys.frozen now i have a need to run a controller function every 5 minutes or so and i dont know how to work around this error thank you Antonio
[web2py] Re: views
Sure. On Tuesday, September 6, 2011 11:22:36 AM UTC-4, Web2Py Freak wrote: would you take a look at my project and tell me what have i done wrong ??
Re: [web2py] Re: python isn´t in frozen sys.path
On Tuesday, September 6, 2011 11:25:47 AM UTC-4, Ramos wrote: i´n not using my python instalation I´m using web2py binaries for windows the output you saw is from the web2py console,and not the python command line But I think pythoncom.py is trying to import something that isn't included with web2py's binary distribution. If you've got your own Python installation, try using the web2py source version instead of the Windows binary version (it's just as easy to use -- just unzip, and run the web2py.py file instead of the web2py.exe file). Anthony
Re: [web2py] Re: Published my collection of plugins
After i upload a file i get a icon in the text. How do i lauch the file that i just embedded in the text? Thank you 2011/9/6 kenji4569 hos...@s-cubism.jp web2py gives the file in the download directory for example 5e74c950-95b2-4843-b4c6-53bc8efca8fe/plugin_elrte_widget/download/plugin_e lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63 .doc The former random string is a display file name, and just for demo. The latter one is an actual file name generated by web2py. Now, I remove the former, since it's confusing: http://dev.s-cubism.com/plugin_elrte_widget Changing the latter would require much work with deeper inspection into the web2py upload mechanism. Changing the look and feel such as replacing icons would be easier, and you should see the file_upload_or_choose() function in the usage code of the demo. Note that I do not implement a ready-made image/file chooser, and you have to implement it for your own application, starting from the usage code, including setting up your db and defining your image and file tables. Regards, Kenji On 9月6日, 午後6:01, António Ramos ramstei...@gmail.com wrote: Hello Kenji, Thank you for your fast work One problem! The form is not very friendly. In the submit form i choose a pdf for example myfile.pdf but in the name field you write the name that web2py gives the file in the download directory for example 5e74c950-95b2-4843-b4c6-53bc8efca8fe/plugin_elrte_widget/download/plugin_e lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63 .doc This has no meaning to the user! Please see attached file for what i think it would be really helpfull. Thank you again António 2011/9/6 kenji4569 hos...@s-cubism.jp Hi António, I implemented a file chooser for the elrte widget. Please try it: http://dev.s-cubism.com/plugin_elrte_widget Since the file chooser is very primitive, you may need to customize it. But, the customization would be easy with the expressive power of web2py (see the demo code). (Notice: I applied a small patch for the original elrte.js to make the file chooser available.) Thanks again for your valuable feedback, Kenji On 9月4日, 午後8:01, António Ramos ramstei...@gmail.com wrote: Thank you. I realy need your plugin ASAP but with the option to attach multiple pdf or doc files. 2011/9/4 kenji4569 hos...@s-cubism.jp the elRTE WYSIWYG Widget does not allow to import a file other than an image. It would be nice to import for example a pdf or a doc file Thanks for your proposal. I think it would be easy to implement it, because the image chooser can be customized to anything. I'll try to do this. Kenji On 9月4日, 午後6:02, António Ramos ramstei...@gmail.com wrote: Hello the elRTE WYSIWYG Widget does not allow to import a file other than an image. It would be nice to import for example a pdf or a doc file Thank you António 2011/9/4 kenji4569 hos...@s-cubism.jp Maybe the actual datepicker could be of some help to figure out how to make it moves... Thanks, but I couldn't read the source of the datepicker since it's compressed (I couldn't find the readable one in the host site). Other solution might be using jquery.ui.draggable, but it's not so light as to just make it draggable. So, for now, I leave the anytime.js unmodified. Kenji On 9月1日, 午後10:53, Richard Vézina ml.richard.vez...@gmail.com wrote: Great! It nice that you take care of feedback... Don't worry about IE ;-) For moving, I think it a most have feature since the actual datepicker has it... What has to be done to make it available? Maybe the actual datepicker could be of some help to figure out how to make it moves... Thank Kenji Richard On Thu, Sep 1, 2011 at 6:35 AM, kenji4569 hos...@s-cubism.jp wrote: Hi Richard, thank you for your feedback. It works great except that it seems to conflict with jQuery UI tabs and dialog... I fixed it (tested Chrome, FF, IE). See: http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui (The anytime css should precede the jquery ui css) It no show up when my form are called with LOAD() I also fixed it. See: http://dev.s-cubism.com/plugin_anytime_widget/test/_/load (I implemented a dynamic loader for js and css) Note however, since IE(=8?) could not put a dynamic css before loaded css, the conflict for jquery-ui still occurs for IE(=8?). see:
[web2py] Re: python isn´t in frozen sys.path
I'm not sure about the error, but in that screenshot you are running version 1.90. Try doing a mercurial pull/update. You should end up with version 1.98.2. Matt On Sep 6, 9:54 am, António Ramos ramstei...@gmail.com wrote: ok, doing that i got another error sorry 2011/9/6 Anthony abasta...@gmail.com On Tuesday, September 6, 2011 11:25:47 AM UTC-4, Ramos wrote: i´n not using my python instalation I´m using web2py binaries for windows the output you saw is from the web2py console,and not the python command line But I think pythoncom.py is trying to import something that isn't included with web2py's binary distribution. If you've got your own Python installation, try using the web2py source version instead of the Windows binary version (it's just as easy to use -- just unzip, and run the web2py.py file instead of the web2py.exe file). Anthony error.jpg 72KViewDownload
[web2py] Re: views
dear anthony, what happened with you ??
Re: [web2py] Re: python isn´t in frozen sys.path
Working now! updated to 1.98.2 2011/9/6 Matt Gorecki gorecki.m...@gmail.com I'm not sure about the error, but in that screenshot you are running version 1.90. Try doing a mercurial pull/update. You should end up with version 1.98.2. Matt On Sep 6, 9:54 am, António Ramos ramstei...@gmail.com wrote: ok, doing that i got another error sorry 2011/9/6 Anthony abasta...@gmail.com On Tuesday, September 6, 2011 11:25:47 AM UTC-4, Ramos wrote: i´n not using my python instalation I´m using web2py binaries for windows the output you saw is from the web2py console,and not the python command line But I think pythoncom.py is trying to import something that isn't included with web2py's binary distribution. If you've got your own Python installation, try using the web2py source version instead of the Windows binary version (it's just as easy to use -- just unzip, and run the web2py.py file instead of the web2py.exe file). Anthony error.jpg 72KViewDownload
Re: [web2py] Re: Cannot operate on a closed database
Why not so with: request = current.request? Is it safe to use the following? # modules/myobjects.py from gluon import * request,session,response,T,cache = current.request,current.session,current.response,current.T,current.cache and then use some class method : if form.accepts(request, session): Or rather it is better to use directly: if form.accepts(current.request, current.session): Do not think of something analogous to this affirmation made for the db object? the problem is that the latter statement is done at top leve therefor it is only executed once when the module is imported by the first http request. The module is then cached in ram and that line is no longer executed. Therefore db is not the current thread local database object but it is a reference to the db object of the first http request which by now may be closed. You cannot extract objects from the thread local current when you import the module, you have to do it inside functions called when a controller is executed. I apologize for my English. 2011/6/26 Massimo Di Pierro massimo.dipie...@gmail.com I found the cause it this problem. It is not a bug in web2py but something to be careful about in your programs. You have a models/meteo.py which imports modules/meteo.py. models/meteo.py does current.database = db and modules/mete.py does db = current.database the problem is that the latter statement is done at top leve therefor it is only executed once when the module is imported by the first http request. The module is then cached in ram and that line is no longer executed. Therefore db is not the current thread local database object but it is a reference to the db object of the first http request which by now may be closed. You cannot extract objects from the thread local current when you import the module, you have to do it inside functions called when a controller is executed. Hope this makes sense. On Jun 24, 10:31 am, Manuele Pesenti manuele.pese...@gmail.com wrote: dear all, I've added a unique field to some existing tables and w2p gave me an error saing that he cannot add unique fields to a table so I deleted my db and restarted as a new application but I obtained this: ProgrammingError: Cannot operate on a closed database. it's sufficient to comment out the property unique=True and no errors occurs. Here under you can find the complete traceback. Any suggestion?? Thanks a lot Manuele Traceback (most recent call last): File /home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/restricted.py, line 192, in restricted exec ccode in environment File /home/manuele/Dropbox/sviluppo/web2py-1.96.4/applications/wind2pow2/contro llers/appadmin.py, line 410, in module File /home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/globals.py, line 137, in lambda self._caller = lambda f: f() File /home/manuele/Dropbox/sviluppo/web2py-1.96.4/applications/wind2pow2/contro llers/appadmin.py, line 126, in insert form = SQLFORM(db[table], ignore_rw=ignore_rw) File /home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/sqlhtml.py, line 817, in __init__ inp = self.widgets.options.widget(field, default) File /home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/sqlhtml.py, line 206, in widget options = requires[0].options() File /home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/validators.py, line 438, in options self.build_set() File /home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/validators.py, line 426, in build_set records = self.dbset.select(*fields, **dd) File /home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/dal.py, line 5382, in select return self.db._adapter.select(self.query,fields,attributes) File /home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/dal.py, line 1159, in select rows = response(sql) File /home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/dal.py, line 1149, in response self.execute(sql) File /home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/dal.py, line 1234, in execute return self.log_execute(*a, **b) File /home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/dal.py, line 1229, in log_execute ret = self.cursor.execute(*a,**b) ProgrammingError: Cannot operate on a closed database.
[web2py] Re: views
On Tuesday, September 6, 2011 12:15:41 PM UTC-4, Web2Py Freak wrote: dear anthony, what happened with you ?? What do you mean?
[web2py] Re: python isn´t in frozen sys.path
I think the problem was that back in version 1.90, you had to do auth=Auth(globals(),db) -- with the introduction of the new thread local 'current' object, auth=Auth(db) can be used instead, but trying that with an older version will result in this error. Anthony On Tuesday, September 6, 2011 12:02:35 PM UTC-4, Matt Gorecki wrote: I'm not sure about the error, but in that screenshot you are running version 1.90. Try doing a mercurial pull/update. You should end up with version 1.98.2. Matt On Sep 6, 9:54 am, António Ramos ramst...@gmail.com wrote: ok, doing that i got another error sorry 2011/9/6 Anthony abas...@gmail.com On Tuesday, September 6, 2011 11:25:47 AM UTC-4, Ramos wrote: i´n not using my python instalation I´m using web2py binaries for windows the output you saw is from the web2py console,and not the python command line But I think pythoncom.py is trying to import something that isn't included with web2py's binary distribution. If you've got your own Python installation, try using the web2py source version instead of the Windows binary version (it's just as easy to use -- just unzip, and run the web2py.py file instead of the web2py.exe file). Anthony error.jpg 72KViewDownload
[web2py] short but useful facebook api info
http://blog.carduner.net/2011/09/06/easy-facebook-scripting-in-python/
[web2py] Re: deploying web2py on IIS
I am not a windows user s I am just reposting somebody else info. I guess web2py goes in C:\inetpub\wwwroot\web2py and you start it from there cd C:\inetpub\wwwroot\web2py c:/python/python.exe web2py -p 8000 -i 127.0.0.1 -a 'password' C:\inetpub\wwwroot\web2py\Web.config is the only file you need to extract from http://managedfusion.com/ On Sep 6, 9:03 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Try this and please report errors. Start web2py as usual on port 8000 python web2py -p 8000 -i 127.0.0.1 -a 'password' Create: C:\inetpub\wwwroot\web2py C:\inetpub\wwwroot\web2py\bin Downloadhttp://managedfusion.com/and extract C:\inetpub\wwwroot\web2py\Web.config Create C:\inetpub\wwwroot\web2py\ManagedFusion.Rewriter.txt and in it write: RewriteEngine On RewriteCond %{HTTP_HOST} ^yourdomain.com$ [NC] RewriteRule ^(.*)$http://localhost:8000$1[P,QSA,L] On Sep 6, 5:03 am, Web2Py Freak halna...@gardeniatelco.com wrote: how can i deploy web2py on IIS ??
[web2py] Re: views
This was a funny exchange! On Sep 6, 11:47 am, Anthony abasta...@gmail.com wrote: On Tuesday, September 6, 2011 12:15:41 PM UTC-4, Web2Py Freak wrote: dear anthony, what happened with you ?? What do you mean?
[web2py] How to connect DB2 with Python pyodbc
I posted the step by step instruction in my blog. http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-pyodbc.html
[web2py] Using a lambda to set a default
I'm try to use a lambda to set a default value based on a value in another table. Here is my model: db.define_table('trip_instance', timestamp, sos_table, Field('trip_type_id', db.trip_type, label='Trip Type', widget=trip_select_widget, requires = IS_IN_DB(db, 'trip_type.id', '% (name)s'), represent=lambda id:db.trip_type(id)['name']), Field('total_slots', 'integer', default=lambda r: db.trip_type(r.trip_type_id)['total_slots']), Locally this causes an error that says: TypeError: lambda() takes exactly 1 argument (0 given) And on my server (Linode) there is no error but when I try and create a new trip instance with sqlform the total slots field is pre- populated with this: function lambda at 0x7f27684b7140 My lambda looks almost identical to the one that works fine for represent in the trip_type_id field except I'm using the table instead of the field. Is that what I'm doing wrong?
[web2py] When does web2py close database sessions
Hi, The book describes connection pooling and when new sessions are created, but when are they closed ? If I do not have connection pooling turned on, will the session close after each request ? I am trying to determine if I can make use of dynamically created volatile tables in the database. The key is that they only persist and can be accessed within a database session. I thought I would try setting my connection pool to 1 to only get a single session, but will it stay open for later requests ?Note, user concurrency is not an issue for this scenario. Thanks
[web2py] windows xp and source web2py
Hi web2py users, I'm running a web2py server on a windows xp machine. Let's call it the kiosk machine. The kiosk machine has a static IP. I am able to ping the kiosk machine from other computers on the network. However, I'm unable to send an http request from a computer on the network to the kiosk machine. These are not administrative web pages. Why is this? I'm happy to provide more information if needed, thanks in advance. Chris
[web2py] Re: CAS Auth redirect loop
Any news about it? On 31 ago, 18:08, Jay jkel...@gmail.com wrote: The only comment I have is that there may be problem in the code at redirect. Raising an exception in redirect does not seem to work. I would look there. My $.02. Jay
[web2py] blog post on web2py + db2
http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-pyodbc.html
[web2py] Re: windows xp and source web2py
How are you starting web2py? You should be using python.exe web2py.py -i 0.0.0.0 -p 80 0.0.0.0 means accessible publicly (if no firewall) and -p 80 sets the port. On Sep 6, 2:15 pm, Christopher Baron cba...@fieldmuseum.org wrote: Hi web2py users, I'm running a web2py server on a windows xp machine. Let's call it the kiosk machine. The kiosk machine has a static IP. I am able to ping the kiosk machine from other computers on the network. However, I'm unable to send an http request from a computer on the network to the kiosk machine. These are not administrative web pages. Why is this? I'm happy to provide more information if needed, thanks in advance. Chris
Re: [web2py] short but useful facebook api info
On Tue, Sep 6, 2011 at 2:41 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: http://blog.carduner.net/2011/09/06/easy-facebook-scripting-in-python/ Awesome! Thanks for sharing it. I added it classes in facebook.py, now I have a more complete facebok graph API. How easy is to upload entire photo albums to facebook in one line of code. Great! Thank you.
[web2py] Re: windows xp and source web2py
Ah, I see, thanks. This allows remote machines to hit the server, but the request receives a 200. Let's say this machine is on a secure network. If I wanted to hack web2py so that remote machines on the network could access the application, could I simply uncomment line 17 from applications/models/access.py ? #raise HTTP(200, T('Admin is disabled because insecure channel')) On Sep 6, 2:40 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: How are you starting web2py? You should be using python.exe web2py.py -i 0.0.0.0 -p 80 0.0.0.0 means accessible publicly (if no firewall) and -p 80 sets the port. On Sep 6, 2:15 pm, Christopher Baron cba...@fieldmuseum.org wrote: Hi web2py users, I'm running a web2py server on a windows xp machine. Let's call it the kiosk machine. The kiosk machine has a static IP. I am able to ping the kiosk machine from other computers on the network. However, I'm unable to send an http request from a computer on the network to the kiosk machine. These are not administrative web pages. Why is this? I'm happy to provide more information if needed, thanks in advance. Chris
[web2py] Date Picker Widget
Wondering if anyone saw any new neat date picker widgets lately? Also; How hard would it be to replace the current date picker with jquery-ui datepicker? Thanks.
[web2py] Re: views
Freak, have you read the web2py book? There's a lot of information about views and how to deploy web2py. It's goin to be difficult to explain those topics here in google groups.
[web2py] Re: button calling a action
That's how regular web2py form handling works.
Re: [web2py] blog post on web2py + db2
Great i tested the example from the python shell and i connected to my company AS400 with success. FANTASTIC Tomorrow i will kick the ass of the RPG guy. :) 2011/9/6 Massimo Di Pierro massimo.dipie...@gmail.com http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-pyodbc.html
Re: [web2py] blog post on web2py + db2
I tried the DAL Example and i could not connect to my AS400 does the DAL only works with db2 on windows or linux? i have my db2 in a OS400 machine Thank you António Em 6 de setembro de 2011 21:56, António Ramos ramstei...@gmail.comescreveu: Great i tested the example from the python shell and i connected to my company AS400 with success. FANTASTIC Tomorrow i will kick the ass of the RPG guy. :) 2011/9/6 Massimo Di Pierro massimo.dipie...@gmail.com http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-pyodbc.html
[web2py] Re: Date Picker Widget
I didn't replace the one in web2py, I just use the jQueryUI one by including the necessary CSS and JS files and placing the files in static/js and static/css after downloading a custom build from jQueryUI In the view where it is needed I add these lines before the extend 'layout.html' line {{response.files.append(URL('static','css/cupertino/jquery-ui-1.8.14.custom.css'))}} {{response.files.append(URL('static','js/jquery-ui-1.8.14.custom.min.js'))}}
[web2py] Re: Date Picker Widget
Have you seen this: http://dev.s-cubism.com/plugin_anytime_widget? On Tuesday, September 6, 2011 4:40:49 PM UTC-4, David J wrote: Wondering if anyone saw any new neat date picker widgets lately? Also; How hard would it be to replace the current date picker with jquery-ui datepicker? Thanks.
[web2py] Re: blog post on web2py + db2
No, you can connect to the OS400 machine (Actually, that's where I tested) Check your System: name ,SQL default library: name, user id and password. If your machine can start session with iSeries Access then you can connect. On Sep 6, 4:07 pm, António Ramos ramstei...@gmail.com wrote: I tried the DAL Example and i could not connect to my AS400 does the DAL only works with db2 on windows or linux? i have my db2 in a OS400 machine Thank you António Em 6 de setembro de 2011 21:56, António Ramos ramstei...@gmail.comescreveu: Great i tested the example from the python shell and i connected to my company AS400 with success. FANTASTIC Tomorrow i will kick the ass of the RPG guy. :) 2011/9/6 Massimo Di Pierro massimo.dipie...@gmail.com http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-p...
Re: [web2py] Re: Date Picker Widget
{{response.files.append(URL('static','css/cupertino/jquery-ui-1.8.14.custom.css'))}} {{response.files.append(URL('static','js/jquery-ui-1.8.14.custom.min.js'))}} I included the files above and also changed web2py_ajax.js[0] a bit As you can see in line 37 I kept the default calendar only when form is enclosed in .w2pcalendar class, when form has .uicalendar css class It loads jquery-ui calendar as you can see in lines 40-65 [0]https://gist.github.com/1199030
Re: [web2py] Re: blog post on web2py + db2
Works for me. I'm running from source using trunk from a week or so ago. Did not work for me when running on windows running web2py.exe. Probably has to do with PyODBC not being available unless you have it in the modules directory. Just a thought -Jim On 9/6/2011 4:32 PM, Omi Chiba wrote: No, you can connect to the OS400 machine (Actually, that's where I tested) Check your System: name ,SQL default library: name, user id and password. If your machine can start session with iSeries Access then you can connect. On Sep 6, 4:07 pm, António Ramosramstei...@gmail.com wrote: I tried the DAL Example and i could not connect to my AS400 does the DAL only works with db2 on windows or linux? i have my db2 in a OS400 machine Thank you António Em 6 de setembro de 2011 21:56, António Ramosramstei...@gmail.comescreveu: Great i tested the example from the python shell and i connected to my company AS400 with success. FANTASTIC Tomorrow i will kick the ass of the RPG guy. :) 2011/9/6 Massimo Di Pierromassimo.dipie...@gmail.com http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-p...
Re: [web2py] blog post on web2py + db2
Ok, seems to get someting now. I have to change in AS400 the permissions to allow my username to create a table ProgrammingError: ('42000', '[42000] [IBM][Controlador ODBC do iSeries Access][DB2 UDB]SQL0551 - Not authorized to object in *N type *USRPRF. (-551) (SQLExecDirectW)') How about using auth with as400 users. Is it possible? Thank you Em 6 de setembro de 2011 22:07, António Ramos ramstei...@gmail.comescreveu: I tried the DAL Example and i could not connect to my AS400 does the DAL only works with db2 on windows or linux? i have my db2 in a OS400 machine Thank you António Em 6 de setembro de 2011 21:56, António Ramos ramstei...@gmail.comescreveu: Great i tested the example from the python shell and i connected to my company AS400 with success. FANTASTIC Tomorrow i will kick the ass of the RPG guy. :) 2011/9/6 Massimo Di Pierro massimo.dipie...@gmail.com http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-pyodbc.html
[web2py] Re: short but useful facebook api info
Shall we include it contrib? if no dependencies On Sep 6, 2:59 pm, Bruno Rocha rochacbr...@gmail.com wrote: On Tue, Sep 6, 2011 at 2:41 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: http://blog.carduner.net/2011/09/06/easy-facebook-scripting-in-python/ Awesome! Thanks for sharing it. I added it classes in facebook.py, now I have a more complete facebok graph API. How easy is to upload entire photo albums to facebook in one line of code. Great! Thank you.
[web2py] Re: button calling a action
you can do {{=A('clickme',callback=URL())}} and the URL is called via ajax. You can also pass a target=... the id of a DIV where to post the result and a delete='tr' which will delete the tr including the link. On Sep 6, 3:51 pm, pbreit pbreitenb...@gmail.com wrote: That's how regular web2py form handling works.
[web2py] Re: Date Picker Widget
I use jquery datetimepicker (from http://trentrichardson.com/examples/timepicker/) Seems to work OK, but I use only ISO style data inputs using internationalizations is probably only a matter of time spent on the initialization on timeFormat and dateFormat excerpt from web2py_ajax.js try { jQuery(input.datetime).datetimepicker({ timeFormat: 'hh:mm:ss', dateFormat : 'yy-mm-dd', showOtherMonths: true, selectOtherMonths: true }); } catch(e) {}; try { jQuery(input.date).datepicker({ dateFormat : 'yy-mm-dd', showOtherMonths: true, selectOtherMonths: true }); } catch(e) {}; try { jQuery(input.time).timepicker({ timeFormat: 'hh:mm:ss' }); } catch(e) {}; .
Re: [web2py] Re: short but useful facebook api info
There is no dependency, I just put fbconsole.py in my /modules and did something like this: import fbconsole fbconsole.APP_ID = CLIENT_ID # comes from facebook auth, (Michelle's code) fbconsole.SERVER_PORT = 8000 fbconsole.REDIRECT_URI = 'http://localhost:%s/tutor' % fbconsole.SERVER_PORT fbconsole.ACCESS_TOKEN = session.token['access_token'] # I am already using facebook for auth, no need to Auth again. fbconsole.LOCAL_FILE = '%s_fb_access_token' % auth.user_id fbconsole.AUTH_SCOPE = ['publish_stream,create_event,user_events,user_photos'] photo = fbconsole.graph_post(/me/photos, {message:My Photo, source:open(/home/rochacbruno/myphoto.png)}) I think it is a good idea to have it in contrib!
[web2py] contrib module for cache stored in redis
I think I have a first working draft for using redis as a backend for cache like gluon.contrib.memcache I dind't get completely the internals of cache, though . storing with 'predefined' keys works ok, and also the expire works out of the box. I removed the mutex lock found in other cache backends because I think redis ensures atomic operations and avoids conflicts out of the box. According to https://github.com/andymccurdy/redis-py connections are managed by the module itself , but that needs testing (I can see connections created and dropped regularly, so it's not leaking incrementally, but on overloaded systems I can't tell) Caching values with fixed keys works, caching selects works, use as decorator works I didn't quite get all the self.meta_storage use can someone explain to me ?
[web2py] 500 INTERNAL SERVER ERROR
I'm able to connect to mssql using python and in test mode. but I'm getting the 500 internal server errroris there a way to figure out what the problem is? log looks pretty messy. I'm was trying to get json back from mssql. Was successful under mysql. json format does not seem to be anydifferent under either one.
Re: [web2py] 500 INTERNAL SERVER ERROR
Yea, Inapplications admin page, on top right you will find error log button in the menu (or link https://127.0.0.1:8000/admin/default/errors/APPNAME) Also It might be useful to use Firebug, (i.i network, script) Cheers good luck On 7 September 2011 01:08, patrick moon pmo...@gmail.com wrote: I'm able to connect to mssql using python and in test mode. but I'm getting the 500 internal server errroris there a way to figure out what the problem is? log looks pretty messy. I'm was trying to get json back from mssql. Was successful under mysql. json format does not seem to be anydifferent under either one.
[web2py] Re: Published my collection of plugins
After i upload a file i get a icon in the text. How do i lauch the file that i just embedded in the text? The elrte editor prevents the icon link from clicking to download the file. So you have to first submit the editing html, and save the html in db, and then display the html in the view (as {{=XML(record.text)}}). But currently, the demo do not demonstrate this (so you need to implement this on your app). In the meantime, you can check the html source from the editor by clicking the source tab at the bottom of the editor. Kenji On 9月7日, 午前1:02, António Ramos ramstei...@gmail.com wrote: After i upload a file i get a icon in the text. How do i lauch the file that i just embedded in the text? Thank you 2011/9/6 kenji4569 hos...@s-cubism.jp web2py gives the file in the download directory for example 5e74c950-95b2-4843-b4c6-53bc8efca8fe/plugin_elrte_widget/download/plugin_e lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63 .doc The former random string is a display file name, and just for demo. The latter one is an actual file name generated by web2py. Now, I remove the former, since it's confusing: http://dev.s-cubism.com/plugin_elrte_widget Changing the latter would require much work with deeper inspection into the web2py upload mechanism. Changing the look and feel such as replacing icons would be easier, and you should see the file_upload_or_choose() function in the usage code of the demo. Note that I do not implement a ready-made image/file chooser, and you have to implement it for your own application, starting from the usage code, including setting up your db and defining your image and file tables. Regards, Kenji On 9月6日, 午後6:01, António Ramos ramstei...@gmail.com wrote: Hello Kenji, Thank you for your fast work One problem! The form is not very friendly. In the submit form i choose a pdf for example myfile.pdf but in the name field you write the name that web2py gives the file in the download directory for example 5e74c950-95b2-4843-b4c6-53bc8efca8fe/plugin_elrte_widget/download/plugin_e lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63 .doc This has no meaning to the user! Please see attached file for what i think it would be really helpfull. Thank you again António 2011/9/6 kenji4569 hos...@s-cubism.jp Hi António, I implemented a file chooser for the elrte widget. Please try it: http://dev.s-cubism.com/plugin_elrte_widget Since the file chooser is very primitive, you may need to customize it. But, the customization would be easy with the expressive power of web2py (see the demo code). (Notice: I applied a small patch for the original elrte.js to make the file chooser available.) Thanks again for your valuable feedback, Kenji On 9月4日, 午後8:01, António Ramos ramstei...@gmail.com wrote: Thank you. I realy need your plugin ASAP but with the option to attach multiple pdf or doc files. 2011/9/4 kenji4569 hos...@s-cubism.jp the elRTE WYSIWYG Widget does not allow to import a file other than an image. It would be nice to import for example a pdf or a doc file Thanks for your proposal. I think it would be easy to implement it, because the image chooser can be customized to anything. I'll try to do this. Kenji On 9月4日, 午後6:02, António Ramos ramstei...@gmail.com wrote: Hello the elRTE WYSIWYG Widget does not allow to import a file other than an image. It would be nice to import for example a pdf or a doc file Thank you António 2011/9/4 kenji4569 hos...@s-cubism.jp Maybe the actual datepicker could be of some help to figure out how to make it moves... Thanks, but I couldn't read the source of the datepicker since it's compressed (I couldn't find the readable one in the host site). Other solution might be using jquery.ui.draggable, but it's not so light as to just make it draggable. So, for now, I leave the anytime.js unmodified. Kenji On 9月1日, 午後10:53, Richard Vézina ml.richard.vez...@gmail.com wrote: Great! It nice that you take care of feedback... Don't worry about IE ;-) For moving, I think it a most have feature since the actual datepicker has it... What has to be done to make it available? Maybe the actual datepicker could be of some help to figure out how to make it moves... Thank Kenji Richard On Thu, Sep 1, 2011 at 6:35 AM, kenji4569 hos...@s-cubism.jp wrote: Hi Richard, thank you for your feedback. It works great except that it seems to conflict with jQuery UI tabs
[web2py] Re: blog post on web2py + db2
How about using auth with as400 users. Is it possible? I'm not sure about it since I'm still new for web2py but your problem should be related to the permission just like your error says. My library is like... Object secured by authorization list . . . . . . . . . . . . *NONE Object UserGroup Authority *PUBLIC *CHANGE QSECOFR *ALL and my user has... Special authority . . . . . . . SPCAUT *ALLOBJ Maybe create new library and connect with the most high authority user might help. On Sep 6, 4:49 pm, António Ramos ramstei...@gmail.com wrote: Ok, seems to get someting now. I have to change in AS400 the permissions to allow my username to create a table ProgrammingError: ('42000', '[42000] [IBM][Controlador ODBC do iSeries Access][DB2 UDB]SQL0551 - Not authorized to object in *N type *USRPRF. (-551) (SQLExecDirectW)') How about using auth with as400 users. Is it possible? Thank you Em 6 de setembro de 2011 22:07, António Ramos ramstei...@gmail.comescreveu: I tried the DAL Example and i could not connect to my AS400 does the DAL only works with db2 on windows or linux? i have my db2 in a OS400 machine Thank you António Em 6 de setembro de 2011 21:56, António Ramos ramstei...@gmail.comescreveu: Great i tested the example from the python shell and i connected to my company AS400 with success. FANTASTIC Tomorrow i will kick the ass of the RPG guy. :) 2011/9/6 Massimo Di Pierro massimo.dipie...@gmail.com http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-p...
[web2py] Re: short but useful facebook api info
Please send me a patch. Make sure it includes is own license (MIT, BSD or LGPL). On Sep 6, 6:07 pm, Bruno Rocha rochacbr...@gmail.com wrote: There is no dependency, I just put fbconsole.py in my /modules and did something like this: import fbconsole fbconsole.APP_ID = CLIENT_ID # comes from facebook auth, (Michelle's code) fbconsole.SERVER_PORT = 8000 fbconsole.REDIRECT_URI = 'http://localhost:%s/tutor'% fbconsole.SERVER_PORT fbconsole.ACCESS_TOKEN = session.token['access_token'] # I am already using facebook for auth, no need to Auth again. fbconsole.LOCAL_FILE = '%s_fb_access_token' % auth.user_id fbconsole.AUTH_SCOPE = ['publish_stream,create_event,user_events,user_photos'] photo = fbconsole.graph_post(/me/photos, {message:My Photo, source:open(/home/rochacbruno/myphoto.png)}) I think it is a good idea to have it in contrib!
[web2py] Re: contrib module for cache stored in redis
meta_storage is a dict and a class variable (there is only one for all apps). Given one app meta_storage[app] is the dictionary that stores that cache for that app. You do not need this if you use a third party cache system but make sure the generated keys includes a prefix that avoids conflicts between apps. On Sep 6, 6:42 pm, Niphlod niph...@gmail.com wrote: I think I have a first working draft for using redis as a backend for cache like gluon.contrib.memcache I dind't get completely the internals of cache, though . storing with 'predefined' keys works ok, and also the expire works out of the box. I removed the mutex lock found in other cache backends because I think redis ensures atomic operations and avoids conflicts out of the box. According tohttps://github.com/andymccurdy/redis-pyconnections are managed by the module itself , but that needs testing (I can see connections created and dropped regularly, so it's not leaking incrementally, but on overloaded systems I can't tell) Caching values with fixed keys works, caching selects works, use as decorator works I didn't quite get all the self.meta_storage use can someone explain to me ?
[web2py] Re: deploying web2py on IIS
Perhaps check out web2pyslices.com -- http://www.web2pyslices.com/slices/take_slice/128 Install web2py on Windows with IIS I haven't tried it (I just use the built-in rocket server or apache + mod_wsgi even on windows) Good Luck ~Brian
[web2py] Bug: Text field length default limit to 512 characters ?
Hi. I found in 1.98.2, text field type default length is 512 not 65536? It's correct? Toan.
[web2py] Iterate through form.vars
Code: if form.accepts(request.vars, session): arr = ['a','b','c'] for i in range(3): arr[i] = form.vars.x Desired: In the for loop, I wanted to have arr[0] = form.vars.x0 arr[1] = form.vars.x1 arr[2] = form.vars.x2 As you can see, I am not yet a pythonista. :) Thanks!
[web2py] Re: Bug: Text field length default limit to 512 characters ?
Do an explicit length declaration in your model definition: Field('txt','text', length=65536), Look here: http://www.web2py.com/book/default/chapter/06?search=Field+constructor On Sep 7, 3:10 pm, toan75 toa...@gmail.com wrote: Hi. I found in 1.98.2, text field type default length is 512 not 65536? It's correct? Toan.