Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
Access django database on postgresql from independent python script

I have a website built with django and postgresql. each user (user in django Auth system) on the website have many account models (and other models) .

An app running on windows-python based need to access (read/write) data from the database. Each app is associated with a specific user.

my questions:

  1. can an app access only specific user data? the account model have an attribute of user so it filter based on that, how can it restrict external app access?
  2. what is the proper way to read / write from database? can I somehow use the django models as the website do?
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I think the best way is to build an API layer to exchange data between your Django and your externals. Django rest framework provides a really simply solution to add a REST layer to your app that is also reusable with any other external. https://www.django-rest-framework.org/

With this approach you centralize and abstract the direct database manipulation in Django, avoiding any external operation that may break it's consistency (for example with an alter table).

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!