Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-24 Thread Dominic Mayers
You will not agree with my comments below. Apparently, we cannot even agree on what happened in the discussion. However, my concepts became clearer, at the least for me, in this discussion and you pointed out ways to do things that can be useful. So, I am thankful for all the time that you spe

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-24 Thread Dominic Mayers
This discussion is challenging and it shows that you are right that use cases are useful, if only to help frame a discussion. I think that your use case is not to pass the configuration information, but the need for a wrapper (for pre-processing and post-processing) and it does not have the ext

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
You should write a self-contained document to explain your concept of wrapper application. In this post, you try to explain the concept of application wrapper (at the application level) in opposition to the concept of a wrapper at the framework level. You say that I do not understand this conce

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
You should write a self-contained document to explain your concept of wrapper application. In this post, you try to explain the concept of application wrapper (at the application level) in opposition to the concept of a wrapper at the framework level. You say that I do not understand this conce

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
You should write a self-contained document to explain your concept of wrapper application. In this post, you try to explain the concept of application wrapper (at the application level) in opposition to the concept of a wrapper at the framework level. You say that I do not understand this conce

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
On Thursday, 23 June 2016 15:41:35 UTC-4, Anthony wrote: > > On Thursday, June 23, 2016 at 1:26:38 PM UTC-4, Dominic Mayers wrote: >> >> It is also important that the installer does not have to use the >> application folder. >> > > Unless you can identify c

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
It is also important that the installer does not have to use the application folder. On Thursday, 23 June 2016 10:23:45 UTC-4, Anthony wrote: The installer creates the /applications/myapp folder and puts a single > __wrapper.py file inside the /models folder ... > The simple fact that the

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
On Thursday, 23 June 2016 09:56:19 UTC-4, Anthony wrote: > > > No, the "wrapper" would be a callable object, and it can be defined >>> anywhere. wsgihandler.py is just the entry point -- you could import the >>> wrapper in wsgihandler.py and then expose it to the web server (as in the >>> buil

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
On Thursday, 23 June 2016 00:14:36 UTC-4, Anthony wrote: > > > Regarding the comment that the flexibility to have a separate wrapper is >> not important, >> > > Unimportant for the wrapper code to be outside the application folder > because there is a simple approach that should work fine. The

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
On Wednesday, 22 June 2016 23:58:47 UTC-4, Anthony wrote: > > > The current idea of Anthony is to directly use wsgihandler as the wrapper >> > > No, the "wrapper" would be a callable object, and it can be defined > anywhere. wsgihandler.py is just the entry point -- you could import the > wrapp

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-22 Thread Dominic Mayers
Is the wrapper code inside the wrapped application here? On Thursday, 23 June 2016 00:14:36 UTC-4, Anthony wrote: > > The installer creates the /applications/myapp folder and puts a single > __wrapper.py file inside the /models folder. The content of this wrapper > file would be sufficient to

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-22 Thread Dominic Mayers
I have the impression that you are saying the same thing as me, but with an emphasis on the "unimportant". I already mentioned that it can be seen as unimportant in a scenario where we design web2py. I prefer though to mention that it is useful to consider the use case where we do not really d

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-22 Thread Dominic Mayers
I am restating the use case and the concept of wrapper application. On Wednesday, 22 June 2016 09:00:12 UTC-4, Anthony wrote: > >1. I don't think this approach completely satisfies Dominic's >requirements, as he wants the wrapper to be external to the application >folder of the wra

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-22 Thread Dominic Mayers
Can you expand on your proposal? It's not a big deal if, in the process of being wrapped, the application becomes a plug-in. Indeed, some thing along the line of Yii2 modules would be fine, as long as the entire application, except the part that parses the request, but at the least every thing

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-21 Thread Dominic Mayers
On Tuesday, 21 June 2016 00:20:07 UTC-4, Anthony wrote: > > However, for a programmer, the application is what is created when we >> create a new folder in the applications folder. A wrapper application has >> to be an application separated, in terms of its declaration, from the >> wrapped app

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-21 Thread Dominic Mayers
Perhaps, you already provided the answer: wsgihandler.py is *where* you would call the entry point to your wrapper application (and by the way, it doesn't have to be there -- you could put it anywhere, as long as you tell your web server where it is), but the wrapper application code itself can

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-21 Thread Dominic Mayers
On Tuesday, 21 June 2016 00:20:07 UTC-4, Anthony wrote: > > I'm not saying web2py can easily handle all possible cases, and its > execution model probably does introduce some limitations, but it would be > easier to explore the limitations and possible workarounds with some > concrete example

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-21 Thread Dominic Mayers
On Tuesday, 21 June 2016 01:27:05 UTC-4, Anthony wrote: > > You make claims about how a "wrapper application" *must* look without >>> demonstrating *why* it must look like that. >>> >> >> Yes and they are not based on any use case. They are based on what seems >> natural. Some times, we have de

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-20 Thread Dominic Mayers
On Tuesday, 21 June 2016 00:20:07 UTC-4, Anthony wrote: > > However, for a programmer, the application is what is created when we >> create a new folder in the applications folder. A wrapper application has >> to be an application separated, in terms of its declaration, from the >> wrapped app

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-20 Thread Dominic Mayers
On Monday, 20 June 2016 23:21:45 UTC-4, Anthony wrote: > > > On Monday, 20 June 2016 18:59:58 UTC-4, Anthony wrote: >>> >>> I think the concept is easy to generalize to an application, to a script, etc. >>> >>> The *concept* is easy to generalize, but the *implementation* m

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-20 Thread Dominic Mayers
, it may be that even this answer here is misinterpreted, as if I see a problem. There is no problem. Every thing is fine. On Monday, 20 June 2016 22:40:37 UTC-4, Anthony wrote: > > Dominic, it seems you are responding to a discussion that is happening > elsewhere rather than this d

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-20 Thread Dominic Mayers
On Monday, 20 June 2016 21:29:11 UTC-4, Dave S wrote: > > > Perhaps my imagination is too small, but I'm failing to see a value in a > general concept of a wrapper. > I am sure you have plenty of imagination. I might have said the opposite at some point, but I said "we", meaning "me". >

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-20 Thread Dominic Mayers
On Monday, 20 June 2016 18:59:58 UTC-4, Anthony wrote: > > >> >> I think the concept is easy to generalize to an application, to a script, >> etc. >> > > The *concept* is easy to generalize, but the *implementation* may become > more complex as you move from a simple single-page PHP script to

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-20 Thread Dominic Mayers
On Monday, 20 June 2016 18:59:58 UTC-4, Anthony wrote: > > On Monday, June 20, 2016 at 3:24:46 PM UTC-4, Dominic Mayers wrote: >> >> Anthony, I am going to reply to one specific part of your last post, the >> one with "I don't think the concept of wrapp

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-20 Thread Dominic Mayers
The problem space is in terms of wrapper applications. The original question is can we have a wrapper [without an http request] as we can in PHP? I get the impression is that you plan on writing one application for use by many customers, and that this application will be installed in many e

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-20 Thread Dominic Mayers
Anthony, I am going to reply to one specific part of your last post, the one with "I don't think the concept of wrapper application is well defined.": I don't think the concept of "wrapper application" is well defined. In any case, we should probably drop that idea, as your ultimate goal is no

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-19 Thread Dominic Mayers
I reply in the message. On Sunday, 19 June 2016 20:06:30 UTC-4, Anthony wrote: > > On Sunday, 19 June 2016 14:35:37 UTC-4, Anthony wrote: >>> >>> I suppose you could put web2py in one directory, and then symlink to an >>> application folder in some other directory. But it seems odd that you >>>

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-19 Thread Dominic Mayers
not looked at it yet, but it may be what I need. > Anyway, for simply setting some configuration options, this approach is > overkill. > It maybe a complicated way to implement what, in my opinion, should be very easy to implement. To return the same to you, I would say that &quo

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-19 Thread Dominic Mayers
es.py: > > from gluon.settings import global_settings > global_settings.mysetting = 'some value' > > Then you can import and access the global settings from within the > application. > > Anthony > > On Saturday, June 18, 2016 at 9:05:01 PM UTC-4, Dominic Mayers wrote:

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-18 Thread Dominic Mayers
reply. As I am new with web2py, your help is very much appreciated. I am still looking at the WSGI middleware option. Thank you for your guidance. On Saturday, 18 June 2016 20:16:03 UTC-4, Anthony wrote: > > On Saturday, June 18, 2016 at 1:35:40 PM UTC-4, Dominic Mayers wrote: >> >>

[web2py] Re: Bootstrap is really killing web2py

2016-06-18 Thread Dominic Mayers
complexity of layouts + styles, which prevent the creation of an abstraction layer over templates similar to what we have in the case of database structures. On Saturday, 18 June 2016 13:29:54 UTC-4, Anthony wrote: > > On Saturday, June 18, 2016 at 8:47:42 AM UTC-4, Dominic Mayers wrote: &

[web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-18 Thread Dominic Mayers
t; include a special model file in the app that sets up the configuration on > each request -- you just have to ensure that the update mechanism doesn't > allow that file to be overwritten or deleted. > > Anthony > > On Saturday, June 18, 2016 at 11:11:25 AM UTC-4, Domin

[web2py] Re: Bootstrap is really killing web2py

2016-06-18 Thread Dominic Mayers
this is turning into a maintenance nightmare. This is > against the original spirit. This is why I believe we need a new approach > to this problem and a new library for form generation. > > > Massimo > > > On Saturday, 18 June 2016 07:47:42 UTC-5, Dominic Mayers wrote: >>

[web2py] How to use a web2py application in a modular way, a way that supports update?

2016-06-18 Thread Dominic Mayers
The use case that I have in mind is that I create a wrapper web2py application over another web2py application that will be updated regularly by a third party. I do not want to have to update the wrapper at each update. The specific use case that I have in mind is that the wrapper application

[web2py] Best approach to have a configuration file located in a non standard location.

2016-06-18 Thread Dominic Mayers
The use case is that you design a template application that will be installed and edited by some businesses that use a work flow from development to testing to staging and finally to production. Most of the configuration values are shared in these different stages. These shared configuration v

[web2py] Re: Bootstrap is really killing web2py

2016-06-18 Thread Dominic Mayers
I am just starting to learn web2py and I want to better understand the issue. Is the issue simply that Bootstrap 3 is not backward compatible with v2.x and therefore we cannot use Bootstrap3 with the templates in web2py that have been created with Bootstrap 2 ? The issue seems to be bigger th

[web2py] Uploaded PDF viewing

2015-01-07 Thread Dominic Balassone
Hey there, I'm simply trying to allow my users to click on a hyperlink which will send them to a new tab where they are viewing they pdf (or asked to download a pdf viewing plugin for their browser). I have already set my pdfs to be saved in the static directory, in a directory called "pdfs,"

[web2py] Re: Issue with length of cookie header

2012-12-03 Thread Dominic Cioccarelli
load(env.http_cookie) except Cookie.CookieError, e: pass # invalid cookies Not sure whether it would be worthwhile making it more resilient? Regards, Dominic. On Tuesday, 4 December 2012 00:33:45 UTC+1, Dominic Cioccarelli wrote: > > Hi Massimo, > > sure

[web2py] Re: Issue with length of cookie header

2012-12-03 Thread Dominic Cioccarelli
ich is otherwise not visible via the standard cookie class. Regards, Dominic. zzeuck_answ=0; SI_baq09Z0lnXXAFA8_intercept=true; OAX=UodP6FB8EyoAAAIE; ab-test=A; UPS_AnonymousID=hJA3HAAAMhYXK; zzdddc=37; com_zz_jumpid=em_r11999_au/au/hho/pps/eppint-id999-12cw42_em_edm_pu_login_pd/employee-off

[web2py] Issue with length of cookie header

2012-12-03 Thread Dominic Cioccarelli
v.http_cookie) there is a problem with the inbuilt session management code as it uses the underlying (broken) cookie code to store the session ID. I haven't had a chance to look at the source code for cookie management in web2py but wanted to check whether anyone else had experienced this issue? Regards, Dominic. --

[web2py] Re: Adding to derived smartgrid constraints.

2012-10-02 Thread Dominic Cioccarelli
cted to be able to do: query = db.model.option.name == 'Alloy Wheels' ... but it complains that "option" isn't a valid field in "model". In any case, it is working now but I still would have thought I could have simply recursed the object hierarchy to build the query (

[web2py] Adding to derived smartgrid constraints.

2012-10-02 Thread Dominic Cioccarelli
ve the constraint and navigate from "Alfa Romeo" to "Gulia" I'll get all Alfa Romo Gulias. What I need is a constraint that is * added* to the generated constraints. Many thanks in advance, Dominic. --

[web2py] Re: Customising "sub page" generated by smartgrid.

2012-10-01 Thread Dominic Cioccarelli
27;ll get all the cars (irrespective of make and model) that have alloy wheels. What I want is all the Alfa Romeo Gulias with Alloy Wheels. On the other hand I remove the constraint and navigate from "Alfa Romeo" to "Gulia" I'll get all Alfa Romo Gulias. What I need is a

Re: [web2py] Smartgrid linked table issue.

2012-10-01 Thread Dominic Cioccarelli
er_signature=False, links_in_grid=True, editable=False, deletable=False) > return dict(facilities=facilities) > > > On Tue, Sep 25, 2012 at 5:06 AM, Dominic Cioccarelli < > dominic.c...@gmail.com > wrote: > >> Hi all, >> >> I'm having some difficul

[web2py] Customising "sub page" generated by smartgrid.

2012-10-01 Thread Dominic Cioccarelli
frustrated when you need to deviate from what you get for "free". Thanks in advance. Ciao, Dominic. --

[web2py] Re: Options for displaying large database tables (jqGrid issues)

2012-09-25 Thread Dominic Cioccarelli
to other views. Many thanks. Ciao, Dominic. On Monday, 24 September 2012 19:54:08 UTC+2, Massimo Di Pierro wrote: > > :-) > > Did you try? > ># in controller >query = db.server # or more complex filter >grid = SQLFORM.grid(query) > ># in view

