One way to achieve this is the following:

1) in applications/admin/views/layout.html replace line

    {{response.files.append(URL('static','css/styles.css'))}}

with

    {{response.files.append(URL('admin','static','css/styles.css'))}}

2) in applications/<yourapp>/views/appadmin.html replace

    {{extend 'layout.html}}

with

    {{extend '../../admin/views/layout.html}}

The problem with making 1) default would prevent renaming of admin.
Not anybody does that.

Massimo

On Dec 19, 4:28 pm, weheh <[email protected]> wrote:
> Anyone doing customization of their web2py layout knows that they are
> going to heavily modify both the layout.html and static/css files.
> This can result in breakage of the admin utility. It is good policy, I
> think, to segregate the admin app from the user's app sufficiently
> that the developer can create their own custom look and feel without
> disrupting the debug cycle. This might mean keeping a completely
> isolated set of layout.html, javascripts, and css files so that they
> don't conflict with the web2py way of doing things.
>
> Of course, if the user is intending on exposing some of the admin db
> features to the outside world (which I don't recommend), then what I'm
> suggesting might get in the way. By default, then, the app layout.html
> and css should be the same as the admin layout.html and css. But when
> the user modifies the layout and other files, it shouldn't affect the
> admin look and feel.
>
> How do others feel about this?

Reply via email to