Re: [web2py] Re: Unit testing in web2py : Some thoughts

2010-02-25 Thread Nicol van der Merwe
Hi guys This stuff is very interesting. I would like to request, if possible, that someone makes a web2pyslice or proper AlterEgo entry on how to setup and run these kinds of tests for web2py. I am very interested in setting up tests for my application but I'm a bit lost as I've never done so befo

Re: [web2py] Re: Download and Update Progress +a general question

2010-02-25 Thread Tiago Almeida
Sorry for the misunderstanding. When I said it was horrible I meant that redirecting stdout is not a very elegant solution, but works. Don't know how you could do what you need, showing the progress of the script. Regards, Tiago -- On Wed, Feb 24, 2010 at 10:35 PM, AsmanCom wrote: > Yo Tiango,

[web2py] Re: mail plain text message wrong charset

2010-02-25 Thread szimszon
I tested it again, I created a new scaffolding app with the admin interface then I changed: db.py: mail=Mail() # mailer mail.settings.server='localhost:25'# your SMTP server mail.settings.sender='pr...@localhost' # your email default.py (controller) de

RE: [web2py] Multiple Select Widget

2010-02-25 Thread Michael Howden
Thanks for the suggestion. You mean: | | | ? You just mean for the countries selected? And I could hide the actual check box itself? Would that be enough to ensure the values are saved with the form? I tried to use a text box instead, but it just proved more difficult! I think I m

[web2py] Re: Download and Update Progress +a general question

2010-02-25 Thread mdipierro
redirecting stdout does not work unless you have a global locker that locks web2py while you do the redirect. Otherwise if two threads (two requests) do it at the same time you get wrong output and you may completely loose stdout. On Feb 25, 3:53 am, Tiago Almeida wrote: > Sorry for the misunders

[web2py] Re: Multiple Select Widget

2010-02-25 Thread mdipierro
Why not do this? http://web2py.com/plugins/default/multiselect On Feb 22, 5:19 am, Tiago Almeida wrote: > > Is there a better way to do this type of functionality rather than > > using a hidden multiple widget? > > Why not make a simple table/list of checkboxes next to each country? > --- > Tiag

[web2py] Re: mail plain text message wrong charset

2010-02-25 Thread mdipierro
Because encoding="utf-8" is default. You have to figure out what is the encoding you need. On Feb 25, 4:32 am, szimszon wrote: > I tested it again, > > I created a new scaffolding app with the admin interface then I > changed: > db.py: > mail=Mail()                                  

[web2py] Re: Some interrogations concerning Web2py compatibilities

2010-02-25 Thread Magnitus
Thanks for the heads up. I did run web2py.py directly and while it works, I got the following warning: WARNING:root:no file locking It seems to work otherwise, but I'd still like some clarification on the warning if anybody knows. Parallel to this, I found a py2exe to make a 64 bit binary at (d

[web2py] SQLFORM displays "text" values with text, not textareas

2010-02-25 Thread mdmcginn
Section 7.2 of the book says, "A SQLFORM displays "boolean" values with checkboxes, "text" values with textareas," etc. But instead, it apparently displays "text" values with text. Others have asked how to make them display as textareas - as larger input fields. Sure, I could use FORM instead of SQ

[web2py] Re: Some interrogations concerning Web2py compatibilities

2010-02-25 Thread mdipierro
On Feb 25, 4:02 am, Magnitus wrote: > Thanks for the heads up. > > I did run web2py.py directly and while it works, I got the following > warning: > > WARNING:root:no file locking what os are you using. This should work o Posix and win32. About your other issue. py2exe and py2app have a bug and

[web2py] Re: SQLFORM displays "text" values with text, not textareas

2010-02-25 Thread mdipierro
I am not sure I understand your question. The book is correct 'text' is rendered by a textarea. Here is an example: $ python web2py.py -S welcome -M >>> print SQLFORM.factory(Field('test','text')) Test: same with formal SQLFORM, crud.create and crud.update. Do you get a different output? Massi

Re: [web2py] Re: Some interrogations concerning Web2py compatibilities