[web2py] Smartgrid linked table issue.

2012-09-25 Thread Dominic Cioccarelli
ility'] servers = SQLFORM.smartgrid(db.server, linked_tables=['facility'], user_signature=False, links_in_grid=True, editable=False, deletable=False) return dict(servers=servers) When the table renders, it doesn't display hyper-links for the facility IDs as I would have expected. Am I missing something? Ciao, Dominic. --

[web2py] Options for displaying large database tables (jqGrid issues)

2012-09-24 Thread Dominic Cioccarelli
ldvalue=None&tablename=server&_search=false&nd=1348494780601&rows=10&page=1&sidx=&sord=asc>404 (NOT FOUND) jquery.js:2 <http://127.0.0.1:8000/m3t/static/js/jquery.js> I've tried on a couple of different web2py installations and see the same result. Looks line something is missing from the latest plugin source? Thanks in advance. Ciao, Dominic. --

[web2py] str(table) vs. table._tablename

2012-09-14 Thread Dominic
_tablename if hasattr(table, "_tablename") else table >>> timeit.Timer(x).timeit() 0.5015690326690674 Regards, Dominic --

[web2py] Re: routes_onerror question

2011-09-23 Thread Dominic
one a more trivial suggestion? E.g. can routes_onerror be suspended just for the current request? Dominic On 23 Sep, 22:16, Dominic wrote: > Hi-- > > "Friendly error pages" :) may be user-friendly, but they break > requests from non-interactive clients, because those cannot parse

