[web2py] Re: Why URL(..., scheme=True, ...) is implemented differently than request.is_https?

2019-07-23 Thread Ray (a.k.a. Iceberg)
17, 2019 at 2:44:53 PM UTC-7, Anthony wrote: > > Feel free to submit a pull request. Or just set scheme='https' if you know > it is HTTPS. > > Anthony > > On Tuesday, July 16, 2019 at 4:31:06 AM UTC-4, Ray (a.k.a. Iceberg) wrote: >> >> Hi there, >> >

[web2py] Re: Why URL(..., scheme=True, ...) is implemented differently than request.is_https?

2019-07-17 Thread Ray (a.k.a. Iceberg)
The problem is NOT about how to setup apache to redirect http to https. I am already doing that. But, in fact, it was such a redirection, combining with the unfortunate fact that web2py's URL(..., scheme=True) still generating "http://...; links, causing my RESTful API to malfunction. Who

[web2py] Why URL(..., scheme=True, ...) is implemented differently than request.is_https?

2019-07-16 Thread Ray (a.k.a. Iceberg)
Hi there, I tend to use URL(..., scheme=True, ...) in my apps to generate an absolute URL, as documented here . However, one of my app which has been deployed behind Apache wsgi with https, I noticed that the generated

[web2py] Re: record representation format that refer to another table and that table is refer to another table

2019-04-24 Thread Ray (a.k.a. Iceberg)
I know I'm late to the party, but I have to write to thank Anthony for sharing such a wonderful trick! One more thing, I happen to also discover that we do not have to use lambda. The following form is less verbose, more intuitive. db.define_table('room', Field('room_no'),

[web2py] FYI: A tutorial on how to customize export in SQLFORM.grid

2018-04-01 Thread Ray (a.k.a. Iceberg)
Stumbled upon this blog post "Export in web2py's SQLFORM.grid " by Prasad Muley. It provides concrete example on how to customize an exporter TO REMOVE THE TABLE PREFIX IN CSV HEADER LINE. That is easier to digest than the standard web2py book's

[web2py] What happened to the on-screen time picker widget?

2017-12-24 Thread Ray (a.k.a. Iceberg)
Hi there, I have been using web2py several years ago and I'm picking it up again recently. (Actually, web2py never left me. It is like riding a bike, once you learn you never forget! And that's largely due to Massimo's committment to keep web2py backward-compatible.) OK let's cut to the

Re: [web2py] Re: A bug in _after_insert callback's document (book)? And more.

2015-04-23 Thread Ray (a.k.a. Iceberg)
On Wednesday, April 22, 2015 at 6:56:13 AM UTC-7, Anthony wrote: It is a different story when building a RESTful API. There would be no rendering behavior before form submission, and normally I use state-less HTTP basic auth and then purposely turn off session feature. Unless I force my

[web2py] Re: A bug in _after_insert callback's document (book)? And more.

2015-04-17 Thread Ray (a.k.a. Iceberg)
On Friday, April 17, 2015 at 6:35:09 AM UTC-7, Anthony wrote: 2. Even without above snippet, in our context I would say a rare 500-response-but-it-would-be-gone-if-you-simply-retry is (arguably?) still better than, silently creating duplicated user accounts which clearly violates the

[web2py] Re: A bug in _after_insert callback's document (book)? And more.

2015-04-16 Thread Ray (a.k.a. Iceberg)
On Thursday, April 16, 2015 at 7:01:22 AM UTC-7, Anthony wrote: A followup question. The reason I need my clumsy customized_email_verification() in the first place, is because I seemingly have to do db.commit() BEFORE the time consuming email sending job. Otherwise I saw some randomly

[web2py] Re: A bug in _after_insert callback's document (book)? And more.

2015-04-16 Thread Ray (a.k.a. Iceberg)
On Thursday, April 16, 2015 at 11:55:02 AM UTC-7, Anthony wrote: 1. To address your concern about an attempted duplicate entry will end up raising an exception and returning a 500 response unless you catch and handle the error., we could probably add something like this snippet at the

[web2py] A bug in _after_insert callback's document (book)? And more.

2015-04-15 Thread Ray (a.k.a. Iceberg)
Hi folks, The book describes DAL's _after_insert() callback http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#callbacks-on-record-insert--delete-and-update as: The caveat is that depending on the functionality, the callback has different signature. This is

[web2py] Re: A bug in _after_insert callback's document (book)? And more.

2015-04-15 Thread Ray (a.k.a. Iceberg)
On Wednesday, April 15, 2015 at 5:11:22 PM UTC-7, Anthony wrote: However, I believe (at least in web2py 2.9.12) the first parameter in _after_insert() is NOT a dict, but a Row object. Because, my web2py app uses the following code in db.py, trying to send out a validation email to new

[web2py] VARCHAR or NVARCHAR?

2015-04-14 Thread Ray (a.k.a. Iceberg)
Hi there, Long story short, I am now working in a project with web2py trying to connect to a MSSQL database. My team tends to use the connect string as mssql4://... to take the advantage of the (latest and greatest?) MSSQL4Adapter, however we also notice from the dal source code mssql.py

