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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:52:19+00:00 2026-05-26T14:52:19+00:00

I’m looking for a way to interact with the models of a django project

  • 0

I’m looking for a way to interact with the models of a django project from within a separate django project. I don’t mean different apps, I mean 2 separate projects with 2 separate settings files.

I’m in the process of migrating an old web store (really old, it’s all static html) to our django based backend. To do this, I created a separate django app that would handle all of the crawling and parsing, using the django orm and a few views for human assisted parsing. Now I’m at a point where I need to populate the catalog data of our backend with the data stored in the crawler project. I’ve spent the better part of the last 2 days trying to figure out a method, with no luck.

What I’d ideally like to do is import the store project as a module into a django command class and then interact with it that way (mind you, they are working off of 2 separate settings files, so setup_environ won’t work). I’d like to avoid serializing the crawler data and then importing it from the store or interacting with the store database outside of django’s orm because this project is far from over and I’d prefer to keep things as flexible as possible.

What would you suggest? I’m up for wild ideas, so long as I can interact with the orm of both projects from within a single script.

  • 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-26T14:52:20+00:00Added an answer on May 26, 2026 at 2:52 pm

    I’ve done this before…

    So,

    Project A, Project B

    Project B wants to call models in Project A…

    1) Project B connects to the same database with the same user/login as Project A.

    If so then you can just import models from Project A into Project B and interact with them like normal.

    2) Project B connects to a different database than Project A.

    You can define two databases in the settings file for Project B.

    DATABASES = {
        'default': {
            'NAME': 'app_data',
            'ENGINE': 'django.db.backends.postgresql_psycopg2',
            'USER': 'postgres_user',
            'PASSWORD': 's3krit'
        },
        'users': {
            'NAME': 'user_data',
            'ENGINE': 'django.db.backends.mysql',
            'USER': 'mysql_user',
            'PASSWORD': 'priv4te'
        }
    }
    

    And then either define a db router so django knows what database to go to to get data for models from Project A

    OR

    You can explicity set the db to use when making calls the ORM using something like:

    Author.objects.using('other').all()

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I've tracked down a weird MySQL problem to the two different ways I was
I have a text area in my form which accepts all possible characters from
I don't have much knowledge about the IPv6 protocol, so sorry if the question
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.