[web2py] Re: Caching downloads

2010-05-06 Thread Iceberg
, but no matter what, it shall not cause content fail to load. I remember I once tried @cache(...) but encounter similar problems, then I give up. :-( Nice to pick it up if someone can throw some light. Thanks! Regards, iceberg On May5, 11:39am, Mariano Reingart wrote: > .. after u

[web2py] Bug and fix about IS_DATE_IN_RANGE()

2010-05-07 Thread Iceberg
. Iceberg

[web2py] Re: Bug and fix about IS_DATE_IN_RANGE()

2010-05-08 Thread Iceberg
;>> v('1/01/2008') (datetime.date(2008, 1, 1), None) Might not be considered as a big deal, although. Just my $0.02 Regards, Iceberg On May8, 7:39am, mdipierro wrote: > Done. I added one test each. we should have more tests in gluon/tests > we have none, only doctes

[web2py] How to set multiple primary key?

2010-05-08 Thread Iceberg
' % (tablename, k) SyntaxError: invalid table "account" attribute: sequence_name What did I do wrong? Iceberg

[web2py] Re: How to set multiple primary key?

2010-05-08 Thread Iceberg
of the supported DB engines. > Are you using MS SQL, DB2, Ingres or Informix? > Can we see the model? > > On May 8, 5:57 am, Iceberg wrote: > > > > > Hi there, > > > I am fiddling multiple primary keys. Somehow I managed to find > > following example ins

[web2py] Re: Calculation error

2010-05-08 Thread Iceberg
Is that possibly because the default value of tipvalue is a string '0.15'? Try use float 0.15 instead. -- Iceberg On May9, 11:00am, greenpoise wrote: > Model: > > db.define_table('order', >     Field('employee',db.person), >     Field('tabl

[web2py] Re: How to set multiple primary key?

2010-05-09 Thread Iceberg
? Denes' good work deserves being mentioned as a dedicated section. Thanks in advance. Sincerely, Iceberg On May9, 8:55pm, DenesL wrote: > SQLite is not one of the supported DBs. > Keyed tables are only supported in MS SQL, DB2, Ingres and Informix. > Other DB engines (except SQLite)

[web2py] Enhancement to gluon.tools.Mail

2010-05-10 Thread Iceberg
27;] = ..." as below: from time import gmtime, strftime payload['Date'] = strftime("%a, %d %b %Y %H:%M:%S +", gmtime()) Besides, document here has some typo ("gluon.tool.Mail") and perhaps outdated (no need for globals() any more). http://web2py.com/book/default/section/5/5?search=mail Regards, Iceberg

[web2py] Re: Catch and replace vars

2010-05-10 Thread Iceberg
if form.accepts(request.vars, onvalidation=magic): pass # ok return {'form': form} I did not test it. But it shows you the key of using onvalidation() trick. Regards, Iceberg On May11, 12:08am, AsmanCom wrote: > Hi, > > i want to do a simple task: > > def function_1(): >

[web2py] Re: User stack or queue

2010-05-10 Thread Iceberg
Hi peter, since you are a beginner of web2py even python, why not just come back to learn Python [1] and then web2py [2]? Don't expect to learn their "syntax" on a maillist. Please, cherish your time, as well as others. If, after your syntax learning, you have some design question or puzzles, feel

[web2py] Re: Enhancement to gluon.tools.Mail

2010-05-11 Thread Iceberg
It works! :-) On May11, 4:58am, mdipierro wrote: > In trunk, thanks. Please check it. > > On May 10, 3:23 am, Iceberg wrote: > > > > > Hi pals, > > > gluon.tools.Mail is handy but it doesn't not contain the Date header > > of a mail. Some ema

[web2py] Re: Catch and replace vars

2010-05-11 Thread Iceberg
form.accepts(..., onvalidation=callback) and it only works before inserting or updating a record into db. On the contrary, rows.setvirtualfields(...), only works when retrieving records from db. (Detail in http://groups.google.com/group/web2py/browse_frm/thread/d93eee8cc2495c8c ) Is it right? Regards

[web2py] Delete record without triggering validators?

2010-05-11 Thread Iceberg
ter way is to do delete before validators are called. Can you do that? Regards, Iceberg

[web2py] Re: Catch and replace vars

2010-05-11 Thread Iceberg
field. Is there any reason for that? Right now I still have to stick to my form.accepts(..., onvalidation=callback) approach. :-/ Sincerely, Iceberg On May12, 1:30am, mdipierro wrote: > Yes but > >   Field('bar', compute=lambda r:r['foo']) > > not > >  

[web2py] Re: Using LOAD from a controller?

2010-05-11 Thread Iceberg
def function_A(): return {'something':'blah blah'} def function_B(): return {another_thing} then in function_A.html you can use: {{=something}} {{=LOAD(URL(r=request,f='function_B'),ajax=True)}} On May12, 4:16am, Keith Edmunds wrote: > I was to display a form using Ajax in response to a

[web2py] Re: Using LOAD from a controller?

2010-05-11 Thread Iceberg
On a second look, your case seems having no need for LOAD. How about adjust your code like this? New todo On May12, 4:43am, Keith Edmunds wrote: > Sorry, Iceburg, I appreciate your attempt to help, but you've lost me > completely! Can you explain? > > Thanks

[web2py] Re: Catch and replace vars

2010-05-12 Thread Iceberg
x27;, 'integer'), Field('kid', 'integer', compute = lambda r: min(r['kid'], r['adult']) ), # each kid must be accompanied by one dedicated adult ) PS: Of course the latter case should have better approach. Here I a

[web2py] Re: Catch and replace vars

2010-05-12 Thread Iceberg
ecause they have not been insrted yet. > > On May 12, 9:30 am, Iceberg wrote: > > > > > So if I understand it correctly, the Field(..., compute=...) is only > > suitable for defining a field which is not supposed to be showed in > > SQLFORM(), neither supp

[web2py] Re: When and how to use command line option -f FOLDER?

2010-05-14 Thread Iceberg
on/widget.py, yet have no luck. sys.path.append(options.folder) sys.path.append(os.path.join(options.folder,'applications')) What can I do? [1] http://code.google.com/p/web2py/source/detail?r=52c0b092adef8a96f1f18c84e5681d4548acd9ae Regards, Iceberg On Apr8, 2:18pm, mdipierro wr

[web2py] Re: PGP Mail

2010-05-14 Thread Iceberg
On May15, 10:39am, Massimo Di Pierro wrote: > Thanks to szimszon we have PGP in Mail (trunk only) > > mail.send( >         self, >         to, >         subject='None', >         message='None', >         attachments=None, >         cc=None, >         bcc=None, >         reply_to=None, >        

[web2py] Re: When and how to use command line option -f FOLDER?

2010-05-15 Thread Iceberg
On May15, 11:08am, Jonathan Lundell wrote: > On May 14, 2010, at 11:27 AM, Iceberg wrote: > > > Turns out that the fix [1] is not completed. Most apps work when using > > "web2py -f another_web2py_folder", but not those contains > > local_import('my_module&#

[web2py] Re: large sites/application.

2010-05-15 Thread Iceberg
Just some thought. What if we could somehow change app1's model into a module, automatically? For example app1/models/__init__.py # Add this And then append this into your app1/models/db.py: __all__ = [ 'what', 'you', 'wanna', 'share' ] # This might not be necessary Havn't tried it. But i

[web2py] Re: integer range select box

2010-05-15 Thread Iceberg
the alternative is: Field('a_large_number', 'integer', requires = IS_INT_IN_RANGE(minimum=1, maximum=10), comment = 'NOTICE: Input something between 1 and 10') Iceberg

[web2py] Re: nightly built

2010-05-15 Thread Iceberg
On Apr17, 1:17pm, mdipierro wrote: > Please check it: > http://web2py.com/examples/static/nightly/web2py_src.zip http://web2py.com/examples/static/nightly/web2py_win.zip http://web2py.com/examples/static/nightly/web2py_osx.zip > > -- Just an idea. Why not put this download links inside http://

[web2py] Re: When and how to use command line option -f FOLDER?

2010-05-15 Thread Iceberg
On May15, 3:46pm, Iceberg wrote: > @Massimo, thanks for your latest attempt, but it should be adjusted as > below. And please also keep the comment which is valuable also. > >   sys.path.insert(0, path) # somehow it need to be ahead of cwd > Hi Massimo, the latest 1.78.1 solves th

[web2py] Re: web2py 1.78.1 is OUT

2010-05-16 Thread Iceberg
it is not cool that we need to define our own GroupOptionsWidget every time. But if there is enough interest, I guess we can do more to enhance the already-too-complicated IS_IN_SET(...), to support following pattern: Field('departure', IS_IN_SET( {'China':CHINA, 'In

[web2py] Re: Display reference fields in read-only form

2010-05-17 Thread Iceberg
Not sure. Can't Field(..., writable=False) do the trick? On May17, 5:44pm, Andrew Buchan wrote: > Hi all, > If I have a referenced field where I specify which field in the referenced > table to display, like so: > Field('To_Department', requires = IS_IN_DB(db, db.department.id, > '%(Department_

[web2py] Re: Sending Email bug

2010-05-17 Thread Iceberg
On May17, 4:55pm, PanosJee wrote: > Hello everyone, > I am trying to send an email (html and txt) but it fails. I tried to > simplify my code in order to test it. > > mail.send(to='panos...@gmail.com',subject='test',message='test') > > But i am getting: > File "/Users/panosjee/Documents/Work/web2p

[web2py] Re: Production releases

2010-05-18 Thread Iceberg
Maintaining a 2-4 weeks gap between development release and production release, is certainly a systematic precaution which can earn us some time for bug finding and fixing. However it only works best when a significant amount of volunteers who is willing to update to latest development release quic

[web2py] Re: expire_sessions.py and cron

2010-05-21 Thread Iceberg
I think there is a cleaner way. No need to modify the applications/ admin/cron/expire_sessions.py whenever you add or remove your apps. You just put this line into each of applications/your_app/cron/crontab 10 2 * * * root **applications/admin/cron/expire_sessions.py

[web2py] Re: Actual situation of web2py compatibility

2010-05-22 Thread Iceberg
On May22, 4:33pm, GoldenTiger wrote: > I have found a lot of contradictorius information about Web2Py > compatibility along internet, due to changes in diferent version, I > suposse > > I am trying to installing web2py at Hostgator without sucess , with > Python 2.4.3 > Sometimes Hostgator Support

[web2py] Re: hiding email password

2010-05-23 Thread Iceberg
> > thanks, > > matt So, in general, you want to share your source code, but not the configuration of one specific deployment. Perhaps you have to put your setting in a separate config file other than the source code. Something like this? mail.setting.sender = open('/home/me/my_sender.ini').read() Or you can read it from a db table, especially when using GAE? Just some thoughts. Regards, Iceberg

[web2py] Re: Production releases

2010-05-23 Thread Iceberg
r refactoring. Ok, ok, enough preachment here. :) Locking a release (candidate) for one week before releasing and allow people testing it, is the way python doing. It should work as long as, enough people, even those who would not update his work copy frequently, are willing to response to the call of "Uncle M" saying "I want you to test web2py RC-1.x" :-) http://blogs.gnome.org/dcbw/files/2009/03/unclesam.jpg Let's keep making web2py better! Regards, Iceberg

[web2py] Re: parsehtml

2010-05-23 Thread Iceberg
I ran the code and nothing goes wrong, no exception either. By the way, what is the user case of this HTMLParser? Regards, Iceberg On May23, 11:46pm, Massimo Di Pierro wrote: > Anybody interested in helping with this? > > It scrapes an html files and converts into a tree hierarchy

[web2py] Re: parsehtml

2010-05-24 Thread Iceberg
I did not try but I assume the builtin python module HTMLParser already handle at least (1) tags like , not sure about (2) and (3). On May24, 4:32am, mdipierro wrote: > hmmm somehow I did not save comments in the file. > > This does not handle well: > > 1) tags like > 2) attributes that cont

[web2py] Re: parsehtml

2010-05-25 Thread Iceberg
esult = web2pyHTMLParser(form.vars.input).tree return {'':DIV( 'Insert your HTML code to optimize:', form, FIELDSET(PRE(str(result))),)} Well, not exactly an html optimizer, because our version does not strip spaces inside text content. Just for fun.

[web2py] Re: parsehtml

2010-05-25 Thread Iceberg
with anything better. > > Massimo > Since render={...} does render html tags into another form, so I think "render" is good name. filter=lambda... is not very good because the python has a reserved keyword "filter" for built-in filter() which acts in different logic. We should avoid conflict and confusing. How about we just use "replace"? I mean .flatten(replace=lambda x:x, render={...}) Regards, Iceberg

[web2py] Re: Delete record without triggering validators?

2010-05-27 Thread Iceberg
> On May 11, 1:08 pm,Iceberg wrote: > > > Hi Massimo, > > > Right now validators are triggered even when a record is successfully > > being deleted. This can be annoying in case I am deleting old records > > as below: > > > db.define_tabl

[web2py] Re: flawed architecture creating race condition for database writes

2010-05-27 Thread Iceberg
On May27, 11:32pm, Carl wrote: > the flaw is in my architecture not web2py. can you help with a better > approach? Needs to be BigTable-friendly to boot. > > I have two user types: Agents and Candidates > Agents invite Candidates to Parties. > > I keep a Party table recording all such Party invite

[web2py] Re: flawed architecture creating race condition for database writes

2010-05-27 Thread Iceberg
what other may say. On May28, 1:44am, Carl wrote: > thanks Iceberg. > > your approach is pretty much what I have right now. I'm looking for a > bullet-proof approach. > otherwise I'm running code with "fingers crossed two users don't use > the system at the same

[web2py] Re: Delete record without triggering validators?

2010-05-27 Thread Iceberg
> > > On May 11, 1:08 pm,Iceberg wrote: > > > > > Hi Massimo, > > > > > Right now validators are triggered even when a record is successfully > > > > being deleted. This can be annoying in case I am deleting old records > > > > as

[web2py] Re: Autoincrement field

2010-05-28 Thread Iceberg
I guess the point here is, generally speaking, what is a secure way to make two or more subsequent DAL operations are performed without race condition. Is a kind of lock needed? An example to describe the problem (but not solving it): def index(): with a_lock_to_prevent_concurrent_requests: #

[web2py] Re: Dependent drop downs

2010-05-28 Thread Iceberg
On May28, 2:38pm, Neveen Adel wrote: > Hello, > > I have > db.define_table('type', >                 SQLField('name','string',length=2) >                 SQLField('parent','reference db.type') > ) > > db.define_table('member', >                 SQLField('name','string'), >                 SQLField

[web2py] Better record deletion in SQLFORM

2010-05-28 Thread Iceberg
cord is deleted and avoid further operation return True [1] http://web2py.wordpress.com/2010/05/02/record-deletion-and-keepvalues-in-forms/ Sincerely, Iceberg, 2010-May-28, 03:07(AM), Fri

[web2py] Re: Better record deletion in SQLFORM

2010-05-28 Thread Iceberg
of record from int to string,  web2py > respoonded me OK > > 4) reallyr web2py doesn't changes type field, but models has type > string at define_table > > I had to use SqliteManager to change table. > > On 28 mayo, 17:55, Iceberg wrote: > > > > > Hello Mas

[web2py] Re: "wizard" style forms in web2py

2010-05-29 Thread Iceberg
implemented by a client side technic to gain faster UI response. -- Iceberg On May29, 11:57pm, Thadeus Burgess wrote: > I would use the jQuery form wizard plugin. It is very nice and dose > the pagination for you. > > The only issue is if the data in the second step depend on what

[web2py] Re: Email "perfect" regex

2010-05-29 Thread Iceberg
On May30, 10:36am, blackthorne wrote: > http://fightingforalostcause.net/misc/2006/compare-email-regex.php > > Take it as a suggestion for a better email regex validator... +1. The post contains implementations as well as test cases. It should be easy to convert them into a web2py validator WIT

[web2py] Re: 1.79.0rc1 please check it out

2010-05-30 Thread Iceberg
On May30, 1:17pm, mdipierro wrote: > http://web2py.com/examples/static/nightly/web2py_src.ziphttp://web2py.com/examples/static/nightly/web2py_win.ziphttp://web2py.com/examples/static/nightly/web2py_osxzip > > x509 emails, thanks Gyuris > attachment and html in Mail on GAE, thanks PanosJee > fixed

[web2py] Re: Dependent drop downs

2010-05-30 Thread Iceberg
Very likely your javascript has some error. Perhaps the latest "change()" is not good. On May30, 5:29pm, Neveen Adel wrote: > Hello, > >  i tried it but it didn't call the action? > > i did the following : > > In html Page: >      $("#project_project_category").change(function() { >         $.aja

[web2py] Re: Dependent drop downs

2010-05-30 Thread Iceberg
et_objective_category', > > ['project_project_category'],'project_project_objective' ) > >  }) .change(); > > > and it works fine. > > > On May 30, 12:36 pm, Iceberg wrote: > > > > Very likely your javascript has some error. Perhaps the l

[web2py] Re: How to present status of other system by web2py?

2010-05-30 Thread Iceberg
You can use web2py's cron feature to trigger a data collector, which use "3. command line utility" you mentioned to gather data, insert into your web2py app's db, then you can show it in the way you like. http://web2py.com/book/default/section/4/17?search=cron On May31, 10:44am, dlin wrote: > I

[web2py] Re: how to generate barcode label ?

2010-05-31 Thread Iceberg
Thanks. Then what choices do you recommend to read barcodes? Both make and read are needed to complete any full solution, aren't they? On Jun1, 11:17am, Jason Brower wrote: > There are alot of functions that can make barcodes. I think google has a > web api for barcodes.  I made one that ran a sc

[web2py] Re: cancel button in update and create work differently [closed]

2010-06-01 Thread Iceberg
history.go(-1) will not work if the current page is the first page of current browser session. Will this help you? On Jun1, 8:00pm, annet wrote: > Setting the cancel button to: > > form[0][-1] > [1].append(INPUT(_type="button",_value="Cancel",_onclick='javascript:histor > y.go(-1);')) > > at

[web2py] Re: How to present status of other system by web2py?

2010-06-01 Thread Iceberg
nd. Nice to meet you here. On Jun1, 9:05pm, dlin wrote: > Is it possible to have multi-thread in python to listen udp socket and > just collect the status in ram instead of DB? > > On 5月31日, 上午11時46分, Iceberg wrote: > > > > > You can use web2py's cron feature to

[web2py] Re: VoltDB

2010-06-01 Thread Iceberg
Wow, "outperformed traditional OLTP database systems by a factor of 45". That is awesome! Oscar wrote: > Hi there, > > There is a new DBMS in the block, a new kind of DBMS. Plese read > http://cl.ly/1EO3 for more information. > > Massimo, can you add support for it. it's worth. > > Best Regards, >

[web2py] Re: how test if a table have record in a if statement ?

2010-06-01 Thread Iceberg
How come the syntax? I do not know that. I would use: if db(db.mytable.id>0).count(): On Jun2, 2:17am, ceriox wrote: > i need to test if a table are empty in if statement ... i try with: > > if db.Prestiti.id.count==0: >         vuoto='if ' >     else: >         vuoto='else '

[web2py] Re: sender's name in mail

2010-06-02 Thread Iceberg
Try specify your sender's name as: "XYZ" On Jun2, 2:52pm, Rohan wrote: > I want to add sender's name in emails. Currently I am able to send > mails from ad...@example.com but sender's name is displayed as admin > which is not conveying the proper information. Can I add senders' name > to ma

[web2py] Re: variables turning into lists

2010-06-02 Thread Iceberg
Did not look into your code. But this kind of situation usually is caused by a form receives variables from both GET and POST. In this case, request.vars.myvar=['blah', 'blah'], but request.get_vars.myvar='blah', and request.post_vars.myvar='blah'. So you can choose to use only one of it. On Jun2

[web2py] proposal of introducing generic.load

2010-06-03 Thread Iceberg
n serve two purposes: http://.../auxiliary.load serves as a raw component LOADed by other action http://.../auxiliary serves as a normal html page as usual # PS: Please keep all above explanation for people to know when and how to use it. # License: Public Domain # Author: Iceberg at 21cn do

[web2py] Re: date operation

2010-06-03 Thread Iceberg
Search doc for python built-in timedelta please. On Jun3, 10:30pm, ceriox wrote: > hi, > how i can increment a data field of x days? > > example > i have > db.Prestiti.Data_richiesta=2010-06-03 16:13:14 > db.Prestiti.Durata=30 > > i want generate > fineprestito=2010-07-03 16:13:14 > > i wanna add

[web2py] Re: date operation

2010-06-03 Thread Iceberg
tun the difference from 2 date , > i need to add 30 days to a date > like my example > i have a date field and an integer field with the number of days, > i wanna add the number of days to a data field. > > (i'm not an expert pyton programmer) > > On 3 Giu, 16:32, Iceber

[web2py] Re: Multiple instances of same application

2010-06-03 Thread Iceberg
I think Doug's puzzle deserves a more general solution. The requirement and challenge is: R1. The app's central source code should contain default setting. R2. The app's multiple deployment instances should be allowed to contain its local setting. R3. And after the next "hg update", the default set

[web2py] Re: checkboxes and radio widget failed with multiple validators

2010-06-03 Thread Iceberg
Maybe your patch is ok. But wouldn't it be not necessary to use requires=[IS_IN_SET(...), IS_NOT_EMPTY()]? Because you must already mention all the allowed values in the IS_IN_SET() and usually empty value in not inside. On Jun4, 1:36am, Mathieu Clabaut wrote: > Hello, > > Is there any interest i

[web2py] Re: Multiple instances of same application

2010-06-03 Thread Iceberg
nfiguration module.. > > God I pray we never use something like > `0_local_config_pls_dont_pack_dont_commit.py` INTO web2py. web2py and > its naming conventions >.< > > -- > Thadeus > > > > On Thu, Jun 3, 2010 at 10:22 AM, Iceberg wrote: > > I think Doug

[web2py] Re: Multiple instances of same application

2010-06-04 Thread Iceberg
nyway, to allow a flag when packaging that does not > package the database/ folder. So in principle one could create > function that updates parameters from a DAL('sqlite://settings.db') > > On Jun 4, 1:10 am, Iceberg wrote: > > > > > IMHO, flask and my lightweig

[web2py] Re: Multiple instances of same application

2010-06-04 Thread Iceberg
least, agree on a new "pack without databases" feature on http://localhost:8000/admin/default/site for each app? (Then I can put my own local_config.ini inside there) Regards, iceberg On Jun5, 1:55am, Thadeus Burgess wrote: > I agree with Massimo, the NOT packing facility could be h

[web2py] Re: convert field to multiple view values?

2010-06-05 Thread Iceberg
And in the controller/view, you can use db.foo.height.represent = lambda v: 'xx feet yy inch zz fraction' to display it, therefore you need not depend on javascript. On Jun6, 7:12am, MikeEllis wrote: > Oops hit send by accident. > > so after the form.accepts(request.vars, session), you'll need co

[web2py] Re: python web console

2010-06-07 Thread Iceberg
Off topic: The last commit of chinese translation of admin app somehow missed the word "shell". No wonder I can't find the [shell] feature in chinese UI. It happened before and it will probably happen in the future. So, instead of just patching the missing translation, I suggest Massimo to adjust t

[web2py] Re: parsehtml

2010-06-08 Thread Iceberg
Hi Massimo, did you include it in your latest commit? If so, I guess you forget to add a new gluon/decoder.py as well. And a side note, I recommend you maintain two web2py environment for yourself, one for developing and then commit new features, the other is used for "hg pull" and "hg update" and

[web2py] Re: python web console

2010-06-08 Thread Iceberg
es/zh-cn.py?r=063cc48352eacc0be534f288781840261717caa2 [4] http://groups.google.com/group/web2py/browse_frm/thread/4a1224741bb8ac06 On Jun 8, 2:56 am, Yarko Tymciurak wrote: > Iceberg:   could you debug / trace?   I too thought the behavior you > asked for was already the case, so it is proba

[web2py] Re: widgets

2010-06-12 Thread Iceberg
On Jun12, 12:47pm, leone wrote: > I coded a widget to use with a Field object. > Because I need some javascript actions i wrote pure html-javascript > code that my widget returns. > It runs, but when I accept the form values are in request.vars, but > not in form.vars. > How can i store values in

[web2py] Re: widgets

2010-06-12 Thread Iceberg
On Jun12, 12:47pm, leone wrote: > I coded a widget to use with a Field object. > Because I need some javascript actions i wrote pure html-javascript > code that my widget returns. > It runs, but when I accept the form values are in request.vars, but > not in form.vars. > How can i store values in

[web2py] Re: widgets

2010-06-12 Thread Iceberg
On Jun12, 12:47pm, leone wrote: > I coded a widget to use with a Field object. > Because I need some javascript actions i wrote pure html-javascript > code that my widget returns. > It runs, but when I accept the form values are in request.vars, but > not in form.vars. > How can i store values in

[web2py] Re: form in layout.html?

2010-06-21 Thread Iceberg
Wow, thanks very much for sharing this trick. I knew it could be easy and elegant! :-) On Jun20, 10:15pm, mdipierro wrote: > Because the form is submitted and returned via ajax the usual > mechanism does not work but you can do: > > def form(): >     form=SQLFORM.factory( >        Field('name', r

[web2py] Re: for fun

2010-06-21 Thread Iceberg
Thanks for sharing. But ... I put exactly same code on your page to a myapp/controllers/maze.py, even use your version of processing.min.js, processing.init.js, jquery.js, but it just does not work exactly the same as your demo. When I click somewhere in the maze, say coordinate (x,y), my maze rea

[web2py] Re: for fun

2010-06-21 Thread Iceberg
ion of the canvas in the page. the > "-20" fixes the offset for me. For you it may be different. > > On Jun 21, 11:44 am, Iceberg wrote: > > > > > Thanks for sharing. But ... > > > I put exactly same code on your page to a myapp/controllers/maze.py, >

[web2py] Re: proposal of introducing generic.load

2010-06-21 Thread Iceberg
#x27;':form} # No need for "return form" anymore! >From now on, single auxiliary() can serve two purposes: http://.../auxiliary.load serves as a raw component LOADed by other action http://.../auxiliary serves as a normal html page as usual # PS: Please keep all abo

[web2py] Re: Web2py free hosting?

2010-06-21 Thread Iceberg
People here know some cheap hosts, but "free" sounds better than "cheap". :-) Hope your searching adventure can bring back some info to the group. By the way, I just saw this but did not try them. http://www.free-webhosts.com/webhosting-01.php On Jun20, 4:34am, Giuseppe Luca Scrofani wrote: > He

[web2py] Re: proposal of introducing generic.load

2010-06-22 Thread Iceberg
7;layout.html'}} {{=form}} I used such generic.html in all my apps for more than one year. It did save my numerous time. Regards, Iceberg On Jun22, 3:34am, mdipierro wrote: > I like the idea. Let me think a little bit about the implementation > until the end of this week. > Wh

[web2py] Re: built in web2py datepicker bug with Google Chrome

2010-07-01 Thread Iceberg
!!! I met this issue recently. And thank you so much for the nudge about suspecting Chrome. That gave me the direction, then I found comment 232 of this thread: http://www.dynarch.com/projects/calendar/old/ I think Massimo need to include that patch into web2py's welcome app. Regards, Iceberg

[web2py] Re: language files can not edit directly

2010-07-01 Thread Iceberg
n system, I think. The solution is use longer string in your app to avoid various meaning, and always translate in a context rather than just do word-to-word translating. Q4: I guess dlin can try to change line 60 of gluon/languages.py from: for key in sorted(contents): to: for key in sorted(contents, key=str.lower): Q5 & Q6: Perhaps you can change admin's translate interface, and Massimo will take your patch. Regards, Iceberg

[web2py] Re: local_import

2010-07-03 Thread Iceberg
Sorry gentlemen, I don't get it. First of all, the new implementation, even with the latest bugfix, does not use the "force" parameter at all, neither python reload(). I reckon that Jose did not test the reload feature when he said "Now works!". Actually now the reload feature is gone. Second, I

[web2py] Will rocket close connections if it takes long time?

2010-07-03 Thread Iceberg
p. I don't know whether situation is changed since then. [1] http://groups.google.com/group/web2py/msg/0416ed025f3e33f8 Regards, Iceberg

[web2py] Re: built in web2py datepicker bug with Google Chrome

2010-07-03 Thread Iceberg
On Jul1, 8:01pm, Iceberg wrote: > On Jun30, 4:56am, Jean-Guy wrote: > > > Hello, > > > Is there other user that are having datepicker coming blank when > > changing the year or mouth couples of time with Google Chrome? > > > I test it with firefox no problem.

[web2py] Re: Will rocket close connections if it takes long time?

2010-07-03 Thread Iceberg
her evidence in web2py/httpserver.log 127.0.0.1, 2010-07-03 21:49:20, GET, /myapp/default/longrun, HTTP/ 1.1, 200, 21.75 Regard, Iceberg On Jul3, 8:31pm, mdipierro wrote: > The web server threads MUST have a timeout (the shorter the better) > else they are vulnerable to denial of service

[web2py] Re: local_import

2010-07-03 Thread Iceberg
slower but actually it may be faster than the > previous solution using exec with force=False. > > The reason for the change is that the new implementation is supposed to > be equivalent, cleaner and faster. > Does it work for you? > > Massimo > > On 3 Lug, 06:05, Iceberg

[web2py] Re: Will rocket close connections if it takes long time?

2010-07-04 Thread Iceberg
Thanks for all these info, Tim. You said: "The timeout ... is a timeout based on inactivity between http requests.  So the long requests that Iceberg is seeing are perfectly normal and acceptable." According to my reading of the rocket-science code (and I could be wrong),

[web2py] Re: local_import

2010-07-04 Thread Iceberg
Thanks for quick action! I also confirm latest trunk has reload feature now. So we have a happy ending, for the Independent Day. :-) On Jul4, 3:36pm, mdipierro wrote: > You are right. I fixed it in trunk and it works for me now. > > Massimo > > On 4 Lug, 01:22, Iceberg wrote: &

[web2py] Re: Will rocket close connections if it takes long time?

2010-07-05 Thread Iceberg
ay be).  Rocket enables > Python's socket timeout protection on every Python platform that > supports it. > > Does this clear things up? > > On Jul 4, 4:30 am, Iceberg wrote: > > > > > Thanks for all these info, Tim. You said: > >     "The timeout

[web2py] Re: built in web2py datepicker bug with Google Chrome

2010-07-07 Thread Iceberg
Hi everyone, Tips: the patch is accepted in trunk. But, "hg pull; hg update" is not enough to make it work. You need to tell web2py to reload the new scaffold app by manually touch a file /home/you/web2py/NEWINSTALL and then restart your web2py. On Jul1, 8:01pm, Iceberg wrote: > &

Re: [web2py] Re: Will rocket close connections if it takes long time?

2010-07-07 Thread Iceberg
lexibility to choose what they want. That is better than killing a (long) running thread unconditionally. I love rocket. :-) Best regards, Iceberg, 2010-Jul-07, 21:47(PM), Wed --- Original Message --- From:Ca

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-08 Thread Iceberg
it is small enough, that is good, otherwise ... oh by the way, do you use web2py's built-in server (now rocket), or do you use apache-like frontend? That could make difference. Best regards, Iceberg, 2010-Jul-08, 20:50(PM), Thu --- Origin

[web2py] Re: storing hierarchical data in web2py database

2010-07-15 Thread Iceberg
Just a quick thought. 1. Each plugin's owner can store the source code in code.google.com 2. Too bad that code.google.com can not provide a live show about the plugin's look-and-feel, so we can setup a plugins' "sandbox" on web2py.com, nightly checkout plugins' source code, then user can visit a l

[web2py] Re: Best way for a config file

2010-07-16 Thread Iceberg
On Jul13, 3:06pm, Narendran wrote: > Hi, > I have been trying to work without a config file, but it is a little > difficult to work across multiple (dev, test and prod) envs. I'd like > to know the solution if this has been already discussed: > 1. The db configuration in db.py changes in dev, test

[web2py] Re: Menu Refresh

2010-07-16 Thread Iceberg
One more comment. If your app is simple enough (most are), to use just one controller, it does not have much difference between define your menu in models/menu.py or at the beginning of controllers/default.py, and the latter gives you most flexibility to control what your menu shows up. On Jul12,

[web2py] Re: csv: a showstopper for me. Is there another way?

2010-07-16 Thread Iceberg
On Jul13, 6:51am, mdipierro wrote: > errata > > db.define_table('animal',Field('name')) > > def index(): > > form=SQLFORM.factory(Field('name',default=request.vars.name,requires=IS_NOT > _EMPTY())) >     if form.accepts(request.vars): >         redirect(URL(r=request,f='animals',vars=request.vars

[web2py] Re: Rocket cache response

2010-07-19 Thread Iceberg
ght not be relevant to the delay behavior. With respect to the delay behavior, I think it is cross browser, albeit I don't have direct evidence. Most of my app's end users use IE6/7/8, sometimes they complain some page take long time to load, but usually a manually refresh (retry) can bypass the problem. :-/ Regards, Iceberg

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Iceberg
oblem disappears." So I guess there is a standalone rule #5: Use apache/WSGI etc. instead of the built-in Rocket ? Best regards, Iceberg, 2010-Jul-21, 18:01(PM), Wed --- Original Message --- From:mdipierro Send

[web2py] Re: SQLite Logging

2010-07-21 Thread Iceberg
, Iceberg, 2010-Jul-22, 10:28(AM), Thu --- Original Message --- From:Yarin To: web2py-users Cc: johann.scheibelho...@easytouch-edv.com, mdipie...@cs.depaul.edu, iceb...@21cn.com Date:Wed, 21 Jul 2010 19:15:55 -0700 (PDT) Subject: SQLite

[web2py] Re: Cache query results on the server side

2010-07-23 Thread Iceberg
In case you forget this: localhost:8000/yourapp/appadmin/ccache this page gives an overall stat about your cache On Jul 23, 6:23pm, mdipierro wrote: > correction > >   cache.ram.storage['web2py_cache_statistics']['total_hits'] > > counts total calls to cache function while > >   cache.ram.stora

  1   2   3   4   5   6   7   >