You want to use environment variables, so I'm going to talk about how to use it.
First, you need to define the variable you want to use on settings.py
Then, you set a variable on the file you want to use.
Here, by using getattr(), you can set the variable. If you don't havr the attribute inside the class, then the third parameter,which is 15 in this case, replace for the variable.
Django with Docker (0) | 2021.01.15 |
---|---|
Relationship between URLS and VIEWS (0) | 2020.10.29 |
Django URL with View (0) | 2020.10.29 |
Django Architecture (0) | 2020.10.29 |
댓글 영역