[web2py] Re: Shouldn't request.is_local be false when a web2py behind apache being accessed by remote client?

2014-08-19 Thread Ray (a.k.a. Iceberg)
On Monday, August 18, 2014 8:16:36 PM UTC-7, Ray (a.k.a. Iceberg) wrote: Hi web2py big family, I thought I had been using web2py for long enough but, still got stumbled by this little issue. :-) I setup web2py behind apache (using the default setup script on webfaction.com

Re: [web2py] Re: web2py app as proxy... but how?

2014-08-19 Thread Ray (a.k.a. Iceberg)
Streaming the output or not does not make much difference here, because your source code is designed to read ALL input first. That causes the response feeling slow. Not to mention this approach won't work at all when dealing with large content. A better way is to read a small amount of data

[web2py] Re: Shouldn't request.is_local be false when a web2py behind apache being accessed by remote client?

2014-08-19 Thread Ray (a.k.a. Iceberg)
Suggest to put this 2 lines into the scaffold app's model.py: # Uncomment following line if you deploy your web2py behind a proxy # request.is_local = False -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Shouldn't request.is_local be false when a web2py behind apache being accessed by remote client?

2014-08-18 Thread Ray (a.k.a. Iceberg)
Hi web2py big family, I thought I had been using web2py for long enough but, still got stumbled by this little issue. :-) I setup web2py behind apache (using the default setup script on webfaction.com, if that matters). My site works, except the request.is_local is always True. Here comes

[web2py] What is the purpose of auth.settings.login_userfield?

2014-04-06 Thread Ray (a.k.a. Iceberg)
I found many following lines in tools.py: userfield = self.settings.login_userfield or 'username' \ if 'username' in table_user.fields else 'email' Should it be this instead? userfield = self.settings.login_userfield or ('username' if 'username' in

[web2py] Re: What is the purpose of auth.settings.login_userfield?

2014-04-06 Thread Ray (a.k.a. Iceberg)
On Sunday, April 6, 2014 12:03:59 AM UTC-7, Ray (a.k.a. Iceberg) wrote: Just want to double confirm. 1. I found many following lines in tools.py: userfield = self.settings.login_userfield or 'username' \ if 'username' in table_user.fields else 'email' it means

[web2py] Re: Can not run web2py_no_console.exe. Version 2.8.2 on win 7 x 64

2014-01-17 Thread Ray (a.k.a. Iceberg)
On Sunday, December 15, 2013 10:00:19 AM UTC-7, Rob Paire wrote: Hello all, I am having same problem running on Windows server 2003 32bit. When I launch web2py.exe the following dialog error appears: *Title: Error Entry Point Not Found* *Description: The procedure entry point wcscpy_s

[web2py] Suggestion: Add IS_LOWER() to auth_user.email.requires list

2013-09-15 Thread Ray (a.k.a. Iceberg)
Hi there, I just add IS_LOWER() to the beginning of auth_user.email.requires list, this way all input email address even with UPPERCASE will be stored as lower case in db. I think this should be the default behavior, so I write this suggestion. Regards, Ray -- Resources: - http://web2py.com

[web2py] Re: Why change underline to hyphen in url patterns of parse_as_rest()?

2013-09-03 Thread Ray (a.k.a. Iceberg)
On Monday, July 1, 2013 10:47:16 PM UTC+8, Ray (a.k.a. Iceberg) wrote: On Monday, July 1, 2013 7:30:51 PM UTC+8, Ray (a.k.a. Iceberg) wrote: Hi folks, I just noticed that, the auto patterns generated by dal.py's parse_as_rest() are using hyphen to replace underline. This way if I have

[web2py] Re: IS web2py good for largescale

2013-08-04 Thread Ray (a.k.a. Iceberg)
Looks like using a memcache (which using finite memory) is the only way to go in this case? On Monday, August 5, 2013 6:42:09 AM UTC+8, Massimo Di Pierro wrote: If the query depends on user input than yes. select(cache=(...)) uses the SQL QUERY as key. If it is possible for the QUERY that

[web2py] POSTing application/json request to web2py

2013-08-01 Thread Ray (a.k.a. Iceberg)
To whom it may concern: I tried posting vars in json format, with content-type: application/json header, to my web2py application. When the above test is run on my laptop, i.e. requests are sent directly to web2py's rocket web server, recent web2py (the 2.5.1-stable) can successfully decode

[web2py] Re: Fail to recognize json payload in a content-type: application/json POST request

2013-08-01 Thread Ray (a.k.a. Iceberg)
UTC+2, Ray (a.k.a. Iceberg) wrote: To whom it may concern: I tried posting vars in json format, with content-type: application/json header, to my web2py application. When the above test is run on my laptop, i.e. requests are sent directly to web2py's rocket web server, recent web2py

Re: [web2py] Re: Fail to recognize json payload in a content-type: application/json POST request

2013-08-01 Thread Ray (a.k.a. Iceberg)
On Thursday, August 1, 2013 11:38:17 PM UTC+8, Jonathan Lundell wrote: On 1 Aug 2013, at 7:25 AM, Ray (a.k.a. Iceberg) ice...@qq.comjavascript: wrote: Thanks for trying to help Niphlod. More details so far. Strangely, that problem does NOT exist when I test with http://web2py.com

[web2py] Re: IOS, Json, Web2py.

2013-07-25 Thread Ray (a.k.a. Iceberg)
On Tuesday, June 11, 2013 5:14:42 AM UTC+8, Niphlod wrote: ps: recent web2py releases should parse application/json POSTs transparently, no need to request.body.read() anymore it goes all in request.vars and request.post_vars as usual. Sorry to chime in an old thread, but which

[web2py] Re: IOS, Json, Web2py.

2013-07-25 Thread Ray (a.k.a. Iceberg)
On Friday, July 26, 2013 12:45:58 AM UTC+8, Ray (a.k.a. Iceberg) wrote: On Tuesday, June 11, 2013 5:14:42 AM UTC+8, Niphlod wrote: ps: recent web2py releases should parse application/json POSTs transparently, no need to request.body.read() anymore it goes all in request.vars

[web2py] Why change underline to hyphen in url patterns of parse_as_rest()?

2013-07-01 Thread Ray (a.k.a. Iceberg)
Hi folks, I just noticed that, the auto patterns generated by dal.py's parse_as_rest() are using hyphen to replace underline. This way if I have: db.define_table(my_table, Field(my_field), ) it will show up in auto patterns as a url like http://.../my-table/my-field;.

[web2py] Re: Why change underline to hyphen in url patterns of parse_as_rest()?

2013-07-01 Thread Ray (a.k.a. Iceberg)
On Monday, July 1, 2013 7:30:51 PM UTC+8, Ray (a.k.a. Iceberg) wrote: Hi folks, I just noticed that, the auto patterns generated by dal.py's parse_as_rest() are using hyphen to replace underline. This way if I have: db.define_table(my_table, Field(my_field

[web2py] Bug report: username as space inside is incorrectly accepted

2013-06-29 Thread Ray (a.k.a. Iceberg)
Hi folks, First of all, I think white space is generally not acceptable as part of username. But right now web2py accepts username such as space inside. Actually, web2py defines the username validator like this: [IS_MATCH('[\w\.\-]+'), ...] so space is presumably not an intention. The

[web2py] Re: Bug report: username as space inside is incorrectly accepted

2013-06-29 Thread Ray (a.k.a. Iceberg)
Thanks for prompt response. Issue is created. http://code.google.com/p/web2py/issues/detail?id=1568 On Sunday, June 30, 2013 12:17:12 AM UTC+8, Massimo Di Pierro wrote: Please do and I will take care of this asap. On Saturday, 29 June 2013 10:07:57 UTC-5, Ray (a.k.a. Iceberg) wrote: Hi

[web2py] validate_and_insert() doesn't work for absent field

2013-06-27 Thread Ray (a.k.a. Iceberg)
Hi community, I'm working with web2py, again. :-) It took me hours today to realize validate_and_insert(field1=value1, field3=value3, ...) only works for the fields appears, but not for those absent. Is this a expected behavior or is it considered a bug? See example. # -*- coding: utf-8 -*-

Re: [web2py] validate_and_insert() doesn't work for absent field

2013-06-27 Thread Ray (a.k.a. Iceberg)
in forms and validate_and_insert() only simulates this behaviour. On Thu, Jun 27, 2013 at 7:30 AM, Ray (a.k.a. Iceberg) ice...@qq.comjavascript: wrote: Hi community, I'm working with web2py, again. :-) It took me hours today to realize validate_and_insert(field1=value1

Re: [web2py] validate_and_insert() doesn't work for absent field

2013-06-27 Thread Ray (a.k.a. Iceberg)
On Thursday, June 27, 2013 8:52:14 PM UTC+8, Anthony wrote: On Thursday, June 27, 2013 8:39:23 AM UTC-4, Ray (a.k.a. Iceberg) wrote: Thanks for trying to help. But sorry I don't understand how your theory can explain why the 2nd case in my example works and 3rd case didn't. The second

Re: [web2py] Restful authentication and CORS

2013-05-27 Thread Ray (a.k.a. Iceberg)
Hi Alec, On Tuesday, July 17, 2012 1:03:04 AM UTC+8, Alec Taylor wrote: On Tue, Jul 17, 2012 at 2:20 AM, David Marko dma...@tiscali.czjavascript: wrote: +1 from me having this. Btw. On client side i'm using AngularJS and Trigger.io (instead of PhoneGap) I've been looking around, and

Re: [web2py] proper way to mobile and desktop 'skins'

2012-11-10 Thread Ray (a.k.a. Iceberg)
Hi there, I just come across this old post. I solve this problem in a slightly different way. With all the same *.mobile views ready, I just explicitly use .mobile extension name as my visiting url, such as http://.../app/controller/action.mobile, therefore I don't need those if is_mobile

[web2py] Re: Suggestion about using jqmobile in web2py

2012-05-16 Thread Ray (a.k.a. Iceberg)
Further discussion is moved to http://groups.google.com/group/web2py-developers/browse_frm/thread/ab1f23e39dcd3c9d Thanks for attention. Regards, Ray On Tuesday, May 15, 2012 10:15:10 PM UTC+8, Anthony wrote: Meanwhile, shall we keep the discussion about how to utilize that

[web2py] Suggestion about using jqmobile in web2py

2012-05-14 Thread Ray (a.k.a. Iceberg)
Hi there, 1. I am working at my first mobile website recently. At first I spent (quite) some time to know and download the hard-to-find web2py.plugin.jqmobile.w2p, then I realize the main resource I need is just its views/plugin_jqmobile/layout.html, so it comes to an idea. Why not just pack

[web2py] Re: Suggestion about using jqmobile in web2py

2012-05-14 Thread Ray (a.k.a. Iceberg)
On Monday, May 14, 2012 8:56:41 PM UTC+8, Anthony wrote: On Monday, May 14, 2012 8:41:59 AM UTC-4, Massimo Di Pierro wrote: I would like to see the implementation. I am pretty sure this will break the bytecode compilation of apps. {{extend response.layout or layout.html}} Yes -- to

[web2py] Can/should {{super}} works even without a parent block?

2012-05-14 Thread Ray (a.k.a. Iceberg)
Hi, There is a {{super}} syntax to bring the parent block. Fine. (See its doc here. http://web2py.com/books/default/chapter/29/5#Blocks-in-views ) But if using {{block undefined_block}}{{super}}{{end}} will generate error ticket. This brings trouble if I am switching different layouts for some

[web2py] Re: Can/should {{super}} works even without a parent block?

2012-05-14 Thread Ray (a.k.a. Iceberg)
Guess you mean {{try:}}{{super}}{{except: pass}} Unfortunately it fails too. So a fix is a must? Regards, Ray On Monday, May 14, 2012 11:50:45 PM UTC+8, Ross Peoples wrote: Correction, that should be: {{try:}}{{super}}{{catch:pass}} On Monday, May 14, 2012 11:45:37 AM UTC-4, Ross

[web2py] Re: Can/should {{super}} works even without a parent block?

2012-05-14 Thread Ray (a.k.a. Iceberg)
, 2012 11:56:45 AM UTC-4, Ray (a.k.a. Iceberg) wrote: Guess you mean {{try:}}{{super}}{{except: pass}} Unfortunately it fails too. So a fix is a must? Regards, Ray

[web2py] Re: Suggestion about using jqmobile in web2py

2012-05-14 Thread Ray (a.k.a. Iceberg)
admin also based on jquery mobile) then you will be able to do: {{extend '../../admin/views/jqm_layout.html'}} On Monday, 14 May 2012 04:30:23 UTC-5, Ray (a.k.a. Iceberg) wrote: Hi there, 1. I am working at my first mobile website recently. At first I spent (quite) some time to know

[web2py] Re: Slow queries or how to determine if cache is working?

2012-02-25 Thread Ray (a.k.a. Iceberg)
You only apply cache to your last query. You might need to cache the other two queries to gain full cache boost. Besides, you can add some profiling checkpoint inside your code to know which part is time consuming. Regards, Ray On Feb 25, 3:53 pm, pbreit pbreitenb...@gmail.com wrote: I'm

[web2py] Re: Minor optimize: skip superfish when possible

2011-12-28 Thread Ray (a.k.a. Iceberg)
; /* #BDD2FF; */}/style Regards, Ray On Dec 27, 1:29 am, Ray (a.k.a. Iceberg) iceb...@21cn.com wrote: My fault. There should be one more modification. diff -r 04673c0ce6ab views/layout.html --- a/views/layout.html Tue Dec 27 01:29:01 2011 +0800 +++ b/views/layout.html Tue Dec 27 01:29:17 2011 +0800

[web2py] Minor optimize: skip superfish when possible

2011-12-26 Thread Ray (a.k.a. Iceberg)
Hey folks, I just use this little trick in my app, to reduce two unnecessary http requests when menus are not needed. I think the optimization is reasonable. And people can always manually re-enable superfish by response.files.extend([...]). So, my proposal is to put this into the default

[web2py] Re: Minor optimize: skip superfish when possible

2011-12-26 Thread Ray (a.k.a. Iceberg)
, Massimo Di Pierro massimo.dipie...@gmail.com wrote: good idea. In trunk! On Dec 26, 9:32 am, Ray (a.k.a. Iceberg) iceb...@21cn.com wrote: Hey folks, I just use this little trick in my app, to reduce two unnecessary http requests when menus are not needed. I think the optimization

[web2py] Re: One suggestion to formstyle=lambda

2011-12-25 Thread Ray (a.k.a. Iceberg)
it into. Massimo On Dec 24, 3:39 am, Ray (a.k.a. Iceberg) iceb...@21cn.com wrote: Hi Massimo, I just discovered the lovely formstyle=lambda ... feature. (http:// web2py.com/books/default/chapter/29/7?search=formstyle) It saves me from the headache of css. However, it is strange

[web2py] Re: One suggestion to formstyle=lambda

2011-12-25 Thread Ray (a.k.a. Iceberg)
It works! On Dec 26, 4:03 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: In trunk. Please check it. On Dec 25, 1:16 pm, Ray (a.k.a. Iceberg) iceb...@21cn.com wrote: Here you are. And merry Chrismas! diff -r 80b2c74561c0 gluon/sqlhtml.py--- a/gluon/sqlhtml.py     Mon Sep 26

[web2py] One suggestion to formstyle=lambda

2011-12-24 Thread Ray (a.k.a. Iceberg)
Hi Massimo, I just discovered the lovely formstyle=lambda ... feature. (http:// web2py.com/books/default/chapter/29/7?search=formstyle) It saves me from the headache of css. However, it is strange that the value of field_widget parameter is a TD instance. Should it better be a raw widget

[web2py] Re: Is there any mainstream wysiwyg html editor in web2py world?

2011-12-21 Thread Ray (a.k.a. Iceberg)
/web2py_ckeditor/srchttp://dev.s-cubism.com/plugin_elrte_widgethttp://dev.s-cubism.com/plugin_managed_html/page1/_managed_html_preview Anthony On Monday, December 19, 2011 1:23:16 PM UTC-5, Ray (a.k.a. Iceberg) wrote: Hi folks, I used web2py for years but never have a need to use wysiwyg

[web2py] Re: Is there any mainstream wysiwyg html editor in web2py world?

2011-12-21 Thread Ray (a.k.a. Iceberg)
The idea of uploading image to external and free server is clever! I love this idea! However your demo link does not work for uploading image. By the way, your upload feature is based on swf? So your site won't support ipad/iphone user? And what do you mean works fine ... except ie? Do you mean

[web2py] Re: Is there any mainstream wysiwyg html editor in web2py world?

2011-12-21 Thread Ray (a.k.a. Iceberg)
Hi LightDot, Thanks for the remind. Actually WYMeditor was on my radar. I love its clean output code philosophy. However its default look-and-feel could surprise my end users, I am afraid. For example, those heading 1/2/3/.../6 containers look scary red when editing, although they look normal

[web2py] Re: Is there any mainstream wysiwyg html editor in web2py world?

2011-12-21 Thread Ray (a.k.a. Iceberg)
, I did love its WYSIWYM philosophy and really wanted to give it a shot. Perhaps I can save it for being my personal blog posting tool. Regards, Ray On Dec 22, 2:53 am, Ray (a.k.a. Iceberg) iceb...@21cn.com wrote: Hi LightDot, Thanks for the remind. Actually WYMeditor was on my radar. I love its

[web2py] Is there any mainstream wysiwyg html editor in web2py world?

2011-12-19 Thread Ray (a.k.a. Iceberg)
Hi folks, I used web2py for years but never have a need to use wysiwyg html editor in my projects. Until recently. Then I surprisingly find no mainstream editor mentioned in web2py world. Of course I can go with any editor I will run into, but before that I just want to hear some suggestion from

[web2py] Re: [ login | register | lost password? ]

2011-11-15 Thread Ray (a.k.a. Iceberg)
Hi Anthony, So you are quite familiar with the web2py internal, this time the navbar. Are you the programmer of that function? Would you comment on this issue? http://code.google.com/p/web2py/issues/detail?id=517 Regards, Ray On Nov 16, 3:47 am, Anthony abasta...@gmail.com wrote: In trunk,

[web2py] Improvement for Crud.update()

2011-11-13 Thread Ray (a.k.a. Iceberg)
Hi Massimo, Following code snippet comes from gluon/tools.py 's line 3029~3030. elif not request.extension in ('html','load'): raise HTTP(401) I suggest to change it into: elif not request.extension in ('html','load'): raise HTTP(401, str(form.errors()))

[web2py] Re: How about auth.define_tables(..., format='...')? [SOLVED]

2011-11-02 Thread Ray (a.k.a. Iceberg)
On Nov 1, 7:54 pm, Anthony abasta...@gmail.com wrote: On Tuesday, November 1, 2011 6:20:57 AM UTC-4, Massimo Di Pierro wrote: I am not sure I understand the proposal. You can override the format: db.mytable._format = '%(name)s' db.mytable._format = lambda record: SPAN(record.first_name)

[web2py] A typo in online book for update_or_insert()

2011-11-01 Thread Ray (a.k.a. Iceberg)
Hi Massimo, A typo in online book for update_or_insert() is spotted. http://web2py.com/book/default/chapter/06#update_or_insert The example quoted from current book: db.person.update_or_insert(dict(name='John'), name='John',birthplace='Chicago') should be:

[web2py] Re: How about auth.define_tables(..., format='...')?

2011-10-31 Thread Ray (a.k.a. Iceberg)
for the user table), and maybe settings.table_group_format as well. Anthony On Sunday, October 30, 2011 10:48:25 AM UTC-4, Ray (a.k.a. Iceberg) wrote: Nice comment Anthony. So I would like to mend my previous suggestion as: 1. the auth.define_tables(...) interface remains state quo 2

[web2py] How about auth.define_tables(..., format='...')?

2011-10-30 Thread Ray (a.k.a. Iceberg)
Hi Massimo, How about add a new parameter to auth.define_tables()? As below. def define_tables(..., format=''%(first_name)s %(last_name)s (% (id)s)): ... db.define_table(..., format=format) ... The idea is to let user has a change to customize it. Currently we can override this

[web2py] Re: WebFactions Applications

2011-10-30 Thread Ray (a.k.a. Iceberg)
On Oct 30, 7:23 pm, Web2Py Freak halna...@gardeniatelco.com wrote: Dear All ,  I am using WebFaction for hosting , i install the web2py app in a custom script , now do i have to install an app for every website or use just one app , and if using one app how can i point the domain to it ??

[web2py] Re: How about auth.define_tables(..., format='...')?

2011-10-30 Thread Ray (a.k.a. Iceberg)
= self.settings.table_user_name_format) Regards, Ray On Oct 30, 10:12 pm, Anthony abasta...@gmail.com wrote: I think you'd need different format arguments for auth_user and auth_group, as they both have formats specified. Anthony On Sunday, October 30, 2011 9:48:04 AM UTC-4, Ray (a.k.a. Iceberg) wrote: Hi Massimo