2010-02-25 Thread Tiago Almeida
For the root no file locking, try: Install "Python for windows extensions>" (If you're using windows) I had a similar issue and documented her

[web2py] newly created app fails in shell mode in 1.75.4

2010-02-25 Thread DenesL
Using 1.75.4, a newly created app fails to start in shell mode (-M -N - S) with: web2py Enterprise Web Framework Created by Massimo Di Pierro, Copyright 2007-2010 Version 1.75.4 (2010-02-18 14:55:03) Database drivers available: pysqlite2, MSSQL/DB2 Traceback (most recent call last): File "C:\web

[web2py] Re: Some interrogations concerning Web2py compatibilities

2010-02-25 Thread Magnitus
>what os are you using. This should work o Posix and win32. Windows Vista, 64-bit. I got the 64-bit download for the windows extension at the link that Tiago mentioned and it 'fixed' the warning message (though I'm still puzzled at why a special windows extension was needed on top of the release

[web2py] Re: mail plain text message wrong charset

2010-02-25 Thread szimszon
I need utf-8 :) On febr. 25, 12:20, mdipierro wrote: > Because               encoding="utf-8" is default. You have to figure > out what is the encoding you need. > > On Feb 25, 4:32 am, szimszon wrote: > > > > > I tested it again, > > > I created a new scaffolding app with the admin interface th

[web2py] Re: Unit testing in web2py : Some thoughts

2010-02-25 Thread Jon Romero
Yeap, spiffytech where you able to run tests (no doctests) using the database? On Feb 25, 11:20 am, Nicol van der Merwe wrote: > Hi guys > > This stuff is very interesting. I would like to request, if possible, that > someone makes a web2pyslice or proper AlterEgo entry on how to setup and run >

[web2py] Re: Unit testing in web2py : Some thoughts

2010-02-25 Thread spiffytech
I'm going to write up a nice, clear wiki article on unit testing with the unittest module based on what I learned in this discussion. I'll be sure to link to it here when it's done. On Feb 25, 4:20 am, Nicol van der Merwe wrote: > Hi guys > > This stuff is very interesting. I would like to reque

Re: [web2py] Re: Unit testing in web2py : Some thoughts

2010-02-25 Thread Nicol van der Merwe
Super awesome, thanks! On Thu, Feb 25, 2010 at 3:43 PM, spiffytech wrote: > I'm going to write up a nice, clear wiki article on unit testing with > the unittest module based on what I learned in this discussion. I'll > be sure to link to it here when it's done. > > > On Feb 25, 4:20 am, Nicol va

[web2py] Re: Unit testing in web2py : Some thoughts

2010-02-25 Thread spiffytech
execfile() did the trick! Things are working nicely now. Using a test database would be very helpful. How do you recommend setting one up? Do I need to copy/paste the table/field definitions from the 'db' object, or is there a way to make a copy of the 'db' object and point it to a different SQLit

Re: [web2py] Re: Unit testing in web2py : Some thoughts

2010-02-25 Thread Tiago Almeida
I concur. Thanks :) On Thu, Feb 25, 2010 at 1:52 PM, Nicol van der Merwe wrote: > Super awesome, thanks! > > > On Thu, Feb 25, 2010 at 3:43 PM, spiffytech wrote: > >> I'm going to write up a nice, clear wiki article on unit testing with >> the unittest module based on what I learned in this dis

[web2py] Re: Plugin system status

2010-02-25 Thread mr.freeze
A simple approach would be to adopt the naming convention 'plugin_object' for any objects the developer wants to expose to the plugin system then just create global labels: >>>class Plugins(object): >>>def __init__(self,globals,**kargs): >>>for k,v in kargs.items(): >>>glob

[web2py] zen html

2010-02-25 Thread selecta
Sometimes you still have to write html in web2py which is annoying. It might not be new to all of you but I just discovered zen html that really speeds up the process. In my example i customized the zen key to ctrl + z What it does: type div.box and you get with you cursor in the middle of the d

Re: [web2py] Re: web2py with Cherokee via uWSGI: a simple, easy guide

2010-02-25 Thread Thadeus Burgess
Can I have cherokee uwsgi and apache mod_wsgi running on the same web2py code base or should I make a copy so cherokee can execute it ? You are right I could run cherokee on a non-standard port for testing and always switch it over when I am happy with it! -Thadeus On Wed, Feb 24, 2010 at 11

[web2py] Re: How to deploy my first app

2010-02-25 Thread Al
Brian, Finally I found the mistake which causes all this trouble in accessing the non-admin pages, I had the following line in the default.py in myapp: return dict(form=form, images=images, admin = admin) On Feb 22, 6:11 am, Brian M wrote: > Al, > > I setup a stunnel server on Win7 which also h

Re: [web2py] newly created app fails in shell mode in 1.75.4

