Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

172
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda