mirror of
https://github.com/Sosokker/ku-polls.git
synced 2025-12-18 13:04:05 +01:00
Update Installation Guide and .env
This commit is contained in:
parent
c8d35735a6
commit
fc784a2ce5
@ -31,7 +31,7 @@ or run `setup.ps1` (For Windows User)
|
|||||||
2. Run these commands to clone this repository and enter the directory.
|
2. Run these commands to clone this repository and enter the directory.
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/Sosokker/ku-polls
|
git clone https://github.com/Sosokker/ku-polls
|
||||||
cd ku
|
cd ku-polls
|
||||||
```
|
```
|
||||||
|
|
||||||
3. (Optional: You can use venv instead)Install virtualenv via pip
|
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`.
|
4. Create virtual environment with `venv` or `virtualenv`.
|
||||||
```bash
|
```bash
|
||||||
python -m virtualenv .venv
|
python -m virtualenv venv
|
||||||
or
|
or
|
||||||
python -m venv .venv
|
python -m venv venv
|
||||||
```
|
```
|
||||||
5. Use `virtual environment`
|
5. Use `virtual environment`
|
||||||
|
|
||||||
- Windows
|
- Windows
|
||||||
```bash
|
```bash
|
||||||
.venv\Scripts\activate
|
.\venv\Scripts\activate
|
||||||
```
|
```
|
||||||
|
|
||||||
- Linux or MacOS
|
- Linux or MacOS
|
||||||
```bash
|
```bash
|
||||||
source .venv/bin/activate
|
source venv/bin/activate
|
||||||
```
|
```
|
||||||
6. Install require module.
|
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.**
|
**You can look at `sample.env` for more information and others environment variables to set.**
|
||||||
```bash
|
```bash
|
||||||
SECRET_KEY=your_secret_key
|
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
|
You can generate your own `your_secret_key` by this command
|
||||||
|
|||||||
@ -7,4 +7,8 @@ DEBUG = False
|
|||||||
# You can use wildcard chars (*) and IP addresses. Use * for any host.
|
# You can use wildcard chars (*) and IP addresses. Use * for any host.
|
||||||
ALLOWED_HOSTS = *.ku.th, localhost, 127.0.0.1, ::1
|
ALLOWED_HOSTS = *.ku.th, localhost, 127.0.0.1, ::1
|
||||||
# Your timezone
|
# Your timezone
|
||||||
TIME_ZONE = Asia/Bangkok
|
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
|
||||||
Loading…
Reference in New Issue
Block a user