2010-02-25 Thread Thadeus Burgess
Permission error when running in shell mode? -Thadeus On Thu, Feb 25, 2010 at 5:47 AM, DenesL wrote: > Using 1.75.4, a newly created app fails to start in shell mode (-M -N - > S) with: > > web2py Enterprise Web Framework > Created by Massimo Di Pierro, Copyright 2007-2010 > Version 1.75.4 (

Re: [web2py] Re: mail plain text message wrong charset

2010-02-25 Thread Thadeus Burgess
There might be an issue that web2py is encoding the email correctly, however your SMTP server is re-coding this into its own encoding. I use Google Apps to send all of my emails with my web2py instances. I just checked some of the messages received and they are all encoded "us-ascii". Further inv

[web2py] Re: How to deploy my first app

2010-02-25 Thread Al
Brian, Finally I found the mistakes which causes all the troubles of accessing the non-admin pages: return dict(form=form, images=images, admin = admin) I have the above line in the default.py controller, that why it keeps asking for admin authentication even I tried to navigate the default home

Re: [web2py] Re: Unit testing in web2py : Some thoughts

2010-02-25 Thread Thadeus Burgess
So the easiest way to use a testing db and your existing tables is to automatically recreate them. So assuming you are in the web2py environment and have access to ``db`` >>> test_db = DAL('testing.sqlite') >>> for tablename in db.tables: >>> table_copy = [copy.copy(f) for f in db[tablename]]

[web2py] Re: newly created app fails in shell mode in 1.75.4

2010-02-25 Thread DenesL
On Feb 25, 11:10 am, Thadeus Burgess wrote: > Permission error when running in shell mode? > Strange, huh?. It happens on both WinXP and 2003 server. And just clicking on 'database administration' in app's admin fixes it. -- You received this message because you are subscribed to the Google

Re: [web2py] Re: Plugin system status

2010-02-25 Thread Thadeus Burgess
I can't stress enough. web2py plugins should be geared towards developers, not end-users. (Someone who runs their own wordpress blog would be an end-user of wordpress). Plugins should be there to provide a standard for common functionality so that everyone who comes along to web2py does not have t

Re: [web2py] Re: newly created app fails in shell mode in 1.75.4

2010-02-25 Thread Thadeus Burgess
thats odd. Yeah It seems like the shell doesn't have "create" access but it does have "write" access. And web2py has both "create and write" access. -Thadeus On Thu, Feb 25, 2010 at 10:36 AM, DenesL wrote: > > > On Feb 25, 11:10 am, Thadeus Burgess wrote: >> Permission error when running i

[web2py] Re: Unit testing in web2py : Some thoughts

2010-02-25 Thread spiffytech
Works great! I added an "import copy" in db.py, and added a line in my unit test to rename "test_db" to "db" so that functions in the test script will use the test DB. For posterity, here is a complete working example of unit tests with web2py, with access to the database, using test database. The

[web2py] Re: Unit testing in web2py : Some thoughts

2010-02-25 Thread spiffytech
Last question: Is there any value in having web2py.py pass scripts the full command line (sys.argv)? If not, would you be open to a patch to gluon/shell.py so that it only passes the script's filename and any CLI variables shell.py didn't use? I'd also appreciate suggestions on how to do that more

Re: [web2py] Re: Plugin system status

2010-02-25 Thread Alexandre Andrade
>I fully agree that plugins should exist in >their own folders I defend it some time ago and still think it is a good idea 2010/2/25 mr.freeze > >>>What are you trying to accomplish with plugins? > I'm trying to created packaged chunks of reusable code that are easily > installed ,upgraded or r

[web2py] Cuestion about jzip and jpg image?

2010-02-25 Thread drayco
Hi, web2py users, I have a application with 6 web services with json in web2py. I answer topological information every minute. And my partners told me that the size of the answer is too large. They told me that we need to use jzip. The new requirements is that I need to give a jpg image too. But I

Re: [web2py] Re: Toggle on/off editarea on startup

2010-02-25 Thread Thadeus Burgess
So this patch allows you to disable EditArea javascript, this way you can use Its All Text with the actual html textarea? Is there a way to make it so that you have GUI access to this instead of having to edit admin. Perhaps it can get this value from request.get_vars. It would be a nuance if it w

[web2py] Re: Unit testing in web2py : Some thoughts

2010-02-25 Thread spiffytech
What about adding to the shell environment a variable containing the name of the current app? Then scripts like yours could still get the information they need, and the extra values could be removed from sys.argv without a script having to import a helper. Does this count as breaking backward-comp

Re: [web2py] Re: Unit testing in web2py : Some thoughts

2010-02-25 Thread Thadeus Burgess
I do not like the idea of having to specify the name of the app twice, it breaks DRY. What about an additional command line flag that can tell whether to strip sys.argv or not. This will keep backwards compatibility, and also allow for scripts to have a simple sys.argv if required. web2py.py --cl

[web2py] Re: Uservoice: web2py forum

2010-02-25 Thread waTR
The idea of uservoice is not simply a list of feature requests, but also a measure of popularity or demand. The forum isn't a good list of features (as they are overwhelmed by posts about other topics), and google code gives no indication upon quick examination of the demand for a feature existing

[web2py] Cuestion about jzip and jpg image?

2010-02-25 Thread drayco
Hi, web2py users, I have a application with 6 web services with json in web2py. I answer topological information every minute. And my partners told me that the size of the answer is too large. They told me that we need to use jzip. The new requirements is that I need to give a jpg image too. But I

Re: [web2py] Re: Plugin system status

2010-02-25 Thread Thadeus Burgess
Yes we can resurrect 100's of posts on this topic of plugins in sub folders :) There are two reasons Massimo does not support folder contained plugins, from what I have read. 1. Execution overhead. Having to scan yet another folder will add that much more overhead to the execution of a web2py app

[web2py] Re: google app engine, file size limits

2010-02-25 Thread villas
Alex, Thanks for this interesting information. This can make GAE suitable for a lot of extra use. > It should be easy to add blobstore support to web2py. +1 Massimo, How do you imagine it would be supported? Maybe as just an option on 'upload' type which is ignored when non-GAE? -- You recei

[web2py] Re: Toggle on/off editarea on startup

2010-02-25 Thread villas
Hi Alex, This is the right place to make your suggestion. I am sorry that no one commented, but this may mean that the group didn't see the benefit of the patch very clearly. However, It would be a shame if someone goes to the trouble of submitting a patch and didn't get a reply. I hope other

Re: [web2py] Re: Unit testing in web2py : Some thoughts

2010-02-25 Thread Thadeus Burgess
Yes, I forgot to mention the db.commit(). In fact, I would db.commit() after every successful insertion/delete/update this way your tests will be more in line? I do not know any reason as to why web2py passes along args that it is not using. However I think this could be beneficial in certain scr

Re: [web2py] Re: web2py with Cherokee via uWSGI: a simple, easy guide

2010-02-25 Thread Thadeus Burgess
A couple of suggestions with the slice Make a note, for building uwsgi, that there are makefile.py25 and others so that you can build it for the python version that you want. Do include the little ``ssh -L 9090:localhost:9090 remote_IP`` trick to securely connect to cherokee admin. I do not see

[web2py] Re: Unit testing in web2py : Some thoughts

2010-02-25 Thread spiffytech
I had not tried taking the sys.argv statement out of my code. You are correct: when using TestTextRunner, sys.argv does not need to be cleaned. I like the idea of a command line flag. It's probably a good idea to offer such a flag, even though it turns out it's not needed to run unit tests. On Fe

Re: [web2py] Re: Unit testing in web2py : Some thoughts

2010-02-25 Thread Jonathan Lundell
I'm really glad to see this work happening, and I look forward to the slice. Perhaps we could eventually have unit tests as part of the welcome app, or indeed all three standard apps, both for documentation purposes and to set a good example. -- You received this message because you are subscr

Re: [web2py] Re: web2py with Cherokee via uWSGI: a simple, easy guide

2010-02-25 Thread Thadeus Burgess
Also, emphasis the fact of using the PPA method of installing, and provide instructions on how to do this, and a link to that page. The reason it was not working was I installed 0.99.19 instead of 0.99.43. -Thadeus On Thu, Feb 25, 2010 at 2:27 PM, Thadeus Burgess wrote: > A couple of suggest

Re: [web2py] Re: web2py with Cherokee via uWSGI: a simple, easy guide

2010-02-25 Thread Thadeus Burgess
Don't forget to hit save :)0 And how to enable SSL, and use my self signed certificate, OR use a paid for certificate? -Thadeus On Thu, Feb 25, 2010 at 3:25 PM, Thadeus Burgess wrote: > Also, emphasis the fact of using the PPA method of installing, and > provide instructions on how to do t

Re: [web2py] Re: web2py with Cherokee via uWSGI: a simple, easy guide

2010-02-25 Thread Thadeus Burgess
The following packages are not installed by the PPA... cherokee-doc libcherokee-mod-geoip libcherokee-mod-ldap libcherokee-mod-libssl libcherokee-mod-mysql libcherokee-mod-rrd libcherokee-mod-streaming Installing libcherokee-mod-libssl fixes this. Also they have a great article on creating and s

[web2py] auth.settings.registration_requires_approval

2010-02-25 Thread baloan
When setting auth.settings.registration_requires_approval = True new user registration seem to keep sitting in pending state. The admin needs a user interface to approve or reject new registrations. Is there any preconfigured approval pages/process built into web2py or do I have to implement one

[web2py] Re: mail plain text message wrong charset

2010-02-25 Thread szimszon
Hmmm... I don't use gmail or google to send email... You talk about the character real representation like ÁÖ... or the email part header --===1974471883== Content-Type: text/plain;charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit if you say us-ascii? I think the e

[web2py] Re: Plugin system status

2010-02-25 Thread pistacchio
i'm late in the whole "plugin" discussion, i didn't really follow it from start (being new to web2py). my only question is: what is the _scope_ of plugins? as i got it correctly, there's an ongoing debate on the form of plugins, classes vs directories. if we're talking about small things like "dis

[web2py] I'd just like to say.

2010-02-25 Thread Matt
Hi Massimo , I'd just like to say a massive thanks to you and the rest of the people who have contributed to making web2py such an amazingly nice framework to use. I'm in the process of porting an existing Django project in web2py and I'm thoroughly enjoying how clean and simple web2py is. The G

[web2py] Re: web2py with Cherokee via uWSGI: a simple, easy guide

2010-02-25 Thread GrayMatterComputing
The guide is fine, it just needs to be Followed Step By Step without skipping. ;) I also figured the SSL and all was easy enough to find and, again, outside the scope of this entry. On Feb 25, 4:47 pm, Thadeus Burgess wrote: > The following packages are not installed by the PPA... > > cherokee-do

