Link to live site.
-
/ - views all the items e.g gracious-butterfly-85177.pktriot.net
-
add/ - creates an item e.g gracious-butterfly-85177.pktriot.net
To add an item:
{
"name": "Item <the number>",
}
For more directions link
- int:pk - to view an item by index e.g. gracious-butterfly-85177.pktriot.net/1/
- int:pk/update - Edits an item e.g. gracious-butterfly-85177.pktriot.net/1/update
{
"name": "Item <the number>",
}
- int:pk/delete - Deletes an item e.g. gracious-butterfly-85177.pktriot.net/1/update
Enter your terminal and type:
git clone https://github.com/JeromeMberia/project_z.git
cd project_z
py -m venv venv
.\venv\Scripts\activate
pip install -r requirements.txt
cd .\myproject\
py manage.py makemigrations
py manage.py py migrate
py manage.py runserver
I would usually add .env
file on the root directory of the project and place the DEBUG and SECRET_KEY in it.
In your terminal cd
to the project
pip install python-decouple
To save the library in requirements.txt
file
python -m pip freeze > requirements.txt
Enter the setting.py
file found in .\myproject\myproject\setting.py
At the top of the file near from pathlib import Path
this line of code, under it add this:
from decouple import configThen you change
SECRET_KEY
andDEBUG
to this:SECRET_KEY = config('SECRET_KEY') DEBUG = config('DEBUG')
create the .env
file
New-Item -Path ".env"
Type on the
.env
file thisSECRET_KEY=<SECRET_KEY> DEBUG=<True or False>
This repository will be private on the 28th of July 2023.