From fc784a2ce56beeecb513a6d8574d1189184db456 Mon Sep 17 00:00:00 2001 From: sosokker Date: Thu, 21 Sep 2023 20:48:47 +0700 Subject: [PATCH] Update Installation Guide and .env --- Installation.md | 14 +++++++++----- sample.env | 6 +++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Installation.md b/Installation.md index 054b207..3b63363 100644 --- a/Installation.md +++ b/Installation.md @@ -31,7 +31,7 @@ or run `setup.ps1` (For Windows User) 2. Run these commands to clone this repository and enter the directory. ```bash git clone https://github.com/Sosokker/ku-polls -cd ku +cd ku-polls ``` 3. (Optional: You can use venv instead)Install virtualenv via pip @@ -41,20 +41,20 @@ python -m pip install --user virtualenv ``` 4. Create virtual environment with `venv` or `virtualenv`. ```bash -python -m virtualenv .venv +python -m virtualenv venv or -python -m venv .venv +python -m venv venv ``` 5. Use `virtual environment` - Windows ```bash -.venv\Scripts\activate +.\venv\Scripts\activate ``` - Linux or MacOS ```bash -source .venv/bin/activate +source venv/bin/activate ``` 6. Install require module. ``` @@ -65,6 +65,10 @@ pip install -r requirements.txt **You can look at `sample.env` for more information and others environment variables to set.** ```bash SECRET_KEY=your_secret_key +DEBUG = False +ALLOWED_HOSTS = *.ku.th, localhost, 127.0.0.1, ::1 +TIME_ZONE = Asia/Bangkok +EMAIL_HOST_PASSWORD = yourpassword ``` You can generate your own `your_secret_key` by this command diff --git a/sample.env b/sample.env index c5af6b1..4c2f812 100644 --- a/sample.env +++ b/sample.env @@ -7,4 +7,8 @@ DEBUG = False # You can use wildcard chars (*) and IP addresses. Use * for any host. ALLOWED_HOSTS = *.ku.th, localhost, 127.0.0.1, ::1 # Your timezone -TIME_ZONE = Asia/Bangkok \ No newline at end of file +TIME_ZONE = Asia/Bangkok +# Password to use for the SMTP server defined in EMAIL_HOST. This setting is used in conjunction +# with EMAIL_HOST_USER when authenticating to the SMTP server. +# If either of these settings is empty, Django won’t attempt authentication. +EMAIL_HOST_PASSWORD=somepassword \ No newline at end of file