Re: [web2py] Re: mail plain text message wrong charset

2010-02-25 Thread Thadeus Burgess
I did some more testing. Server A -> Google SMTP -> receive Content-Type us-ascii Server B -> Custom SMTP -> receive Content-Type utf-8 If I take Server B's credentials for the SMTP server, and stick them in Server A this is the result.. ServerA -> Custom SMTP -> receive Content-Type utf-8 Serve

Re: [web2py] Re: web2py with Cherokee via uWSGI: a simple, easy guide

2010-02-25 Thread Thadeus Burgess
Actually, SSL is not out of the scope of this entry. How do you expect me to access admin, or appadmin for that matter? I can't use web2py without SSL :) I have tried everything but it just keeps giving me an error saying something is wrong with my .pem file, but not telling me "what" is wrong.

Re: [web2py] auth.settings.registration_requires_approval

2010-02-25 Thread Alexandre Andrade
I have adapted a plugin. I will post it soon. 2010/2/25, baloan : > When setting > > auth.settings.registration_requires_approval = True > > new user registration seem to keep sitting in pending state. The admin > needs a user interface to approve or reject new registrations. > > Is there any prec

[web2py] Plugin useradmin (membership manager)

2010-02-25 Thread Alexandre Andrade
I corrected some functions in the plugin posted before (is no more ajax, but works). to make it work, unzip in your app folder. -- Atenciosamente -- = Alexandre Andrade Hipercenter.com -- You received this message because you are subscribed to the Google Groups "web

