[web2py:16684] Re: Can hardcron work without being triggered by a request?

2009-02-21 Thread Iceberg
2PY CRON done INFO:root:WEB2PY CRON Call returned: default applications appear to be installed already web2py Enterprise Web Framework Created by Massimo Di Pierro, Copyright 2007-2009 Version 1.56.2 (2009-02-08 21:49:34) Database drivers available: SQLite3, MySQL On Feb22, 7:53am, AchipA wrote: &

[web2py:16685] Re: Can hardcron work without being triggered by a request?

2009-02-21 Thread Iceberg
On Feb22, 7:53am, AchipA wrote: > On Feb 21, 9:12 pm, David Marko wrote: > > > I would also appreciate some working example/appliance for using > > *cron. Its very usefull thing!!! > > web2py comes with an example (cleaning sessions), see applications/ > admin/cron ! Do you think additional exam

[web2py:16691] Re: Can hardcron work without being triggered by a request?

2009-02-22 Thread Iceberg
On Feb22, 8:37pm, AchipA wrote: > I think I know what's causing the issue, try the following as your > web2py.py instead of the original one: > > #!/usr/bin/python > # -*- coding: utf-8 -*- > > import os > import sys > > path = os.path.dirname(os.path.abspath(__file__)) > if not path in sys.path:

[web2py:16829] Re: Can hardcron work without being triggered by a request?

2009-02-23 Thread Iceberg
On Feb23, 0:19am, Iceberg wrote: > On Feb22, 8:37pm, AchipA wrote: > > I think I know what's causing the issue, try the following as your > > web2py.py instead of the original one: > > > #!/usr/bin/python > > # -*- coding: utf-8 -*- > > > import os

[web2py:16838] Re: Critical point in web2py

2009-02-24 Thread Iceberg
+1 for improving documents, of course. I am not sure what Achipa means about changelog, but I believe the developer of a new feature is the most appropriate person to write some description about: 1. what is it; 2. how to use it? 3. background info (if any) I am afraid that changelog can no

[web2py:16951] Re: Can hardcron work without being triggered by a request?

2009-02-25 Thread Iceberg
off puzzled myself. I can confirm that the windows distrib runs > softcron, BUT, running it from the command line, from sources, DOES > result in default hardcron. I'm not sure what the difference is > between the distribution and source 'modes' are but apparently the two >

[web2py:16968] Re: Can hardcron work without being triggered by a request?

2009-02-26 Thread Iceberg
On Feb26, 7:35pm, AchipA wrote: > On Feb 26, 5:23 am, Iceberg wrote: > > > I don't really understand how cron patch works but, since the global > > crontype equals to "Soft" by default, is there some reason causing the > > win distrib to detect it

[web2py:17297] Re: Can hardcron work without being triggered by a request?

2009-03-01 Thread Iceberg
On Feb26, 9:27pm, AchipA wrote: > > On Feb 26, 1:44 pm, Iceberg wrote: > > > On Feb26, 7:35pm, AchipA wrote: > > > > On Feb 26, 5:23 am, Iceberg wrote: > > > > > When I import > > > > this module and change it (indirectly), I still do n

[web2py:17366] Re: web2py 1.57

