JeromeMberia / project_z

this Item CRUD API

Home Page:https://gracious-butterfly-85177.pktriot.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Item CRUD API

Link to live site.

Endpoint

To add an item:

  {
  "name": "Item <the number>",
  }

For more directions link

  {
  "name": "Item <the number>",
  }

To Run it

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

On security

I would usually add .env file on the root directory of the project and place the DEBUG and SECRET_KEY in it.

If you would like to implement do this:

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 config

Then you change SECRET_KEY and DEBUG to this:

SECRET_KEY = config('SECRET_KEY')
DEBUG = config('DEBUG')

create the .env file

New-Item -Path ".env"

Type on the .env file this

SECRET_KEY=<SECRET_KEY>
DEBUG=<True or False>

Notice

This repository will be private on the 28th of July 2023.

About

this Item CRUD API

https://gracious-butterfly-85177.pktriot.net/


Languages

Language:Python 100.0%