Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7436557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:15:30+00:00 2026-05-29T10:15:30+00:00

The documentation we can use auto_import if we need access to the data but

  • 0

The documentation we can use auto_import if we “need access to the data but not to he web2py table attributes”, but this code seems to use the table attributes just fine.

from gluon import DAL, Field

db = DAL('sqlite://storage.sqlite', auto_import=True)
for row in db(db.person).select():
    print row.name

The table was defined in a previous run.

db = DAL('sqlite://storage.sqlite', auto_import=True)
db.define_table('person',
                Field('name'))
db.person[0] = {'name' : 'dave'}
db.commit()

Doing both auto_import=True and the define_table gives an error about “invalid table name”. Doing neither gives an error if I try to access db.table.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:15:31+00:00Added an answer on May 29, 2026 at 10:15 am

    With auto_import=True, web2py will get the field names and types directly from the *.table files in the application’s “databases” folder. When the documentation refers to “web2py table attributes” that will not be available, it is referring to attributes that are defined in the model (i.e., using db.define_table()) but not stored in the database or *.table files, such as “requires”, “widget”, “represent”, etc. Those attributes are defined only in web2py code and therefore cannot be determined merely by reading the *.table files. Note, the *.table files are used for database migrations, so they only store metadata directly relevant to the database (i.e., field names and types, and database-level contraints, such as “notnull” and “unique”). Attributes like “requires” and “represent” are only used by web2py and have no effect on the database, so are not recorded in the *.table files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So in my documentation it says: public event TreeViewPlusNodeCheckedEventHandler NodeChecked() You can use this
The documentation for Access.BackingField() indicates that this: Sets the access-strategy to use the backing-field
Can anyone point me to some documentation about how I can use an Iso
How can I use Doxygen to create the HTML documentation as a single, very
The PHP documentation can be found here , but I think it's rather lacking.
It seems that all of the documentation I can find about OpenGL-ES says something
From searching I can see this has been asked time and time again, but
Is there a documentation somewhere which details every class and methods we can use
I'm trying to use Phil Sturgeon's CodeIgniter Template library , but I can't get
Doctrine documentation says you can use public function construct() { ... } as a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.