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

  • Home
  • SEARCH
  • 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 8336629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:03:07+00:00 2026-06-09T04:03:07+00:00

I am attempting to build a django based web page (I know python and

  • 0

I am attempting to build a django based web page (I know python and want to develop a couple web based applicaitons). The goal of this page is to show data from a few different databases that I only have read access to. Basically, it is dashboard type view for a couple key things.

I’ve build a Sqlite database to hold the Django settings for the application. How do I branch out from here though? I’d like to query an Oracle database and a MySQL database?

I can query them individually using something like this in an appropriate view:

def test(request):
    from django.db import load_backend
    myBackend = load_backend('django.db.backends.oracle') # or 'mysql', 'sqlite3', 'oracle'
    myConnection = myBackend.DatabaseWrapper({
        'HOST': 'myhost',
        'NAME': 'mysid',
        'OPTIONS': {},
        'PASSWORD': "mypass",
        'PORT': "1521",
        'USER': "myuser", 
        'TIME_ZONE': "America/Chicago"})

    # Now we can do all the standard raw sql stuff with myConnection.
    myCursor = myConnection.cursor()
    myCursor.execute("SELECT COUNT(1) FROM schema.table;")
    return HttpResponse("%s." % myCursor.fetchone())

In the template I can display this count. However, this seems incorrect, based on how I can query the Sqlite database.

I’d like to use a data model. Is this the appropriate thing to use when I am just reading data? The account doesn’t have write access to the oracle/mysql tables.

Is there a way to automatically generate these models for the existing tables? Some of these tables are rather large in terms of number of columns and, if possible, I’d prefer to automate the create to prevent mistakes on my part.

  • 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-09T04:03:08+00:00Added an answer on June 9, 2026 at 4:03 am

    For multiple database support see the Django documentation. Long and short, you add the connection info for each database to your DATABASES setting and then setup a router to determine which apps/models each database handles.

    For generating models from existing database tables you can use the inspectdb management command. However, Django doesn’t explicitly list support for Oracle databases with this command, so you might be on your own there.

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

Sidebar

Related Questions

I'm attempting to build a Virtual Machine to develop a Django application. The OS
I'm attempting to build Python 2.6.2 from source on my Linux system. It has
I am attempting to build a Java web project on NetBeans 6.8, but I
I'm attempting to build a page that displays the same set of information of
Attempting to build an interface and generics based graph and getting an odd error
I am attempting to build an ASP.NET MVC 4 web app, which is similar
I'm attempting to build a login page for my website. I have managed to
I'm attempting to build mercurial 1.3.1. I've attempted this thus far on my Mac
I am attempting to build a progress bar loaded for a long running page
I am attempting to build a website that utilizes facebook auth based setting created

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.