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 8891405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:44:10+00:00 2026-06-14T22:44:10+00:00

Sorry, I’m a little unclear on the web2py manual explanation . as an example,

  • 0

Sorry, I’m a little unclear on the web2py manual explanation.

as an example, given app1 and app2

I want to have app2 share the database I have built in app1

So do I change the app2/models/db.py file to show: db = DAL(‘sqlite://storage.sqlite’,migrate=’false’) ?

and include all other myModel.py files in app2/models directory as well?

if the database is in app1/databases/ how does app2 know how to find the correct database file?

This Thread begins to answer the question but I’m still unclear on how to define where the shared database lives.

  • 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-06-14T22:44:12+00:00Added an answer on June 14, 2026 at 10:44 pm

    Note, DAL(..., migrate=False) just sets the default value of migrate for each table — it will not have any effect on the migration status of tables whose define_table() calls include their own explicit migrate argument. If you want to completely disable migrations for an entire db connection (regardless of the individual define_table() calls), instead use:

    DAL(..., migrate_enabled=False)
    

    Also, to share model definitions between applications, rather than simply copying the model files, you could put the definitions in functions or classes within modules and then import the modules. Another option is to use auto_import:

    DAL(..., auto_import=True)
    

    Note, auto_import will import the field names and types, but it will not include DAL-specific attributes, such as validators and defaults, so its usage is somewhat limited.

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

Sidebar

Related Questions

Sorry the title isn't more help. I have a database of media-file URLs that
Sorry for this simple question, but I can't solve it... There is an example:
Sorry I am very new to open graph and have been having difficulty to
Sorry if my question was unclear. I got a bunch of elements and the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
Sorry I have a problem with with the fancy left apostrophe showing up in
Sorry for the basic question - I'm a .NET developer and don't have much
Sorry, I'm new to SVN and I looked around a little for this. How
Sorry if the title is not clear enough, I have <a> elements with the
Sorry if this is stupid question, but I'm new to MATLAB. I have 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.