+1 sounds good, and I think it will make life easier for users who
quickstart multiple projects which is nice.

--Mark

On Mon, Mar 16, 2009 at 4:18 AM, Jorge Vargas <jorge.var...@gmail.com> wrote:
> Hi,
>
> For some time I have been thinking on which will be the best way to
> "merge" two controllers into the same PATH, percious made a suggestion
> the other day on IRC which IMO is brilliant.
>
> it was something along the way of
>
> "They are classes simply make a subclass of both controllers"
>
> Ever since we have been using it for tgext.pages, which got me
> thinking. Why don't we do that with quickstart? well here is the
> result.
>
> The code simply splits the "RootController" into 3 controllers.
> AuthenticationController (login,logout, post_login, post_logout),
> DemoController (about,index,auth,manage_permission_only,editor_use_only)
> and RootController (admin, error, extends both of the above)
>
> IMO this is
> - way nicer (cleaner) than the original "everything smashed together" approach
> - It introduces new and old users, to this great idea of mounting 2
> controllers to pull functionality together
> - it's not magical at all (because you do know that python has
> multiple inheritance do you?)
> -it's also great to help non-newbies in getting rid of the "newbie"
> oriented part of the quickstart.
> - it simplifies the quickstart code a lot (removes a bunch of if/elif blocks).
>
> In fact I think the AuthenticationController could be moved inside
> /lib together with BaseController as it's something people aren't
> going to change a lot.
>
> is this going back to the SecureController/Controller stuff? well kind
> of but not really as we aren't making two separate hierarchies we are
> making just one.
>
> PS: the code hasn't been adapted for no-auth controllers I wanted to
> see if it was commitable before getting it into full shape.
>
> >
>



-- 
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to turbogears-trunk@googlegroups.com
To unsubscribe from this group, send email to 
turbogears-trunk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to