Thanks for replying, pbreit.

Interesting enough, the capital letter was the only persistent cause
of error. I had to reinstall web2py to finally fix that.

I still need to question your 3 suggestions, though:

1) The reason why I completely rewrote db.py with only those lines is
because we are told on Chapter 03 that "[...] 'models/db.py' [...]
'controller/default.py' [...] In the following, we assume that these
files have been removed; we will be creating apps from scratch."

2) this was the first time I had problems with CamelCase on field
names;

3) Chapter 3 also says that "In the SQLite case, if the database does
not exist, it is created. You can change the name of the file."

Please let me know anyone if there are concrete cases where I really
should avoid doing as above (no need to mention PEP08 nor renaming
internal components!).

Eduardo

On 11 mar, 02:08, pbreit <pbreitenb...@gmail.com> wrote:
> I'm not sure the exact problem. Did it show you what line of code caused the
> error?
>
> I would suggest starting over and just putting this at the bottom of db.py
> (starting at about line 80). This worked OK for me.
>
> db.define_table('estudantes',
>     Field('nome'),
>     Field('pais'),
>     Field('nascimento', 'date'),
>     Field('sexo'),
>     Field('email'))
>
> Some tips: 1) try to avoid changing or deleting what web2py gives you, 2)
> use all lower case names and 3) don't rename things unnecessarily.

Reply via email to