[web2py] importing local modules

2010-02-25 Thread Jonathan Lundell
I've made a module that does a nice job, if I do say so myself, of encapsulating DataTables (I'll post something about it eventually). Since it's a module, I need to import it to my controller, which I'm doing like so: import sys sys.path.append(request.folder) import modules.datatables as dt

[web2py] Re: importing local modules

2010-02-25 Thread mr.freeze
Just do: dt = local_import('datatables') On Feb 25, 6:11 pm, Jonathan Lundell wrote: > I've made a module that does a nice job, if I do say so myself, of > encapsulating DataTables (I'll post something about it eventually). > > Since it's a module, I need to import it to my controller, which I'm

Re: [web2py] Re: Plugin useradmin (membership manager)

2010-02-25 Thread Thadeus Burgess
You can use Admin to pack this in a installable format that admin can then be used to reimport it into another system. This is so it is a one click installation instead of having to go unzip it and everything. -Thadeus On Thu, Feb 25, 2010 at 6:02 PM, Alexandre Andrade wrote: > Ops. the fil

[web2py] LOAD requires up to date web2py_ajax.html

2010-02-25 Thread Thadeus Burgess
Is there a way that LOAD will just create the necessary javascript, I have noticed in my apps that haved used LOAD, that they break unless I update the jquery functions in web2py_ajax.html. -Thadeus -- You received this message because you are subscribed to the Google Groups "web2py-users" grou

Re: [web2py] Re: importing local modules

2010-02-25 Thread Jonathan Lundell
On Feb 25, 2010, at 4:19 PM, mr.freeze wrote: > Just do: dt = local_import('datatables') Thanks. Maybe the book should reflect this: http://web2py.com/book/default/section/4/18 (I'd make the change, but I'm a little fuzzy on the details.) > > On Feb 25, 6:11 pm, Jonathan Lundell wrote: >> I'

