> yet you have a 
>
>    {{=auth.navbar()}} in the layout.
>

Do you mean this line in layout.html?

 <div id="navbar">{{='auth' in globals() and auth.navbar() or ''}}</div>

Does appadmin need it? Or is it there for us to use in our views? In case 
of the latter I could remove this line without running into problems.

In my apps I never use web2py's views, I always make a copy of them and 
rename them, so instead of layout.html I have init_layout.html, from which 
I removed the entire Navbar section, to avoid issues like the one's 
reported above.

 
>
> You cannot have a navbar without defining tables. This would never have 
> worked and it should not work. 
>

As far as I know it did work in a previous version of web2py, I always 
created my apps this way, i.e commenting out Auth until I needed it, mainly 
because I have a customized auth_user table. Then in a previous version I 
got an error that Auth was needed, I believe it had something tot do with 
signature. In that case importing Auth and uncommenting auth = Auth(db), 
solved the problem. This is the first time I create an app that results in 
the errors reported above.

In my application wide navbar I have a link to a cms (in which I have a 
customized version of the auth_navbar) and the following text and link:

{{if auth.is_logged_in():}}
  <p class="navbar-text pull-right" style="color: #FFFFFF;">Logged in as 
{{=auth.user.first_name}} {{=auth.user.last_name}} | 
   <a href="{{=URL('default','user',args='logout')}}">Logout</a></p>
{{else:}}
    <p class="navbar-text pull-right" style="color: #FFFFFF;">You're not 
logged in | 
     <a href="{{=URL('default','user',args='login')}}">Login</a></p>
{{pass}}


+1 for Anthony's proposal.


Kind regards,

Annet.



-- 



Reply via email to