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

2019-07-23 Thread Ray (a.k.a. Iceberg)
July 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 woul

[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 abso

[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'), Field('catego

[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 one-li

[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 chase.

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

[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 vio

[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

[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 som

[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 >>

[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 as: The caveat is that depending on the functionality, the callback has > different signature. > This is

[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 tha

[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) - https://code.g

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 and

[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

[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 some

[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'

[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 table_u

[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 w

[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

[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 tha

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)" > > > wrote: > > Thanks for trying to help Niphlod. More details so far. > > Strangely, that problem does NOT exist when I te

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

2013-08-01 Thread Ray (a.k.a. Iceberg)
g somewhere within the > parse_get_post_vars function what happens ? > > On Thursday, August 1, 2013 8:53:09 AM 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 >>

[web2py] POSTing application/json request to web2py

2013-07-31 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 th

[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.rea

[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: 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_ta

[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: 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. Ic

[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

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 3

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

2013-06-27 Thread Ray (a.k.a. Iceberg)
> to be executed in forms and validate_and_insert() only simulates this > behaviour. > > On Thu, Jun 27, 2013 at 7:30 AM, Ray (a.k.a. Iceberg) > > > wrote: > > Hi community, > > > > I'm working with web2py, again. :-) > > > > It took

[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 -*- d

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 > > 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 will have one of the fo

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 >> layout_jq

[web2py] Re: Suggestion about using jqmobile in web2py

2012-05-14 Thread Ray (a.k.a. Iceberg)
we can use it in admin (instead of the current mobile > 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, >&g

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

2012-05-14 Thread Ray (a.k.a. Iceberg)
gt; Anthony > > On Monday, May 14, 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: 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] 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: 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"}} > >

[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 t

[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 wrote: > I'm struggling to figure out if

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

2011-12-28 Thread Ray (a.k.a. Iceberg)
; */} Regards, Ray On Dec 27, 1:29 am, "Ray (a.k.a. Iceberg)" 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

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

2011-12-26 Thread Ray (a.k.a. Iceberg)
#x27;)}} + + jQuery(document).ready(function(){ + jQuery('ul.sf-menu').superfish();}); + + {{pass}} {{end}} On Dec 27, 12:31 am, Massimo Di Pierro wrote: > good idea. In trunk! > > On De

[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 welcome

[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 wrote: > In trunk. Please check it. > > On Dec 25, 1:16 pm, "Ray (a.k.a. Iceberg)" wrote: > > > > > > > > > Here you are. And merry Chrismas! > > > diff -r 80b2c74561c0 gluon/sqlhtml.py--- a/

[web2py] Re: One suggestion to formstyle=lambda

2011-12-25 Thread Ray (a.k.a. Iceberg)
t into. > > Massimo > > On Dec 24, 3:39 am, "Ray (a.k.a. Iceberg)" wrote: > > > > Hi Massimo, > > > I just discovered the lovely formstyle=lambda ... feature. (http:// > > web2py.com/books/default/chapter/29/7?search=formstyle) > > >

[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 instan

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

2011-12-21 Thread Ray (a.k.a. Iceberg)
nt. What a pity, 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)" wrote: > Hi LightDot, > > Thanks for the remind. Actually WYMeditor w

[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" ag

[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 mea

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

2011-12-21 Thread Ray (a.k.a. Iceberg)
ps://bitbucket.org/PhreeStyle/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: &g

[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 wrote: > In trunk, auth.navbar now takes

[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 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) > > FYI, the

[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: db.person.update_or_

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

2011-10-31 Thread Ray (a.k.a. Iceberg)
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.d

[web2py] Re: WebFactions Applications

2011-10-30 Thread Ray (a.k.a. Iceberg)
On Oct 31, 3:27 am, Vasile Ermicioi 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 webfaction's

[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- instanti

[web2py] Re: WebFactions Applications

2011-10-30 Thread Ray (a.k.a. Iceberg)
On Oct 30, 10:31 pm, Web2Py Freak 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 other domain and i

[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 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)

[web2py] Re: WebFactions Applications

2011-10-30 Thread Ray (a.k.a. Iceberg)
On Oct 30, 7:23 pm, Web2Py Freak 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 ?? > > Best Regards , > Ha

[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 v

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

2011-10-18 Thread Ray (a.k.a. Iceberg)
aps to require_login=False? It's a little less > > ambiguous, since login=False could be read to require that the user *not* > > be logged in. > > > > Massimo > > > > On Oct 17, 1:19 am, "Ray (a.k.a. Iceberg)" wrote: > > >> Thanks for

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

2011-10-16 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_logi

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

2011-10-16 Thread Ray (a.k.a. Iceberg)
ation = 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) wrote: > > > > > > > > > > > Hi there, > > > Following code works in web2py 1.98.2. That is, to all

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

2011-10-16 Thread Ray (a.k.a. Iceberg)
t;": "some cool stuff"} 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: what about web2py 2.0?

2011-09-21 Thread Ray (a.k.a. Iceberg)
ig disaster anyway. They can have a manual 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 wrote: > True. In fact 1.99 will resolve this problem but some people may jump > from 1.98 to 1.100 (p

[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 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', > widget=trip_select_widget, requires =

[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 wrote: > I have a text string which is read from a file. The file was created > by the db...store mechanism. The original data came

[web2py] Re: fluxflex - how to?

2011-08-27 Thread Ray (a.k.a. Iceberg)
On Aug 27, 10:03 am, MidGe 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 etc... > > When I

[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 wrote: > If you don't explicitly "forget" the session, the session file will lock on > each request, so subsequen

[web2py] Re: fluxflex

2011-08-25 Thread Ray (a.k.a. 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) : > > > That's a good merge. > > > By the way, is it possible to completely remove the old master branch > > stuff?

[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 ra

[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 wrote: > Is there a way to update web2py on fluxflex? > > > On Thu, Aug 25, 2011 at 10:52 AM, Yota Ichino wrote: > > The Error is caused POST s

[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)" 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&q

[web2py] Re: fluxflex

2011-08-25 Thread Ray (a.k.a. Iceberg)
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.) Current repo still contains many web2py files in its history. This makes it a little bit unnecessary slow when cloning the repo. Regards, Ray On Aug 25, 2:36 a

[web2py] Re: fluxflex

2011-08-24 Thread Ray (a.k.a. Iceberg)
Yota Ichino, Thanks for your prompt response! It looks working well. 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

[web2py] Re: Calender / datetime picker - localization

2011-08-23 Thread Ray (a.k.a. Iceberg)
bout 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, > &g