A
A
Angry_rat2019-01-17 19:16:06
Django
Angry_rat, 2019-01-17 19:16:06

How to screw up an API in Django?

There is a django project, you need to build a table and work with it using info that is received via api, api is provided with a key. How will it be correct to tie it into the project? Where are the keys and a link to them written, and is a separate form needed for the api?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Roman Kitaev, 2019-01-17
@deliro

Keys, like passwords, should be obtained from the .env file or from environment variables (os.getenv) and in no case end up in git (but they increasingly spit on this)
Everything else depends on the API and the protocol / protocols that the API uses

K
Konstantin Malyarov, 2019-01-17
@Konstantin18ko

DRF , the site has documentation (step by step).

V
Vadim Shatalov, 2019-01-17
@netpastor

We store the keys in the database in encrypted form
https://gitlab.com/lansharkconsulting/django/djang...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question