db.define_table creates a model of the database table so the DAL can 
generate proper SQL queries to interact with the table -- so naturally the 
model must have the correct table and field names, otherwise the DAL would 
generate SQL queries referring to non-existent tables and fields. If for 
some reason you want to use different table and field names in your model, 
you can use the "rname" argument to db.define_table and Field() to specify 
the "real" name of the table/field (i.e., the name used by the database). 
This is useful if the real name used in the database is not a valid Python 
identifier.

Anthony

On Tuesday, May 31, 2016 at 2:56:54 PM UTC-4, Sammy wrote:
>
> One more question. Do I have to call the Table name same in 
> db.define_table as the real table name or it does not matter?
>

-- 
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