Hi,

I was doing some testing on a software release that we are about to
make and downloaded TG from the website onto a clean fedora core 5
machine using the tgsetup.py script. After running our project on the
fresh TG 1.0b2 download one of the pages is showing an MRO (Method
resolution order) error. I believe this is coming from kid 0.9.4 mainly
because if we revert the package to 0.9.3 everything seems to work
again. I have been trying to reproduce and isolate this error in an
attempt to determine whether the error is a template writing error on
our side, or something within TG (or components).

I have brief example that can reproduce this issue (which I will paste
at the end of this message). The structure of the project templates
that are causing the issue looks as follows:

page.kid
  - py:layout="'local_layout.kid'"
  - py:extends="'local_extend.kid'"

local_layout.kid
  - py:layout="'../../common/templates/common_layout.kid'"

local_extend.kid
  - py:extends="'../../common/templates/common_extend.kid'"

common_layout.kid
  - <?python import sitetemplate ?>
  - py:extends="sitetemplate"


------------------------
I reproduced this error by performing a 'tg-admin quickstart', and
creating a new project, then using the following files. The problem
disappears however if I remove the py:extends from welcome.kid.

== mytest/templates/welcome.kid ==

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";
          xmlns:py="http://purl.org/kid/ns#";
          py:layout="'../../common/templates/layout.kid'"
          py:extends="'localextend.kid'">
<head>
<title>Welcome to the test</title>
</head>
<body>
        <div py:def="insertContent()">
                <center>Welcome page</center>
        </div>
</body>
</html>


== mytest/templates/localextend.kid ==

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";
      xmlns:py="http://purl.org/kid/ns#";>
<head>
    <title>Local Extends</title>
</head>
<body>
        <div py:def="displayString()">
                <p>Local Extends:</p>
        </div>
</body>
</html>


== common/templates/layout.kid ==

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<?python import sitetemplate ?>
<html xmlns="http://www.w3.org/1999/xhtml";
          xmlns:py="http://purl.org/kid/ns#";
          py:extends="sitetemplate">
<head></head>
<body bgcolor="#33ff4f">
        <div py:content="insertContent()" />
</body>
</html>


The error that this page produces is:
<snipped the traceback for readability: happy to paste if requested>
TypeError: Cannot create a consistent method resolution order (MRO) for
bases Template, BaseTemplate.


Can anybody help out with this? The error looks to my eyes like an
inheritence issue but I know essentially nothing about internals of TG
/ kid so have no idea where to start to try and trace this issue. A
couple of days of web searching haven't yielded anything useful for me
either (although I may be searching for the wrong keywords ;)

On a slightly different note, I was curious why the offline
installation instructions for turbogears downloads a different set of
packages than the online install does? They obviously use easy_install
vs tgsetup.py, but why are they downloading and using different package
sets?

Thanks in advance,
Andre


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to