On Dec 2, 8:21 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > On Dec 2, 8:19 pm, Richard <richar...@gmail.com> wrote: > > > I would be fine with (2) > > > Do people use examples.w2p? > > I do not know. >
As examples, as the main website this is a useful, non-trivial site example which should be included as part of the distro, even if few people look at it often (that, after all, is not the point!). As for option (2) - if you update apps, AND you assume locations, then that in itself is a problem for developed sites. I would offer an option 3 as more functional: (3) Base distro / first unpack unloads welcome, admin, examples; updates offer option to site admin - offering by default to unpack, BUT giving the option for "no" (this is a bit of a functional morph between options 1 and 2, leaving a way for "bad" things not happening). I would ALSO allow NO examples or "default" welcome app (so that a site may have it's own "welcome". The only thing that currently gets in the way of having a site-specific "welcome" is that web2py (shame on web2py!) uses applications/welcome as a template for new apps. This is "ok" at one level (allows a site to customize), but prevents a functional welcome app. One obvious and easy way around this is to have - instead of "welcome.w2p" - to have a template.w2p which will always be used for (you guessed it!) templating new apps. This _can_ by default create a welcome app (or any other name a site amin wants), and it can also be customized by having the site admin do any customizations desired, and packing up for inclusion in the site/template.w2p location. Just as routes.py is distributed as routes.example.py, I would also make this template.py only be created on new app creation, and only if a template.w2p doesn't already exist. This can be done from (you guessed it again!) a template.example.w2p file. Of course, all of this "how do we update app admin, other components with an update?" begs a structural question - I think of it as bad form to have a fix propogate into numerous places by "copy" (sure, sometimes this is simplest and ok when its very shallow). This suggests that default templating that comes FROM WEB2PY DISTRO could be better encapsulated, e.g. as a plugin (as long as customization were able to happen by extension instead of modification - as any modificatino frustrates effective updates). Those are my comments for now. Regards, - Yarko > > > > When I need to find something out I search the book and this forum. > > > On Dec 3, 11:04 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > For the future version of web2py.... > > > > should we (1) continue to distribute admin.w2p, welcome.wp2, > > > examples.w2p and unpack them on startup (and require --upgrade=yes on > > > upgrade) or (2) should we just distribute the applications folder with > > > unpacked apps? > > > > The case (2) would simplify lots of stuff and avoid lots of problems. > > > > I originally choose (1) because I thought people were going to modify > > > admin and did not want an automatic upgrade of it. Some people for > > > example edit /applications/admin/models/access.py > > > > Pros? Cons? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.