[web2py] Re: LOAD requires up to date web2py_ajax.html

2010-02-25 Thread mr.freeze
I've asked for this a few times with no response but I'll say it again: web2py_ajax.html needs an area for something similar to response.files but for raw script. Plugins, widgets and other components could use it to include just this sort of thing. On Feb 25, 6:51 pm, Thadeus Burgess wrote: > Is

Re: [web2py] Re: LOAD requires up to date web2py_ajax.html

2010-02-25 Thread Thadeus Burgess
py2jquery manager class does this already also your clienttools has a version of this. I am thinking something similar to these needs to be included into web2py. -Thadeus On Thu, Feb 25, 2010 at 7:30 PM, mr.freeze wrote: > I've asked for this a few times with no response but I'll say it

[web2py] app admin - old app missing from list

2010-02-25 Thread BrendanC
newbie qns - I just d/loaded the latest version of web2py and on start up I see that a small app I created some time ago is not listed in the app list - the files are there in the web2py directory. Is there something I need to do to include missing apps (this is on Win XP - so it's not a symlink i

Re: [web2py] Re: importing local modules

2010-02-25 Thread Thadeus Burgess
Done. -Thadeus On Thu, Feb 25, 2010 at 7:06 PM, Jonathan Lundell wrote: > On Feb 25, 2010, at 4:19 PM, mr.freeze wrote: > >> Just do: dt = local_import('datatables') > > Thanks. Maybe the book should reflect this: > http://web2py.com/book/default/section/4/18 > > (I'd make the change, but I

[web2py] Re: Some interrogations concerning Web2py compatibilities

2010-02-25 Thread mdipierro
Tiago was right. You need the windows extension to have file locking in windows. I do not know why they did not include that as standard in Python. I agree with you it should be critical. On Feb 25, 6:13 am, Magnitus wrote: > >what os are you using. This should work o Posix and win32. > > Windows

[web2py] Re: zen html

2010-02-25 Thread mdipierro
cool. thanks. On Feb 25, 9:49 am, selecta wrote: > Sometimes you still have to write html in web2py which is annoying. It > might not be new to all of you but I just discovered zen html that > really speeds up the process. > In my example i customized the zen key to ctrl + z > > What it does: > >

[web2py] Re: newly created app fails in shell mode in 1.75.4

2010-02-25 Thread mdipierro
scratching head too... On Feb 25, 5:47 am, DenesL wrote: > Using 1.75.4, a newly created app fails to start in shell mode (-M -N - > S) with: > > web2py Enterprise Web Framework > Created by Massimo Di Pierro, Copyright 2007-2010 > Version 1.75.4 (2010-02-18 14:55:03) > Database drivers available

[web2py] Re: Cuestion about jzip and jpg image?

2010-02-25 Thread mdipierro
You should use a separate web server, for example apache, and configure it use it gzip. It is explained here: http://httpd.apache.org/docs/2.0/mod/mod_deflate.html This is outside and transparent to web2py. Perhaps this helps. On Feb 25, 12:10 pm, drayco wrote: > Hi, web2py users, > I have a a

[web2py] Re: Toggle on/off editarea on startup

2010-02-25 Thread mdipierro
I will look at it asap. thanks. On Feb 20, 2:13 pm, Alex wrote: > I have added DISPLAY parameter in web2py\applications\admin\models > \0.py > It helps to manage mode of web2py built in code editor on page > startup. > It is usefull with Its All Text Firefox plugin which allow to edit > context o

[web2py] Re: Some interrogations concerning Web2py compatibilities

2010-02-25 Thread mr.freeze
I started using ActivePython instead of the stock releases of python. They have win32 extensions built in and a few other helpful things. http://www.activestate.com/activepython/features/ On Feb 25, 8:12 pm, mdipierro wrote: > Tiago was right. You need the windows extension to have file locking >

[web2py] Re: google app engine, file size limits

2010-02-25 Thread mdipierro
Exactly. Like you specify db.table.field.uploadfolder=os.path.join(request.folder,'uploads') you could specify db.table.field.uploadmethod='gae_blobstore' On Feb 25, 2:02 pm, villas wrote: > Alex,  Thanks for this interesting information. This can make GAE > suitable for a lot of extra use. >

[web2py] Re: LOAD requires up to date web2py_ajax.html

2010-02-25 Thread mr.freeze
Sure, but clienttools had it first :) On Feb 25, 8:05 pm, Thadeus Burgess wrote: > py2jquery manager class does this already also your clienttools > has a version of this. > > I am thinking something similar to these needs to be included into web2py. > > -Thadeus > > On Thu, Feb 25, 2010 at 7

