And the path to the view is /views/default/novo_cliente.html?
On Monday, April 25, 2016 at 6:32:43 AM UTC-4, Morganti wrote:
>
> Hi, thanks your answer.
>
> I had created the controller inside default.py, see below:
> def novo_cliente():
> db.cliente.salao.default = auth.user.id
> db.cliente.salao.writable = db.cliente.salao.readable = False
> form = SQLFORM(db.cliente)
> if form.process().accepted:
> response.flash = 'Novo cliente cadastrado'
>
> records =
> SQLTABLE(db().select(db.cliente.ALL),headers='fieldname:capitalize')
> return dict(form=form, records=records)
>
> and then create the view novo_cliente.html
>
> {{extend 'layout.html}}
>
> <h1>Novo Cliente</h1>
> {{=form}}
> <h2>Clientes</h2>
> {{=records}}
>
>
> So, what is it missing?
>
> Thanks in advance.
> BR
> Morganti
>
> Em segunda-feira, 25 de abril de 2016 06:57:18 UTC-3, Johann Spies
> escreveu:
>>
>> Hallo André
>>
>> On 25 April 2016 at 11:49, Morganti <[email protected]> wrote:
>>
>>
>>> Hello,
>>>
>>> I am started to learn web2py some weeks ago. After created some
>>> controllers and models using the generic view. I tried to deploy to
>>> PythonAnywhere to test it and, of course, I know or use disable generic
>>> only localhost or create the specific views. First I tried to disable the
>>> localhost generic view and ok, everything as expect. But, when I create a
>>> view, using quick examples, one view for one form sqlformat, I am getting
>>> the error:
>>>
>>> invalid view (default/novo_cliente.html)
>>>
>>> Do I need to do anything more?
>>>
>>>
>>>
>> Create a view for controller novo_cliente: default/novo_cliente.html
>>
>> Regards
>> Johann
>> --
>> Because experiencing your loyal love is better than life itself,
>> my lips will praise you. (Psalm 63:3)
>>
>
--
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.