[web2py] routes_onerror question

2011-09-23 Thread Dominic
ion to the login page. Is there a way to override routes_onerror just for the current request (e.g. if the app finds out that the request comes from a non- interactive client)? Dominic

[web2py] Re: Parent -> Child Models in a single form

2010-09-03 Thread Dominic
://bazaar.launchpad.net/~flavour/sahana-eden/trunk/annotate/head%3A/modules/s3xrc.py#L2 Regards, Dominic On 3 Sep, 13:38, "portly.shor...@googlemail.com" wrote: > Is it possible to edit a parent + child model as a single form and > automatically create both the parent and respective children i

[web2py] Re: lazyT objects behave like str

2010-09-01 Thread Dominic
again accesses T ...running into an infinite recursion that finally raises an exception. The suggested fix makes the m, s and T class variables, so __getattr__ would not be used to access them, and the whole issue vanishes. Dominic On 2 Sep, 06:06, mdipierro wrote: > I was not ware of this. Not sure

[web2py] lazyT objects behave like str

2010-09-01 Thread Dominic
gards, Dominic

[web2py:34965] Re: Creating Models the Web2Py way

2009-11-09 Thread Dominic
, in which case you should put this as an attribute into product_description rather, otherwise the backlink could lead to inconsistencies (meaning: the reference in product could point to a description that doesn't point back to the product). Dominic --~--~-~--~~~

[web2py:34921] TypeError in _insert

2009-11-08 Thread Dominic
Hi, sql_represent() in sql.py (around line 461) contains: elif isinstance(obj, (Row, Reference)): return obj['id'] Shouldn't this be rather: elif isinstance(obj, (Row, Reference)): return str(obj['id']) ? This would avoid a TypeError in _insert(

[web2py:26676] Re: Bzr Repo cleaning

2009-07-16 Thread Dominic
copy of the branch (3.9 MByte currently including demo apps). Of course, from this copy you cannot work on the web2py branch, but you can run it in any case. Dominic On Jul 15, 11:02 pm, Fran wrote: > Bumping this for attention - the packs folder is now 560 > Mb!http://groups.google.com