2009-03-02 Thread Iceberg
On Mar2, 12:22pm, mdipierro wrote: > Lots of small bug fixes in the last week so I posted 1.57. Please give > it  a try and let me know. > > New features include: > 1) admin edit page via ajax and keepalive (thank you Boris) > 2) language translation page has [delete] buttons > 3) fixed (hopefull

[web2py:17410] Re: web2py 1.57

2009-03-03 Thread Iceberg
On Mar3, 10:36pm, mdipierro wrote: > > On Mar 2, 8:33 pm, Iceberg wrote: > > > On Mar2, 12:22pm, mdipierro wrote: > > > > Lots of small bug fixes in the last week so I posted 1.57. Please give > > > it  a try and let me know. > > > > New featur

[web2py:17469] Re: Scaffold application - day two

2009-03-04 Thread Iceberg
On Mar2, 4:41am, Alexandre Andrade wrote: > Today I was fixed css and really put authentication to work. > > So, at this point, scaffold has: > > - a five spaces layout (logo, section menu, left column, center column, > right column and footer. > - a working authentication > - a secundary menu s

[web2py:17481] Re: Scaffold application - day two

2009-03-04 Thread Iceberg
On Mar4, 9:45pm, mdipierro wrote: > On Mar 4, 6:45 am, Iceberg wrote: > > > The last problem is that out-of-box scaffold20090301b.tar on web2py > > 1.56.4 always reports: > >   TypeError: unsupported operand type(s) for %: 'lazyT' and 'dict' >

[web2py:17573] Re: How to know contents in request, response, etc

2009-03-05 Thread Iceberg
One more tips for new comers. You can find an example named "status" in here: http://mdp.cti.depaul.edu/examples/default/examples or just here: http://mdp.cti.depaul.edu/examples/simple_examples/status to know every available resources in request or response. Btw, by default recent versions o

[web2py:17574] The missing update_record() in DAL document

2009-03-05 Thread Iceberg
Hi Massimo, In old web2py versions, developers can update a single record by: # Suppose you have already inserted a record and then search it into a variable "me". >>> me.update_record(name="Max") >>> me.name 'Max' The feature still exists in latest web2py 1.57 but missing descriptions in DAL d

[web2py:17623] Re: SQLFORM.accepts(): onaccept,oncreate,onupdate

2009-03-07 Thread Iceberg
On Jan10, 11:53pm, mdipierro wrote: > @Robin, > > I propose I change and I already implemented in in trunk. > > def f(form): > if form.vars.a!=form.vars.b: > form.errors.a='must be same as b' > form.errors.b='must be same as a' > > if form.accepts(,onvalidation=lambda for

[web2py:17657] Re: What's the plan for supporting multi-level menus with response.menu?

2009-03-08 Thread Iceberg
> > On Mar 8, 1:09 am, weheh wrote: > > > > I've read that this is possible with t2, but how about 1.57? I've > > tried it with 1.57 and it doesn't seem to work. Any suggestions for > > how to do nested multi-level menus with the current version? On Mar8, 11:38pm, mdipierro wrote: > The problem

[web2py:17668] Re: What's the plan for supporting multi-level menus with response.menu?

2009-03-08 Thread Iceberg
com/menu2/invitro.htm > > Massimo > > On Mar 8, 11:33 am, Iceberg wrote: > > > I would have agree with Massimo about "not to include too many this > > and that in the base distribution". But, when talking about the menu, > > I beg a reconsideration. --~--

[web2py:17719] Re: Can hardcron work without being triggered by a request?

2009-03-09 Thread Iceberg
Hi Achipa, While waiting for the ultimate patch for hardcron, I manage to give the current web2py 1.56.4 's cron some other test. Some found issues are listed below. They are not necessarily to be fixed, but if you can somehow improve them, that is better. 1. In the crontab file, usually we writ

[web2py:17744] Re: Can hardcron work without being triggered by a request?

2009-03-09 Thread Iceberg
On Mar9, 7:17pm, AchipA wrote: > On Mar 9, 8:22 am, Iceberg wrote: > > > 1. In the crontab file, usually we write > >     #0-59/1     *       *       *       *       root > > /path/to/some/executable_file > > But I found that, on Windows platform, "/" ar

[web2py:17747] Re: web2py 1.58 ?

2009-03-09 Thread Iceberg
On Mar9, 3:38am, mdipierro wrote: > I am planning to release 1.58 on Tuesday. I am waiting for > confirmation that we have DB2 support. > > Is there anything else that should be in and I have forgotten about? > If so, please email em personally. > > Massimo Just curious. You said in some post th

[web2py:17794] Re: SQLFORM.accepts(): onaccept,oncreate,onupdate

2009-03-10 Thread Iceberg
On Mar7, 7:40pm, Iceberg wrote: > On Jan10, 11:53pm, mdipierro wrote: > > > @Robin, > > > I propose I change and I already implemented in in trunk. > > > def f(form): > >      if form.vars.a!=form.vars.b: > >         form.errors.a='must be same as

[web2py:17795] Bug: web2py 's compile does not generate enough myapp/modules/*.pyc

2009-03-10 Thread Iceberg
I found that web2py 's compile does not generate enough myapp/modules/ *.pyc This happens when there is only *.py but none of *.pyc in myapp/ modules. The compile just ignores those *.py at all. A forced import on each of *.py file in this directory should be the way to fix it. --~--~-

[web2py:18344] Possible bug: cron doesn't work when deploy in a directory name with space inside

2009-03-19 Thread Iceberg
nsole: WARNING:root:WEB2PY CRON Call returned code 1: If I deploy it in C:\SOLID\web2py, everything runs smooth. So there might be some dir issue in cron's launcher. Please take a look. Thanks in advance! Regards, Iceberg --~--~-~--~~~---~--~~ You received this message becau

[web2py:18440] How to hide the console window?

2009-03-21 Thread Iceberg
s.org/showthread.php?t=728170 But I don't know how things go in current web2py world. Can we just have a web2py.exe as current situation, and one more web2pyw.exe that does not have a console window? Thanks for any hint. Regards, Iceberg --~--~-~--~~~---~--~~ Yo

[web2py:18447] Re: How to hide the console window?

2009-03-22 Thread Iceberg
eat and really helps, but users need to get permission for that at first. On Mar22, 12:13pm, Boris Manojlovic wrote: > Hi Iceberg, > > please try hstart program as it is created just for "problems" like > yours.http://www.ntwind.com/software/utilities/hstart.html > > hop

[web2py:18457] Re: How to hide the console window?

2009-03-22 Thread Iceberg
Tried but that does not help. :-P We need something similar to the effect of hstart.exe's: hstart /NOCONSOLE "web2py.exe -i 0.0.0.0 -a """" -t" On Mar22, 11:06pm, mdipierro wrote: > try > > web2py -a blah -p 8000 > > Not sure. > > On

[web2py:18474] Detect already running web2py

2009-03-22 Thread Iceberg
7;http://%s:%s'% (detectAddr, bindPort)).read() except IOError: pass # the bindAddr and bindPort is vacant else: sys.exit('%s:%s is occupied'%(detectAddr,bindPort)) .. # Go on to start web2py main process This code can let novice make fewer mistakes. Regards, Iceberg --~--~-

[web2py:18484] Re: How to hide the console window?

2009-03-23 Thread Iceberg
had installed a windows > distribution of Python before I had web2py, and I the installation > process set this up. > > The extra 'w' on the Python file extension means 'don't open a console > window' > > Chris > > On Mar 22, 3:52 pm, Iceberg wro

[web2py:18503] Re: How to hide the console window?

2009-03-23 Thread Iceberg
On Mar24, 5:20am, Fran wrote: > On Mar 22, 3:44 am, Iceberg wrote: > > > I am using web2py 's windows distribution. Is there some way to hide > > the console window (a.k.a. the black dos window) in which web2py is > > running? > > I run as a service using

[web2py:18564] Re: Possible bug: cron doesn't work when deploy in a directory name with space inside

2009-03-24 Thread Iceberg
x27;t miss something obvious ? > > On Mar 19, 11:30 am, Iceberg wrote: > > > Hi Achipa, > > > I have an app based on web2py-win.zip 1.56.4's cron feature. I just > > noticed that, if the whole web2py is deployed in a directory name with > > space inside,

[web2py:18569] Question about compile and performance

2009-03-25 Thread Iceberg
once a "6 times faster" template engine introduced in web2py 1.55 but later cancelled. Will it come back in the future? But if I compile my app, does it bring performance as good as (if not better than) the 6-times-faster template engin

[web2py:18587] Re: creating stand-alone apps of web2py

2009-03-25 Thread Iceberg
Hey Jude, don't be afraid... :-) I have been there and done that. In recent days I happened to work on how to build an app into a stand-alone setup.exe for Windows platform, by a single click. The work is mainly based on the free Inno Setup. I am posting the almost-finished work to Massimo for s

[web2py:18630] Re: Question about compile and performance

2009-03-25 Thread Iceberg
Thanks very much for your general guidelines about performance, Tim and Massimo! On Mar26, 3:39am, mdipierro wrote: > I agree with Tim. If you run the bytecode compiled version in > production there is no parsing overhead. > > On Mar 25, 1:37 pm, Timothy Farrell wrote: >

[web2py:18636] Re: creating stand-alone apps of web2py

2009-03-25 Thread Iceberg
he current "web2py.exe"(with console). But if you are really eager, take a look at InnoSetup. Basically my plugin just wrap InnoSetup for convenience. On Mar26, 2:39am, dbb wrote: > To iceberg: >  when do think you are going to finish the instructions how to create > a

[web2py:18638] Re: cache.ram Questions

2009-03-25 Thread Iceberg
On Mar26, 2:56am, Mark Larsen wrote: > > Also is the cache object unique for each session?  Does Web2py have any > concept of a shared cache for all sessons? > I share what I just test, and what I do not know, and hope some expert can confirm them. Cache object seems unique for each session. I

[web2py:18640] Re: cache.ram Questions

2009-03-25 Thread Iceberg
unique according to test. I still need some confirmation. On Mar26, 1:07pm, Vidul Petrov wrote: > Hi Iceberg, > > From what I saw, the cache object is not unique, it's that the samle > has "time_expire=5" and most probably you've loaded the page on the > 2nd br

[web2py:18653] Re: cache.ram Questions

2009-03-26 Thread Iceberg
Although I already figured out the abusing time_expire way by myself earlier, I still appreciate Achipa's hint for clear(), which I did not know. Thanks for that. It seems I did not read enough docs. So, after taking another look at the epydoc (http://www.web2py.com/examples/static/epydoc/ web2py

[web2py:18659] Re: creating stand-alone apps of web2py

2009-03-26 Thread Iceberg
> > This is great! Something I have been looking forward to. Will this > allow a user to click and install the web2py application without > having to start the server each time they want to use it? Keep me > posted on this. Appreciate your efforts! > > -Seb > > On Mar

[web2py:18667] Using command line -i and -p with -t

2009-03-27 Thread Iceberg
still using default 127.0.0.1 and port 8000. Not what I want. I assume it will not be hard to let -i and -p also have effect on -t ? Thanks. Iceberg --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Fram

[web2py:18706] Re: Using command line -i and -p with -t

2009-03-28 Thread Iceberg
On Mar28, 11:25pm, LordMax wrote: > > On 27 Mar, 09:43, Iceberg wrote: > > > Hi Massimo, > > > Now I want to do the same thing but this time let web2py (windows > > distribution) stay on SysTray, so I do: > >   web2py -i 0.0.0.0 -p 80 -a blah -t > >

[web2py:18722] Re: Possible bug: cron doesn't work when deploy in a directory name with space inside

2009-03-29 Thread Iceberg
o all the test above. Results remain the same. What should I do now? Sincerely, Iceberg, 2009-Mar-29, 14:19(PM), Sun On Mar25, 9:56pm, AchipA wrote: > Ok, could you try replacing your web2py/gluon/contrib/cron.py with > > http://bazaar.launchpad.net/%7Eachipa/web2py/cron/d

[web2py:18723] Re: How to hide the console window?

2009-03-29 Thread Iceberg
I will change my "Inno Plugin" to use web2py-no- console.exe instead of hstart.exe. Only then, developers can freely generate and distribute stand alone web2py app setup.exe. Thanks! Sincerely, Iceberg, 2009-Mar-29, 14:19(PM), Sun On Mar22, 8:57pm, Iceberg wrote: &

[web2py:18779] Re: Possible bug: cron doesn't work when deploy in a directory name with space inside

2009-03-30 Thread Iceberg
ing > like open("C:\marker","w") and check if it got created or, if it does > not annoy you, winsound.Beep(400,400). > > On Mar 29, 9:08 am, Iceberg wrote: > > > Hi Achipa, > > > Sorry for delay in response. I managed to upgrade my Python2.4.4 to &g

[web2py:18885] Re: URL mapping - blocking default URLs

2009-03-31 Thread Iceberg
Sorry for chiming in, but I do not see it is necessary to block the default urls. As long as they can do proper jobs and do no harms, why do we need to block it? Just let it be. And in case you did not know yet, you might found the option 2 in this post helps. http://www.web2py.com/AlterEgo/def

[web2py:18911] Re: Possible bug: cron doesn't work when deploy in a directory name with space inside

2009-04-01 Thread Iceberg
2py-win.zip 1.56.4, and then this hybrid 1.56.4 suddenly has the long lost hardcron feature. I can't explain. All these look like mess. But I am really not joking although today is Apr1. :-( Sincerely, Iceberg, 2009-Apr-01, 21:31(PM), Wed On Mar30, 11:03pm, AchipA wrote: > Can

[web2py:18917] Re: Possible bug: cron doesn't work when deploy in a directory name with space inside

2009-04-01 Thread Iceberg
affected by so many possible factors such as Python version, py2exe version, packages like win32con, mysqldb, etc... But web2py_win.zip is standalone therefore not affect by any above factors on the target machine. I just want to make sure, whether the fresh 1.59 web2py_win.zip can cron or not.

[web2py:19061] Re: important about ajax forms

2009-04-04 Thread Iceberg
I want to test this idea, but it seems the events.tar does not contain that magic new web2py_ajax.html ? Did I miss something? On Apr4, 2:02pm, mdipierro wrote: > I re-posted a slightly better version. > > The new version work in this way: > > say you have an action like: > > def myform(): >  

[web2py:19132] Suggestion: adjust the sample of streaming

2009-04-05 Thread Iceberg
Hi Massimo, I always follow the sample here to write my streaming code: http://www.web2py.com/examples/default/examples#streaming_examples Today I happened to find that this approach does not handle "HTTP/1.1 206 PARTIAL CONTENT" correctly. After some try and search, I found this: http://gro

[web2py:19133] Re: Controller & sub-folders

2009-04-05 Thread Iceberg
On Apr5, 1:48pm, "r...@devshell.org" wrote: > As far as I understand from the manual, it is not possible to store > controllers in sub folders in the Controller folder in web2py. > > Is that right? If that is not correct, what URL would one use to > access a function called "user_reg" in a contro

[web2py:19155] Re: Suggestion: adjust the sample of streaming

2009-04-05 Thread Iceberg
ly compare the two approaches. I refine the doc, please refer to the end of this mail. On Apr5, 10:08pm, mdipierro wrote: > You can do > > response.stream(...,chunk_size=4000) > > On Apr 5, 5:57 am, Iceberg wrote: > > > Hi Massimo, > > > I always follow the sample

[web2py:19166] Re: Suggestion: adjust the sample of streaming

2009-04-05 Thread Iceberg
se response.download()) > 3) the purpose of that example is also to show that you can stream any > output stream (something with a read() method) not necessarily and > actual file (for example a StringIO). > > perhaps we need to add one example. > > Massimo > > On Apr 5,

[web2py:19167] Do you need a FILENAME_SELECTOR?

2009-04-05 Thread Iceberg
('%s').value=this.value"%name), INPUT(_type='hidden',_name=name,_id=name),] super(FILENAME_SELECTOR,self).__init__(*components, **attributes) Regards, Iceberg --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[web2py:19204] Re: Do you need a FILENAME_SELECTOR?

2009-04-05 Thread Iceberg
now the full path name for later streaming. Or if you are developing a web-ui system to wrap all your command-line tools, you also need the full path name for a os.system (...) later. On Apr6, 2:19am, mdipierro wrote: > Could you explain more about what it does? > > On Apr 5, 12:03 pm, I

[web2py:19210] Is there a way to store session in memory?

2009-04-05 Thread Iceberg
Hi, does anyone know, is there a way to store session in memory? Even this means sessions will be lost if web2py restarts, but that is fine for some non-critical apps. Besides, this way we don't need to worry about cleaning up the old sessions anymore. And perhaps slightly faster. I have tried th

[web2py:19226] Re: Is there a way to store session in memory?

2009-04-05 Thread Iceberg
  from gluon.contrib.memdb import MEMDB >     session.connect(request, response, db=MEMDB(cache.ram)) > > On Apr 5, 11:14 pm, Iceberg wrote: > > > Hi, does anyone know, is there a way to store session in memory? Even > > this means sessions will be lost if web2py restar

[web2py:19271] Re: Is there a way to store session in memory?

2009-04-06 Thread Iceberg
Mmm, SQLDB('sqlite:memory:') would be a most intuitive choice, it is a pity that it does not work. No wonder it was once introduced but soon "forgotten". :-) So let's wait Massimo to adjust MEMDB to work with cache.ram, or perhaps a dedicated RAMDB for it, or even SQLDB('ram://'). I am fine with