[web2py] Re: WebFactions Applications

2011-10-30 Thread Ray (a.k.a. Iceberg)
On Oct 30, 10:31 pm, Web2Py Freak halna...@gardeniatelco.com wrote: My app name is 'Web2py'  and in it i have two 'web2py app': 1- welcome 2-maestro now i have a domain and in the site app i selected web2py and there is nothing in the path so it takes the welcome app and now i have some

[web2py] Re: Persistent variables in web2py

2011-10-30 Thread Ray (a.k.a. Iceberg)
Hi Massimo, In the first post of this thread, Arturo said, Is there a way in web2py to have varibles be persistent. For example when I instantiate a class I don't want to re-instantiate it every time a page is loaded. I guess what he concerns is performance. In other word, web2py re-

[web2py] Re: WebFactions Applications

2011-10-30 Thread Ray (a.k.a. Iceberg)
On Oct 31, 3:27 am, Vasile Ermicioi elff...@gmail.com wrote: a few steps that I use, I assume that you already installed web2py :) 0) set your domain at your registrar to point to webfaction dns servers 1) add your domain to webfaction domains 2) set your domain to be handled by your app (see

[web2py] Re: Does auth.requires() always requires login?

2011-10-18 Thread Ray (a.k.a. Iceberg)
*not* be logged in. Massimo On Oct 17, 1:19 am, Ray (a.k.a. Iceberg) iceb...@21cn.com wrote: Thanks for the workaround, I might take that. But I will still argue that: 1. Does authentication have to mean logged-in, or can it be something else, such as accessing from localhost

[web2py] Re: Does auth.requires() always requires login?

2011-10-17 Thread Ray (a.k.a. Iceberg)
Thanks for the workaround, I might take that. But I will still argue that: 1. Does authentication have to mean logged-in, or can it be something else, such as accessing from localhost, accessing via ajax, etc.? 2. if @auth already means authentication, why there is still an auth.requires_login()

[web2py] Does auth.requires() always requires login?

2011-10-16 Thread Ray (a.k.a. Iceberg)
} The snippet does not work in web2py 1.99.3. Looks like web2py 1.99.x enforces user login in auth.requires(...). Should it be? Any feedback is welcome. Regards, Ray (a.k.a. Iceberg)

