changed project key to .env and updated readme
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
# Build
|
||||||
|
|
||||||
|
To update js script
|
||||||
|
|
||||||
|
```
|
||||||
|
rm scripts.js && tsc scripts.ts
|
||||||
|
```
|
||||||
|
|
||||||
|
# Before prod , this need to be on settings.py
|
||||||
|
|
||||||
|
```python
|
||||||
|
REST_FRAMEWORK = {
|
||||||
|
'DEFAULT_RENDERER_CLASSES': [
|
||||||
|
'rest_framework.renderers.JSONRenderer',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
+4
-1
@@ -11,6 +11,8 @@ https://docs.djangoproject.com/en/5.2/ref/settings/
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
import os
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
@@ -20,7 +22,8 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||||||
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
|
||||||
|
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
SECRET_KEY = 'django-insecure-jl%+_1sb3!uvg#1(jdk-q9bhu&4b*n(xy+$cz4n43gnl@=fx*_'
|
load_dotenv()
|
||||||
|
SECRET_KEY = os.getenv('DJANGO_KEY')
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|||||||
Reference in New Issue
Block a user