[web2py:19384] Re: Is there a way to store session in memory?

2009-04-07 Thread Iceberg
Massimo, thanks for the hint about placing sqlite database in different folder. However I found it not fully work as expect, because those "abcdef123456_blah.table" are still created inside app/databases folder. Could you adjust the code so that all relevant *.table files are in the same folder as

[web2py:19402] Re: web2py on windows

2009-04-07 Thread Iceberg
Suggest David to paste his command line to start web2py and the console output, to make sure no simple typo inside. By the way, can web2py provide useful information now, when port not available? We mentioned that. http://groups.google.com/group/web2py/browse_frm/thread/76c1751a01bf8d5d On Apr8

[web2py:19628] Re: New App - hope you like it

2009-04-12 Thread Iceberg
By the way, I always hope the pack function in web2py admin can do an automatical cleanup before packing. Hopefully Massimo is reading this post. :-) On Apr13, 10:01am, Speedbird wrote: > That has been fixed since Beta 2 ;). Thanks. > > http://www.pyforum.org/pyforum/default/view_topic/27 > > O

[web2py:19639] Re: New App - hope you like it

2009-04-12 Thread Iceberg
on before the pack all > button? > I think any file delettion has to be explicit. > > Massimo > > On Apr 12, 9:33 pm, Iceberg wrote: > > > By the way, I always hope the pack function in web2py admin can do an > > automatical cleanup before packing. > > &g