[web2py] Re: Does auth.requires() always requires login?

2011-10-16 Thread Ray (a.k.a. Iceberg)
with this: auth.settings.on_failed_authorization = lambda or function auth.settings.on_failed_authentication = lambda or function On Mon, Oct 17, 2011 at 2:23 AM, Ray (a.k.a. Iceberg) iceb...@21cn.comwrote: Hi there, Following code works in web2py 1.98.2. That is, to allow registered users, as well as the system

[web2py] Re: what about web2py 2.0?

2011-09-21 Thread Ray (a.k.a. Iceberg)
upgrade later, which is a very little acceptable cost. Regards, Ray (a.k.a. Iceberg) [1] http://semver.org/ On Sep 22, 1:25 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: True. In fact 1.99 will resolve this problem but some people may jump from 1.98 to 1.100 (pardon, 2.00) without

[web2py] Re: file locations once web2py is deployed on fluxflex

2011-09-15 Thread Ray (a.k.a. Iceberg)
Hi Ian, You mentioned After using the online web2py ide to do some development, I cloned my fluxflex git repository only to find that it's empty. If you developed your web2py app via your fluxflex's web2py's admin interface, I am afraid all your app source code only exists as on site data but

[web2py] Re: Using a lambda to set a default

2011-09-07 Thread Ray (a.k.a. Iceberg)
On Sep 7, 3:00 am, Lennon lpru...@hotmail.com wrote: I'm try to use a lambda to set a default value based on a value in another table.  Here is my model: db.define_table('trip_instance', timestamp, sos_table,     Field('trip_type_id',  db.trip_type, label='Trip Type',

