File tree 4 files changed +6
-13
lines changed
4 files changed +6
-13
lines changed Original file line number Diff line number Diff line change 1
1
* .pem
2
- config.ini
2
+ config.ini
3
+ .env
Original file line number Diff line number Diff line change 11
11
"""
12
12
13
13
from pathlib import Path
14
- from configparser import ConfigParser
14
+ import os
15
15
16
- config = ConfigParser ()
17
- config .read ("config.ini" )
18
-
19
- SECRET = config ["app" ]["SECRET_KEY" ]
16
+ SECRET = os .getenv ("SECRET_KEY" )
20
17
21
18
# Build paths inside the project like this: BASE_DIR / 'subdir'.
22
19
BASE_DIR = Path (__file__ ).resolve ().parent .parent
Original file line number Diff line number Diff line change 1
1
# config data
2
- import configparser
3
-
4
- config = configparser .ConfigParser ()
5
- config .read ("config.ini" )
6
-
7
- DB_USERNAME = config ["database" ]["USER_NAME" ]
8
- DB_PASSWORD = config ["database" ]["USER_PASSWORD" ]
2
+ DB_USERNAME = os .getenv ("USER_NAME" )
3
+ DB_PASSWORD = os .getenv ("USER_PASSWORD" )
9
4
10
5
# import dependencies
11
6
import speedtest
You can’t perform that action at this time.
0 commit comments