On 17 February 2011 08:02, Jonathan Lundell <[email protected]> wrote:
> On Feb 16, 2011, at 9:49 PM, cjrh wrote: > > > > On Feb 16, 11:38 pm, Jonathan Lundell <[email protected]> wrote: > >> [I'm reposting this message from a while back, because the new release > 1.92.1 contains it for the first time. It describes some simple use cases > for the new URL router. Note that there are still some things that you'll > need the existing regex-based router for, but for most cases the new one > should work and be easier to configure.] > > > > May I add this text to the book, now that the router is in the latest > > stable release version? I don't want to step on your toes, if you > > were planning to do this yourself soon anyway, then that's fine too. > > Please do. Take a look at router.example.py as well; there's at least one > new feature there (path_prefix). I can review the material any time you're > ready. > > I am afraid router.example.py did not help me a lot. What is unclear to me is how to use root_static. The documetation says: # root_static: list of static files accessed from root # (mapped to the current application's static/ directory) # Each application has its own root-static files. The example did not show any reference to an application. So do I have to list all the files all the applications will user from 'static' in the same list? I have two applications and at the moment have the following: # base router BASE = dict( default_application = 'kb', domains = { 'kbase.sun.ac.za' : 'kb', 'kbase' : 'kb', 'sadcpublications.sun.ac.za' : 'sadec' }, applications = ['kb', 'sadec'], controllers = 'DEFAULT' ), Both sadec and kb makes use of a front page image: in sadec/static for sadec and in kb/static/images for kb While sadec shows the image kb can't find it. I have used autoroutes before but that breaks jqgrid. Now with this jqgrid seems to work. If I can just solve the problem of <app>/static/images it will help - that is until I discover something else routes.py has broken... Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a