[web2py] Re: what is web2py doing internally with unicode?

2011-09-04 Thread Ray (a.k.a. Iceberg)
Generally speaking, you can't assume a file's encoding, unless you are the creator of that file therefore knows its encoding. Regards, Ray On Sep 5, 7:52 am, weheh richard_gor...@verizon.net wrote: I have a text string which is read from a file. The file was created by the db...store

[web2py] Re: fluxflex - how to?

2011-08-27 Thread Ray (a.k.a. Iceberg)
On Aug 27, 10:03 am, MidGe degreef.mic...@gmail.com wrote: I am trying to use fluxflex but I must be missing something fundamental as I do not understand what is happening when I follow the instructions. First of all, it all seems to be working fine. I can see the site and I can log in admin

[web2py] Re: Understanding Rocket Threads

2011-08-26 Thread Ray (a.k.a. Iceberg)
Thank you Anthony, I knew session.forget() but did not know it would be so helpful for performance. I'll try that in my projects from now on. Regards, Ray On Aug 26, 2:42 am, Anthony abasta...@gmail.com wrote: If you don't explicitly forget the session, the session file will lock on each

[web2py] Re: fluxflex

2011-08-25 Thread Ray (a.k.a. Iceberg)
 am, Yota Ichino www.i...@gmail.com wrote: I merged get_new_stable branch into master branch. 2011/8/24 Yota Ichino www.i...@gmail.com: Iceberg, Massimo Di Pierro, Your idea is great. These influence me and I rewrite .flx file. It is created on same github project with branch

[web2py] Re: Re : Re: fluxflex

2011-08-25 Thread Ray (a.k.a. Iceberg)
On Aug 24, 10:25 pm, Ray (a.k.a. Iceberg) iceb...@21cn.com wrote: Another big issue. How to upgrade to the latest web2py (when available)? Every time I do a git import in fluxflex panel, with or WITHOUT checking Run initialize scripts for setting up the project, ends up with my whole

[web2py] Re: Upload Install packed application on FluxFlex - Error500

2011-08-25 Thread Ray (a.k.a. Iceberg)
Hi Tito, there is an ongoing discussion here. http://groups.google.com/group/web2py/msg/aa293a99cda711e9 Regards, Ray On Aug 25, 10:21 pm, Tito Garrido titogarr...@gmail.com wrote: Is there a way to update web2py on fluxflex? On Thu, Aug 25, 2011 at 10:52 AM, Yota Ichino www.i...@gmail.com

[web2py] Re: Understanding Rocket Threads

2011-08-25 Thread Ray (a.k.a. Iceberg)
Hi G, I saw similar behaviors in some of my lightweight app, which also uses sqlite and rocket. I need not solve that problem at that time (it was really a little app for a small group). But I can provide some information to you this time. When you try to isolate the sqlite, using no auth and

[web2py] Re: fluxflex

