Skip to content

Commit 52a6bab

Browse files
committed
main
refactor
1 parent 58c8015 commit 52a6bab

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed
59 Bytes
Binary file not shown.

frontend/settings.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
from pathlib import Path
1414
import os
1515

16+
from dotenv import load_dotenv
17+
18+
load_dotenv()
19+
1620
SECRET = os.getenv("SECRET_KEY")
1721

1822
# Build paths inside the project like this: BASE_DIR / 'subdir'.
@@ -28,7 +32,8 @@
2832

2933
ALLOWED_HOSTS = [
3034
"python-speedtest.azurewebsites.net",
31-
"http://0.0.0.0:8000",
35+
"0.0.0.0:8000",
36+
"127.0.0.1:8000"
3237
]
3338

3439
# Application definition

main.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
import os
2+
3+
from dotenv import load_dotenv
4+
5+
load_dotenv()
6+
17
# config data
28
DB_USERNAME = os.getenv("USER_NAME")
39
DB_PASSWORD = os.getenv("USER_PASSWORD")
410

5-
611
# import dependencies
712
import speedtest
8-
import os
913
import pymongo
1014
import datetime
1115
import certifi

0 commit comments

Comments
 (0)