Hello, Florent.

On Saturday November 22, 2008 21:12:00 Florent Aide wrote:
> > So, SecureController subclasses that class just to override a method by
> > using the original method's code. Why?
>
> then the answer is: Yes we can.
>
> That will make any controller a would be secure controller and that's
> even better :)

Subclassing a class to override one of its methods with the same code as the 
original?

In other words, this is what we have in TG:

> class BaseClass(object):
>    """This is TGController"""
>    def say_hi(self):
>        print "Hi!"
>
> class Greetings(BaseClass):
>    """This is SecureController in quickstarted projects"""
>    def say_hi(self):
>        print "Hi!"

I can't understand why we have such redundant code. I can't understand why we 
define SecureController in quickstarted projects while its functionality is 
already available for _any_ TG2 controller -- it's exactly the _same_ code.

Cheers! :)
-- 
Gustavo Narea <http://gustavonarea.net/>.

Get rid of unethical constraints! Get freedomware:
http://www.getgnulinux.org/

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

Reply via email to