Generic views are disabled by default. The welcome app includes the 
following in db.py:

response.generic_patterns = ['*'] if request.is_local else []

That activates the generic views for local requests only. If a generic view 
is being executed for a non-local request, it would only be because you 
explicitly enabled it via response.generic_patterns. If that's not the 
case, perhaps something else is going on (i.e., maybe it's using a 
non-generic view, but you have included response.toolbar() in that view).

Anthony

On Wednesday, January 6, 2016 at 5:22:30 AM UTC-5, Annet wrote:
>
> In one of my controllers I send a mail. The mail has its own view. 
>
> usermessage = response.render('mail/send/username.html', usercontext)
> usermail = mail.send(to=[recipient], subject='Your username', 
> message=[None, usermessage])
>
>
> I put this view in a subfolder and forgot to adjust the controller, so 
> web2py uses the generic.html
> view to render the mail. In this case the view renders all settings of db, 
> session, env et cetera.
>
> Is there a way to disable this behaviour? When a view cannot be found I do 
> not want display
> all setting to the visitor.
>
>
> Kind regards,
>
> Annet
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to