[web2py] Re: Plugin system status

2010-02-25 Thread mdipierro
When I am back home Perhaps we should an IRC discussion on this. Email will not do. Start preparing your proposals. On Feb 25, 4:34 pm, pistacchio wrote: > i'm late in the whole "plugin" discussion, i didn't really follow it > from start (being new to web2py). > my only question is: what is the _

[web2py] Re: I'd just like to say.

2010-02-25 Thread mdipierro
Thanks for letting us know. If it is useful we are happy. On Feb 25, 4:42 pm, Matt wrote: > Hi Massimo , > > I'd just like to say a massive thanks to you and the rest of the > people who have contributed to making web2py such an amazingly nice > framework to use. > > I'm in the process of porting

Re: [web2py] Re: LOAD requires up to date web2py_ajax.html

2010-02-25 Thread Thadeus Burgess
py2jquery handles dependencies :) -Thadeus On Thu, Feb 25, 2010 at 8:21 PM, mr.freeze wrote: > Sure, but clienttools had it first :) > > On Feb 25, 8:05 pm, Thadeus Burgess wrote: >> py2jquery manager class does this already also your clienttools >> has a version of this. >> >> I am thi

[web2py] Web2py Scalability and demos

2010-02-25 Thread Alfonso de la Guarda
Hello, Right now, i have a costumer in the news business in my country which expect, at least, 50 hits by day in their website. Currently they are using django as web framework but i wanna move some new apps to web2py. The questions are: How can I convince them to agree to take the course f

Re: [web2py] app admin - old app missing from list

2010-02-25 Thread Thadeus Burgess
web2py stores all applications in web2py/applications So in this folder you will find web2py/applications/admin web2py/applications/welcome web2py/applications/ You can edit these files with any external editor that you desire. Personally I prefer WingIDE, however since I cannot afford it I use

[web2py] Re: app admin - old app missing from list

