Thanks for that. If I use a plug in I can replace the default.py controller file in admin in its entirety, if my reading of that section is correct, a plugin solution still involves a lot of repetition (although at least we're down to one file) and a hole in future update behaviour.
On 30 January 2013 13:42, Anthony <[email protected]> wrote: > Maybe look into plugins: > http://web2py.com/books/default/chapter/29/12#Plugins > > > On Tuesday, January 29, 2013 6:39:44 PM UTC-5, Paul Whipp wrote: >> >> I'm new to web2py but not to Python or web application frameworks. >> >> I love the dry pythonic nature of web2py. I'm less enamoured by its use >> of magic but the convenient REP makes this mostly forgivable. I'm giving >> web2py a go on a couple of real projects. >> >> As I use emacs, it looks like it would be straightforward to modify the >> admin app to pass a file to an emacs service (if available) for editing. >> Its also easy to copy the admin application, call it myadmin and make the >> change there. These are both bad things to do because; in the first case an >> upgrade will overwrite my change (yes I use source control but its still >> going to be a pain), and in the second case I've copied a large slice of >> code and lost the benefit of upgrades in myadmin which could lead to all >> sorts of problems in the long term. >> >> What I want to do is specialize the admin app such that I just use my >> specialised default controller with its single specialized edit method (the >> latter specialisation is a little tricky because the method is a bit >> monolithic but you can see what I'm aiming at). >> >> The result would be a specialization of the admin app called myadmin >> containing virtually nothing but the specialized default controller and >> edit method. I cannot see any obvious way to do this. Am I going to have to >> make like a PHP programmer and copy the whole application to make one small >> change or is there some cool way to unravel the magic a bit and point the >> myadmin file lookups to admin, except for my controllers/default.py? >> >> For the time being I'll stick with navigating the file structure and >> invoking emacs directly, so my question is more of a "How would I". I've >> tried google to no avail and I'll be happy for an RTFM response if you can >> point me at the FM (or an example) that covers this. >> >> Cheers, >> Paul >> > -- > > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