[web2py:19668] Packing without errors/* nor sessions/*

2009-04-13 Thread Iceberg
when trying to cleanup admin app. Just use the attached default.py to replace web2py 1.61's applications/admin/controllers/default.py Best regards, Iceberg, 2009-Apr-13, 23:07(PM), Mon --- Original Message --- From:mdip

[web2py:19673] Re: Issue: sqlite:memory:

2009-04-13 Thread Iceberg
This is a topic with long history. http://groups.google.com/group/web2py/msg/df79e41f2298bef2 Hopefully Massimo will eventually find a way to implement a ram based db. :-) On Apr13, 10:44pm, vihang wrote: > There maybe something wrong in my understanding, in which case please > correct me, but

[web2py:19680] Re: Issue: sqlite:memory:

2009-04-13 Thread Iceberg
e is a proposal > > db=SQLDB('sqlite:memory:appname',cache=cache.ram) > > Working on this but the problem is determining whether tables are > there or need to be created. > > Massimo > > On Apr 13, 10:30 am, Iceberg wrote: > > > This is a topic with lo

[web2py:19684] Re: RFC auto fields

2009-04-13 Thread Iceberg
Good to have a new alternative syntax, though I doubt it is not powerful enough for some serious app which need to do many things for a SQLField(...), such as: SQLField('name', requires=IS_NOT_EMPTY(), label='User Name', comment='blah', # needed by many t2 functions writable=False, ...)

[web2py:19720] Re: Issue: sqlite:memory:

2009-04-13 Thread Iceberg
Thanks Yarko's insight on the topic of db performance domain. As to me, I brought up the issue only because I want to store sessions in RAM. In many cases sessions are not needed to be persistent on disk. Ram means maintenance free here, that way there is no need to delete old session files anymo

[web2py:19839] Can response.flash have different colors?

2009-04-15 Thread Iceberg
Currently I think most of us use response.flash as a resort to give all kinds of feedback. For example: def foo(): form=SQLFORM(...) if form.accepts(...): if there_is_some_minor_issue: response.flash='Warning: your input is unusual, but anyway the data is accepted' else: r

[web2py:19898] Issues about cron

2009-04-16 Thread Iceberg
her replace the web2py.exe by another web2py.exe I build by myself (mentioned in my previous cron-relevent post), I get the hardcron. To Achipa: Since I have kind of workaround, I can live with current situation. If you need me to do further specific test, feel free to let me know. R

[web2py:19902] Re: Can response.flash have different colors?

2009-04-16 Thread Iceberg
On Apr16, 3:05pm, Fran wrote: > On Apr 16, 3:13 am, Iceberg wrote: > > > Currently I think most of us use response.flash as a resort to give > > all kinds of feedback. > > I have this in my model: > > def shn_sessions(f): > ... > > My layout.html conta

[web2py:19907] Re: Form / Subform paradigm

2009-04-16 Thread Iceberg
:-) No need to imagine. Using web2py in education is one of the reason professor Massimo create web2py. And it "happen to" be good for production site also. Thank Massimo! On Apr17, 2:50am, Jason Brower wrote: > +1 > I hated having to work in MSaccess.  Can you believe that was my > database cla

[web2py:19922] Re: db.Field or SQLField??

2009-04-16 Thread Iceberg
I guess the answer is NO, because we need backward compatibility. However, I would suggest to add the description about SQLField VS db.Field in DAL document (http://www.web2py.com/examples/default/dal), so old users do get confused when seeing db.Field at the first time. I bet few people know the

[web2py:19937] Re: Can response.flash have different colors?

2009-04-17 Thread Iceberg
On Apr17, 2:37am, Iceberg wrote: > On Apr16, 3:05pm, Fran wrote: > > > On Apr 16, 3:13 am, Iceberg wrote: > > > > Currently I think most of us use response.flash as a resort to give > > > all kinds of feedback. > > > I have this in my model: >

[web2py:19950] Re: Can response.flash have different colors?

2009-04-17 Thread Iceberg
way than this, but getting the constants under > application control is what I'm trying to suggest. > > Regards, > -Yarko > > On Fri, Apr 17, 2009 at 3:54 PM, mdipierro wrote: > > > I like it. This may not be compatible with this > >http://www.web2py.com/ev

[web2py:19976] Re: URL structure for multilanguage site

2009-04-18 Thread Iceberg
By the way, I believe the T("...") handles short phrase better, but if you need to deal with some long article such as company background description, it will also be a good choice to manually organize your file as: yourapp/static/en/about.html yourapp/static/de/about.html ... On Apr18, 10:

[web2py:19977] Re: automatically customising query result

2009-04-18 Thread Iceberg
Read doc here. http://www.web2py.com/examples/global/vars/SQLTABLE The "headers" argument does what you want. On Apr18, 6:30pm, Timmie wrote: > Hello, > when building a SQLFORM, there are really useful helpers such as > * labels={'name':'Your Full Name:'} > * col3={'name':A('what is this?', _hr

[web2py:19981] Re: Can response.flash have different colors?

2009-04-18 Thread Iceberg
Well, I had similar thoughts as Massimo at the beginning, and that is exactly why I "stop here", and even use hardcode magic color. IMHO, a controller should be able to clearly express general info, warning msg, and bad error. Because they are so commonly needed in EVERY web app. If you think you

[web2py:19995] Re: Can response.flash have different colors?

2009-04-18 Thread Iceberg
m. > > So - I'm now thinking that both Massimo's and Icebergs latest comments need > to be merged. > > Regards, > - Yarko > > On Sat, Apr 18, 2009 at 10:32 AM, Iceberg wrote: > > > Well, I had similar thoughts as Massimo at the beginning, and that is >

[web2py:20030] Re: Can response.flash have different colors?

2009-04-19 Thread Iceberg
Glad to have a happy ending of this story. :-) On Apr19, 11:25pm, mdipierro wrote: > yes we can do that. I can include a warn, info and error in different > colors. > > Massimo > > On Apr 19, 10:07 am, Yarko Tymciurak wrote: > > > this seems like a nice approach...  one that separates concerns

[web2py:20032] Re: CRUD not updating

2009-04-19 Thread Iceberg
I happened to confirm same problem today. I am now using stable web2py 1.61.1, but it seems the problem exists even earlier than 1.61.1 ... My simplified code for reproducing. Model: db = SQLDB('sqlite://storage.db') db.define_table('repository', db.Field('name'), ) from gluon.tools import

[web2py:20053] Re: writable = False. Is it an bug?

2009-04-19 Thread Iceberg
Did not know that before. But this design is really good! Wow! However, as always, I suggest this useful comments can be appeared in build-in doc such as http://www.web2py.com/examples/default/dal On Apr20, 10:04am, mdipierro wrote: > This is not a bug but it was a bug before. > > If you want t

[web2py:20054] Re: web2py 1.61.2 is out

2009-04-19 Thread Iceberg
"Pack all now also cleans up errors and sessions" works as expected. :-) By the way, you lost a fix to a minor, minor bug: when trying to "cleanup" admin, now a ticket is issued (at least on Windows XP). In my previous patch, I also wrap try...except outside os.unlink (session_files) On Apr20, 1

[web2py:20055] Re: Can response.flash have different colors?

2009-04-19 Thread Iceberg
; } > > def index(): >     response.flash=DIV("Hello World",_class='info') >     return dict() > > But it looks ugly. Mind that it has to work decently even if one does > > def index(): >     response.flash="Hello World" >     return dict() >

[web2py:20234] Re: Issues about cron

2009-04-22 Thread Iceberg
On Apr17, 3:44am, AchipA wrote: > Linux definitely works, all crom modes, I have it in production in all > three modes. Had no Mac reports so don't know about those. Achipa, to upset you again, today I deploy my app on Linux for my first time, and find that similar problem on my Windows XP still

[web2py:20236] Re: site wide-plugins

2009-04-22 Thread Iceberg
On Apr22, 4:18pm, Timmie wrote: > OKI, this applys to controller and maybe model code. > > But where and how to locate view documents to make them available > either in widget form or full pages to all applications? > I did this before. Maybe it can help you too. There are some "resources" need

[web2py:20244] Re: site wide-plugins

2009-04-22 Thread Iceberg
& regards, > Timmie > > On 22 Apr., 10:49, Iceberg wrote: > > > I did this before. Maybe it can help you too. > > > There are some "resources" need to be shared among many of my apps. > > These resources include public documents (*.html, *.pdf, *.swf,

[web2py:20262] Re: site wide-plugins

2009-04-22 Thread Iceberg
Thanks! This trick is what I am looking for, for a long time. :-) On Apr22, 10:20pm, mdipierro wrote: > Or for more portability > > exec('import applications.%s.modules.mylib as mylib' % > request.application) > > Massimo --~--~-~--~~~---~--~~ You received this m

[web2py:20316] Re: How to insert db record, and return ID of new record

2009-04-22 Thread Iceberg
Havn't you read this? http://www.web2py.com/examples/default/dal On Apr23, 9:21am, waTR wrote: > I am trying to have a controller insert a db record, and then update > the same record. However, in order to update the record just created > by a user session, I need to use the db record's id numbe

[web2py:20317] Re: Using external libraries?

2009-04-22 Thread Iceberg
I don't know mac, but when using Windows binary (the web2py_win.zip), I can always put 3rd party libraries into web2py/applications/myapp/ modules, then access it, in a slightly different way: import applications.myapp.modules.third_parti_lib On Apr23, 7:46am, mdipierro wrote: > You cannot us

[web2py:20329] Re: Using external libraries?

2009-04-22 Thread Iceberg
t the whole folder inside of modules? > > > would i access the library by saying > > > import applications.myapp.modules.modulefolder > > > or > > > import applications.myapp.modules.modulefolder.twitter.py > > > thanks! sorry for being such a newb ;P >

[web2py:20334] Re: Integrated Development Environment with web2py

2009-04-23 Thread Iceberg
I bet that the article is not written by Massimo, because he might not have that good understanding ... about wing. :-) Anyway, this is an interesting post. I never imagine an IDE for python can even set breakpoint for a daemon program. On Apr 23, 1:51 pm, Speedbird wrote: > ... > PS - Here's

[web2py:20504] Re: Can response.flash have different colors?

2009-04-25 Thread Iceberg
Oh, one more minor suggestion, shouldn't we add some description about this new feature into the build-in document of "example 6" in this page? http://www.web2py.com/examples/default/examples In fact I tried to write a couple more examples for Massimo to show the new "info" and "warn" class, bu

[web2py:20531] About file upload and renaming

2009-04-25 Thread Iceberg
m.vars.filename=form.vars.file.filename if form.accepts(request.vars,session,onvalidation=lambda f:validate (f)): response.flash='ok' return {'':form} PS: I've post a comment on that AlterEgo link too, waiting for approval. Sincerely,

[web2py:20708] Re: modules directory in sys.path

2009-04-28 Thread Iceberg
I just guess, perhaps that would pollute the sys.path. Imagine this case, app_one and app_two both have a homebred module named "modules/ mylib.py", you can not know which one is actually called when using just "import mylib". Searching from this maillist, I found some post relevant to this topic

[web2py:20716] Re: modules directory in sys.path

2009-04-28 Thread Iceberg
h the "self-contained" philosophy and > the namespace collision risk should be low enough. Plus it lets the > user install the libraries in site-packages if he wants to, without > any change in the application code. > > Or maybe I just think too much and I should get th

[web2py:20717] Re: static files

2009-04-28 Thread Iceberg
Not sure, but why not just try and come back to tell us the conclusion? :-) On Apr28, 9:12pm, carlo wrote: > I need to create some links to pdf files saved in a static/pdf folder. > > I found an example in the book for images using : > > URL(r=request,c='static',f='myimage.png') > > is that ok a

[web2py:20782] Re: yet another feature in trunk

2009-04-28 Thread Iceberg
Maybe we can store the uploaded file on disk as: lots-of-junk__encoded-filename.abc where: lots-of-junk is a unique hash string as web2py currently does. encoded-filename.abc can be the original filename encoded by base64 to make it appears as ascii-char only on disk. Then when downloading,

[web2py:20834] Re: r681 broke my app

2009-04-29 Thread Iceberg
Sorry but I have to say the {{if response.flash.xml()[1:4] == 'div':}} looks ugly. I guess: isinstance(response.flash, str) or: isinstance(response.flash,DIV) would do same thing and is more elegant. On Apr30, 2:58am, Fran wrote: > In order to use the newly-suggested differential flash class

[web2py:21024] Re: How to get help (verson 1.01) on web2py

2009-05-02 Thread Iceberg
In case you did not know yet, I would suggest an item zero: 0. web2py's built-in document center at http://localhost:8000/examples/default/docs And these are my favorite sections (The more important, the earlier it appears): Interactive Examples Database Abstraction Layer Examples Interact

[web2py:21033] Missing the old document for DAL

2009-05-03 Thread Iceberg
Hi Massimo, Once again, I forgot the syntax for the limitby clause, so I turned to the built-in doc for help. Unfortunately, the detail syntax of limitby is not mentioned at all. http://www.web2py.com/examples/default/dal Eventually google still guides me to the old document for DAL: http:/

[web2py:21035] Prune httpserver.log?

2009-05-03 Thread Iceberg
Is there anyone who deploy web2py on production server? How do you prune httpserver.log? Otherwise this file grows bigger and bigger. Currently I am planing to os.unlink() it via the cron feature. Is there any more gentle way? Thanks. --~--~-~--~~~---~--~~ You recei

[web2py:21123] Re: JSON and datetime

2009-05-03 Thread Iceberg
Mmm, I happened to meet same problem. Sure it is not a web2py issue, not even a python issue. It is mainly because JSON standard does not define how to handle date and time. http://www.json.org/index.html Anyway, encoding datetime is easy. There are even simpler ways here. http://stackoverfl

<    1   2   3   4   5   6   7   >