2010-02-25 Thread BrendanC
Thadeus, Many thanks for your fast response - you nailed it - the newer version I installed is looking for files/apps on my C drive - (I had set the the previous version's apps up on my D drive). I just need to move them per your suggestion. FWIW - I've also used the WingIDE for some Python develop

[web2py] request.vars bug?

2010-02-25 Thread Ben
Hi all, I have a URL like the following: feature_reading? feature_id=15&sensor_id=51&sensor_id=52&sensor_id2&sensor_id=53&sensor_id=54 however, when I try to extract the sensor_id vars at the other end, i get a list as such: ['51', '5', '2', '5', '3', '5', '4'] anyone had this problem before? --

Re: [web2py] Re: app admin - old app missing from list

2010-02-25 Thread Thadeus Burgess
If you are using NTFS take a look into "hard links" they are simlinks for windows. I used them for gaming back in the day. (to trick the games that they were installing on C: when they were really installing on T :) -Thadeus On Thu, Feb 25, 2010 at 9:59 PM, BrendanC wrote: > Thadeus, > Many

[web2py] Re: Web2py Scalability and demos

2010-02-25 Thread mdipierro
In general the bottleneck is the database access. The web2py DAL adds negligible overhead to that http://web2py.com/AlterEgo/default/show/76 People have tested web2py vs Pylons (which people says it is faster than Django and reddit.com uses it): http://www.mail-archive.com/web2py@googlegro

[web2py] Re: request.vars bug?

2010-02-25 Thread mdipierro
This is a feature. If you have multiple values for the same var in the url you get a list with the values. On Feb 25, 10:06 pm, Ben wrote: > Hi all, > I have a URL like the following: > feature_reading? > feature_id=15&sensor_id=51&sensor_id=52&sensor_id2&sensor_id=53&sensor_id=54 > > however, wh

[web2py] Re: request.vars bug?

2010-02-25 Thread Ben
Also, I can confirm that request.values() produces the correct output: 'REQUEST_URI': '/tasman/query/feature_reading? feature_id=15&sensor_id=51&sensor_id=52&sensor_id=53&sensor_id=54... On Feb 26, 3:06 pm, Ben wrote: > Hi all, > I have a URL like the following: > feature_reading? > feature_id=15

[web2py] Re: request.vars bug?

2010-02-25 Thread Ben
I do indeed want multiple values, however, they should be ['51', '52', '53', '54']. On Feb 26, 3:37 pm, mdipierro wrote: > This is a feature. > If you have multiple values for the same var in the url you get a list > with the values. > > On Feb 25, 10:06 pm, Ben wrote: > > > > > Hi all, > > I ha

[web2py] any quick workaround for the datetime strftime() methods require year >= 1900

2010-02-25 Thread vince
i run into some rare problem on web2py it's related to python's limitation/bugs Traceback (most recent call last): File "/Library/WebServer/Documents/web2py/gluon/restricted.py", line 173, in restricted exec ccode in environment File "/Library/WebServer/Documents/web2py/applications/cychur

[web2py] Re: request.vars bug?

2010-02-25 Thread mdipierro
oops. I misunderstood the question. Something is wrong. Which OS/web2 server/Python version? On Feb 25, 10:06 pm, Ben wrote: > Hi all, > I have a URL like the following: > feature_reading? > feature_id=15&sensor_id=51&sensor_id=52&sensor_id2&sensor_id=53&sensor_id=54 > > however, when I try to ex

[web2py] Re: request.vars bug?

2010-02-25 Thread mdipierro
This parsing is not done by web2py. It is done by the Python cgi.FieldStoarge function. What is in requet.get_vars and request.post_vars? On Feb 25, 10:44 pm, Ben wrote: > I do indeed want multiple values, however, they should be ['51', '52', > '53', '54']. > > On Feb 26, 3:37 pm, mdipierro wro

[web2py] Re: request.vars bug?

2010-02-25 Thread Ben
OS: GNU/Linux (2.6.24-21-generic) [Debian lenny/sid] web2py: web2py Version 1.75.1 (2010-02-12 15:13:11) Python: Python 2.5.2 On Feb 26, 3:47 pm, mdipierro wrote: > oops. I misunderstood the question. Something is wrong. Which OS/web2 > server/Python version? > > On Feb 25, 10:06 pm, Ben wrote:

[web2py] Re: request.vars bug?

2010-02-25 Thread Ben
Hmm, interesting.. request.get_vars = ...'sensor_id': ['51', '5', '2', '5', '3', '5', '4'] post_vars is empty (as I would expect). Cheers. If it turns out to be a python bug I'll just regex it out of request.values() instead :) On Feb 26, 3:50 pm, mdipierro wrote: > This parsing is not done by w

[web2py] Re: request.vars bug?

2010-02-25 Thread mdipierro
I think this is a bug in the cgi module but please do one test. In gluon/mail.py there is def parse_get_post_vars(request, environ): dget = cgi.parse_qsl(request.env.query_string, keep_blank_values=1) Add this line: print request.env.query_string print dget This will nail down the pr

[web2py] Re: any quick workaround for the datetime strftime() methods require year >= 1900

2010-02-25 Thread mdipierro
what about about we do something like this in web2py? def format_date(d, format): format = format.replace('%y',str(d.year)[-2:]) if d.year>=0: format = format.replace('%Y',str(d.year)) else: format = format.replace('%Y',str(d.year)+'B.C.') d = datetime.datetim

[web2py] Re: any quick workaround for the datetime strftime() methods require year >= 1900

2010-02-25 Thread vince
is it just for years for B.C.? but currently python's strftime even have error when it's year >= 1900. On Feb 26, 1:09 pm, mdipierro wrote: > what about about we do something like this in web2py? > > def format_date(d, format): >      format = format.replace('%y',str(d.year)[-2:]) >      if d.yea

[web2py] Re: request.vars bug?

2010-02-25 Thread mdipierro
I can reproduce it. It is a major bug in web2py. I fixed it in trunk just now. Thanks for reporting this problem. The problem is that except for the first value '51' all other values with the same keys where being broken into chars and the chars would be appended. On Feb 25, 10:06 pm, Ben wrote

[web2py] Re: any quick workaround for the datetime strftime() methods require year >= 1900

2010-02-25 Thread mdipierro
No it work for every date but just B.C. On Feb 25, 11:14 pm, vince wrote: > is it just for years for B.C.? but currently python's strftime even > have error when it's year >= 1900. > > On Feb 26, 1:09 pm, mdipierro wrote: > > > what about about we do something like this in web2py? > > > def form

[web2py] Re: request.vars bug?

2010-02-25 Thread Ben
Ah excellent, thanks very much indeed! I guess I should update to trunk now... Thanks again! - Ben. On Feb 26, 4:18 pm, mdipierro wrote: > I can reproduce it. It is a major bug in web2py. I fixed it in trunk > just now. > Thanks for reporting this problem. > > The problem is that except for the f

[web2py] Re: any quick workaround for the datetime strftime() methods require year >= 1900

2010-02-25 Thread vince
it's just osx and windows problem since i've just google it. it's a known problem on python. ValueError: year=1897 is before 1900; the datetime strftime() methods require year >= 1900 On Feb 26, 1:20 pm, mdipierro wrote: > No it work for every date but just B.C. > > On Feb 25, 11:14 pm, vince

  1   2   >