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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:25:10+00:00 2026-05-20T11:25:10+00:00

First is it dumb to use DJango as a quick/dirty data access method? We

  • 0

First is it dumb to use DJango as a quick/dirty data access method? We have a backend process that will be feeding a GUI which will be implemented with django, and we figured we could just share a model between them. We dont care about performance the backend process just needs a quick way to throw something in a DB.

Assuming is not dumb how to we go about sharing a model between a UI and Backend process?

Right now we have the “model” defined we just dont know where it should reside. We tried putting it in the backend process in a model package, but since its an app we can’t really generate the SQL for it.

We also tried just creating a models.py and importing our models but it doesn’t generate any sql.

Behind the scenes I know it uses[app_name]_[table/model] for the db table name, so are we trying to do something we shouldn’t?

Really would like to know the correct way to use a shared django model. Any help would be appreciated.

I currently have defined the model outside of the ui, and I am trying to find out how to reference them in the “app” so that when I call manage.py sql app it generates my model.

  • 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-20T11:25:10+00:00Added an answer on May 20, 2026 at 11:25 am

    As long as you’re hooked up to the database in question in your settings file, and the model defines fields that exist on the table, you just need to set the db_table meta option to refer to the actual table name and the SQL generated via the ORM should return results / attempt to update the table.

    http://docs.djangoproject.com/en/dev/ref/models/options/#db-table

    Then, it’s just a matter of importing that model and using the ORM. As Ignacio linked to, you will have to specify os.environ['DJANGO_SETTINGS_MODULE'] for django to know which settings file to use for your model.

    PS: Awesome stuff in that post, I didn’t know there was an shortcut for setting up the environment!

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

Sidebar

Related Questions

First, a little background. I have two ASP.NET web applications that use SQLServer session
First off, I'm using Access 2000 and DAO. I have code that executes a
I have inherited a medium sized database that we are trying to use with
I have a function that calls jQuery's pulse function. I use it on a
Before I start explaining the code I will first give my use case so
First off, I am using Windows XP. I have multiple hard drives and it
First of all, I know how to build a Java application. But I have
First let me say that I really feel directionless on this question. I am
First off, I'm working on an app that's written such that some of your
I'm trying to use the jakarta commons HttpClient library. I think I'm being dumb

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.