[Moin-devel] Custom Error Pages.

Mark DeLaFranier delafran at sybase.com
Mon Mar 21 09:16:05 EST 2005


Hi all, this is my first post so forgive me if this is not the correct
address.
 
I have recently started using the MoinMoin Wiki with lots of success.  I am
looking at making a few adjustments on the server side for additional
functionality.  One item that I would like to do is write a custom error
page for when a user is denied read access.  This is just one example.  The
idea could easily be extended to allow wiki system administrators to define
custom pages for various form of errors on the server.
 
I am new to python as well.
 
This is my idea:
 
1. User can define a page called "AclPages" which is a parent for all Acl
related messages.
2. User can then define a page called "AclPages/ReadErrorPage".  The
contents could be what ever the sytem administrator wishes, for example mine
says:
 
{{{
1. Please ensure that you are logged onto the wiki.  You are logged on if
you user name appears in the upper right hand corner.  Else please login
2. Your account has not been granted the necessary privedlges.  Please see
AccessInfo for further details.
}}}
 
I started to modify the Page.py as follows:
 
            request.write("<strong>%s</strong><br>" % _("You are not allowed
to view this page."))
 
            #no_read_page = Page(self, pagename)
            #no_read_page = Page(request, "AclPages/ReadErrorPage",
format_args=pi_formatargs, do_cache=do_cache)
 
            #no_read_page.formatter = self.formatter
            #no_read_page.send_page_content(request, Parser, body,
format_args=pi_formatargs, do_cache=do_cache)
 
I was wondering if somebody has some suggestions?
 
Thanks
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/moin-devel/attachments/20050321/546a7a30/attachment.html>


More information about the Moin-devel mailing list