I have this simple plugin (from the egg cooking tutorial) that just provides a 
page that is publicly viewable, since the wiki will login only, but have a few 
problems with it.  I've got programming experience but not with python.

Firstly, I've set this SummaryModule as the base handler so it starts with this 
instead of the wiki, but when it's accessed from the project root directory it 
shows the trac header and footer template but without CSS styling, then 
accessing it via /summary the formatting appears.

Secondly, accessing it via /summary then logging in makes the addresses go to 
/summary/wiki, /summary/timeline etc. which is OK until you logout when it 
stays on the same page and gives an auth error since I don't want public access 
to anything but the summary page.  It should go back to /.

Thanks for any help you can provide.

Trac 0.9, python 2.4

summary.py:

from trac.core import *
from trac.web.chrome import INavigationContributor
from trac.web.main import IRequestHandler
from trac.util import escape, Markup

class SummaryModule(Component):
    implements(INavigationContributor, IRequestHandler)

    # INavigationContributor methods
    def get_active_navigation_item(self, req):
      return 'summary'

    def get_navigation_items(self, req):
      yield 'mainnav', 'summary', Markup('<a href="%s">Summary</a>', self.env.h

    # IRequestHandler methods
    def match_request(self, req):
      return req.path_info == '/summary'

    def process_request(self, req):
        return self.env.config.get('summary', 'src'), None  # 
/var/trac/myproject/htdocs/summary.cs


summary.cs: (in /var/trac/myproject/htdocs)

<?cs include "header.cs" ?>
<?cs include "macros.cs" ?>

<div id="content" class="summary">
        <h1>Yo Globe!</h1>
</div>

<?cs include "footer.cs" ?>

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

Reply via email to