Another option might be to leave the name 'admin' and use routes.py to
rewrite incoming and outgoing URLs to 'admin' using a different name.
Anthony
On Tuesday, June 21, 2011 2:11:46 PM UTC-4, Sergio Talens-Oliag wrote:
> A note I forgot to add to my previous message, I've renamed the admin
> application and I've found that the name is hardcoded in a lot of places...
> ¿shouldn't it be easier to change?
>
> To fix the applications I've changed the admin application name on the
> following files:
>
> ./app/controllers/appadmin.py
> ./app/models/menu.py
> ./app/views/default/index.html
>
> To change the links on the error messages I've added the following to my
> 'web2py/applications/__init__.py' file:
>
> # Adjust the default admin route for error_message_ticket
> admin_app_base_url = '/my_admin'
> from gluon import rewrite
> rewrite.thread.routes.error_message_ticket = '<html><body><h1>Internal
> error</h1>Ticket issued: <a href="' + admin_app_base_url +
> '/default/ticket/%(ticket)s" target="_blank">%(ticket)s</a></body><!-- this
> is junk text else IE does not display the page: ' + ('x'*512) + '
> //--></html>'
>
> But I don't like the solution, as I'm unsure if the __init__.py file will
> be
> overwritten on upgrades and feel that this should be adjusted on a
> different
> file.
>
> Is there a better solution? Where will you put a global setting? Would you
> accept a patch to simplify the renaming of the admin application?
>
> Greetings,
>
> Sergio.
>
> --
> Sergio Talens-Oliag <[email protected]> <http://www.iti.upv.es/>
> Key fingerprint = FF77 A16B 9D09 FC7B 6656 CFAD 261D E19A 578A 36F2
>
>