2011-08-25 Thread Ray (a.k.a. Iceberg)
, Iceberg. Uh..., there is a issue. I don't know how to delete history in git. Could you tell me it? 2011/8/25 Ray (a.k.a. Iceberg) iceb...@21cn.com: That's a good merge. By the way, is it possible to completely remove the old master branch stuff? (This is actually a question for git

[web2py] Re: fluxflex

2011-08-24 Thread Ray (a.k.a. Iceberg)
. Not a good service standard I expected. (Shrug.) [1] http://jp.doc.fluxflex.com/settoappumodotodepuroimodo [2] http://getsatisfaction.com/fluxflex Regards, Ray On Aug 24, 3:10 am, Yota Ichino www.i...@gmail.com wrote: Iceberg, Massimo Di Pierro, Your idea is great. These influence me and I

[web2py] Re: Calender / datetime picker - localization

2011-08-23 Thread Ray (a.k.a. Iceberg)
...@gmail.com wrote: Hi Ray, yes, I have read it. My problem is to change the language on the fly, depending on the language the visitor excepts. Regards, Martin 2011/8/22 Iceberg iceb...@21cn.com Hi Martin, About the translation, have you checked out its official package? http

[web2py] Re: fluxflex

2011-08-22 Thread Iceberg
Omi Chiba, Thanks VERY MUCH for your effort on building the web2py installation package (a.k.a. library on fluxflex). Deploying web2py on a hosting server has never been so easy! (I start crying for the hours I spent in setting up my first web2py instance on my previous hosting provider.) One

[web2py] Re: jqgrid-module import problem

2011-08-21 Thread Iceberg
Hi Johann, It is not about local_import() vs the new from jqgrid import JqGrid syntax. It is because you install your jqgrid app with a name other than jqgrid. And this bug is fixed in latest trunk of jqgrid app already. Regards, Ray On Aug 17, 7:28 pm, Bruno Rocha rochacbr...@gmail.com wrote:

[web2py] Re: Calender / datetime picker - localization

2011-08-21 Thread Iceberg
Hi Martin, About the translation, have you checked out its official package? http://www.dynarch.com/projects/calendar/old/ It contains lots of different language files. Just include one of them, and you are good to go. It works for me, for years! Regards, Ray (a.k.a. Iceberg) On Aug 17, 10:24

[web2py] Re: Building web2py binary for windows with extra libs

2011-08-05 Thread Iceberg
-to-Distribute-your-Applications-as-Binaries said: make sure it states that it (your app) is being distributed with an unmodified copy of web2py from web2py.com Regards, Ray (a.k.a. Iceberg) On Aug 5, 3:34 pm, Praneeth Bodduluri life...@gmail.com wrote: Hello Syed, It is possible for you to rebuild

[web2py] Re: Login form's remember for 30 days not working

2011-08-02 Thread Iceberg
? On Aug 1, 5:26 am, Iceberg iceb...@21cn.com wrote: Hi Massimo, This problem exists for quite some time, today I trace it to these old source. [1] The diagnosis.http://groups.google.com/group/web2py/browse_thread/thread/bb9f92e255... [2] The fix.http://groups.google.com/group

[web2py] Login form's remember for 30 days not working

2011-08-01 Thread Iceberg
take the above fix? Thanks. Regards, Ray (a.k.a. Iceberg)

[web2py] Re: How to add a IS_NOT_EMPTY constrait to list:reference field?

2011-07-27 Thread Iceberg
Hi Massimo, will this issue be addressed in coming web2py 1.98.1? Thanks in advance. Ray On Jul 24, 10:29 pm, Iceberg iceb...@21cn.com wrote: I prefer to use crud, but it is not qualified for your workaround I think. On the other hand, you said that there is a custom widget which interfere

[web2py] Re: please check out the nightly built

2011-07-26 Thread Iceberg
I gave it a shot. The generic_patterns=[...] and LOAD(..., ajax=False) issue is finally fixed. Good job! By the way, will a fix for IS_NOT_EMPTY and list:reference issue be included in 1.98.1? Regards, Ray (a.k.a. Iceberg) On Jul 26, 6:42 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote

[web2py] Re: How to add a IS_NOT_EMPTY constrait to list:reference field?

2011-07-24 Thread Iceberg
any comma-separated-employee-name UI. In fact the default widget for list:reference is already great. What I need is just make sure any appointment will have at least one participant. Can we somehow hook a IS_NOT_EMPTY() into list:reference 's default widget? Thanks! Regards, Ray (a.k.a. Iceberg

[web2py] Re: How to add a IS_NOT_EMPTY constrait to list:reference field?

2011-07-24 Thread Iceberg
(...) The problem is that the custom widget interfere with validators and validators may have to be attached to the widget. On Jul 24, 8:22 am, Iceberg iceb...@21cn.com wrote: Hi Massimo, Thanks for trying to help. Perhaps I did not clearly explain the point. I hope to add

[web2py] How to add a IS_NOT_EMPTY constrait to list:reference field?

2011-07-23 Thread Iceberg
: requires = [IS_NOT_EMPTY(), IS_IN_DB(...)] still tickets. Problem persists in both web2py 1.95.1 and 1.97.1, on Windows. Did I miss something really obvious? Thanks in advance. Regards, Ray (a.k.a. Iceberg)

[web2py] Re: How to add a IS_NOT_EMPTY constrait to list:reference field?

2011-07-23 Thread Iceberg
Thanks but, it doesn't work either. Still tickets. Do you have another suggestion? On Jul 23, 3:54 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Try IS_LIST_OF(IS_IN_DB(.)) On Jul 23, 2:52 am, Iceberg iceb...@21cn.com wrote: Hi Massimo, How to add a IS_NOT_EMPTY

[web2py] Re: How to add a IS_NOT_EMPTY constrait to list:reference field?

2011-07-23 Thread Iceberg
the corresponding ids in the product.tags field. Is this correct? massimo On Jul 23, 2:52 am, Iceberg iceb...@21cn.com wrote: Hi Massimo, How to add a IS_NOT_EMPTY constrait to list:reference field? This seems a simple task but I ends up opening a can of worms. :-/  Here is what I did

[web2py] Re: Two problems with LOAD; one may be a bug(?)

2011-07-20 Thread Iceberg
, considering web2py has a tradition of fixing bug within 24 hours. Is there anything special about this one? Thanks in advance. Regards, Ray (a.k.a. Iceberg)

[web2py] Re: Demystifying some web2py magic

2011-07-09 Thread Iceberg
Good to know that. One thing though. If track_changes() is that good, how about we always put it in every app's db.py? Any pros and cons? Thanks in advance. Regards, Iceberg On Jul 9, 3:20 am, Anthony abasta...@gmail.com wrote: local_import should work, but you should now use regular import

[web2py] Re: Want to stop getting responses from web2py

2011-06-22 Thread Iceberg
called comet. Regards, Iceberg On Jun 22, 10:36 pm, sheM sheetal@gmail.com wrote: Hi,  We have an application developed using web2py.   There is a requirement where we should be stopping the application respond to the requests. Eg: when delay_time_for_responding == 'infinite' there should

  1   2   3   4   5   6   7   >