When running on Linux, the following steps can simply be replaced by
./startup.sh
in the project root.
-
Create python virtual environment
python3.10 -m venv .venv
This will create a virtual environment at
./.venv
. -
Activate the virtual environment in Linux/UNIX:
source ./.venv/bin/activate
Or in Windows:
.venv\Scripts\activate.bat
-
Install required python packages:
pip install -r requirements.txt
-
Enter Django project and perform database migrations:
cd django_restify python3.10 manage.py makemigrations python3.10 manage.py migrate
When running on Linux, the following steps can simply be replaced by
./run.sh
in the project root.
- Activate the Python virtual environment.
- Run the development server:
python3.10 ./manage.py runserver
You should be able to visit http://127.0.0.1:8000/api/ and see the following JSON response:
{
"hello": "world"
}
All additional API endpoints will reside under the /api/
path.