- PostgreSQL 12 or newer.
- Django 2.0 or newer (including 3.x, 4.x).
- Python 3.6 or newer.
- Clone the repository:
git clone https://github.com/To-n-y/shop-api.git
- Install the requirements:
pip install -r requirements.txt
-
Create an
.env
file using.env.sample
as a guide. Set the value ofDBNAME
to the name of an existing database in your local PostgreSQL instance. Set the values ofDBHOST
,DBUSER
, andDBPASS
as appropriate for your local PostgreSQL instance. If you're in the devcontainer, copy the values from.env.sample.devcontainer
. -
Run the migrations: (or use VS Code "Run" button and select "Migrate")
python manage.py migrate
- Run the local server: (or use VS Code "Run" button and select "Run server")
python manage.py runserver