diff --git a/README.md b/README.md index 3daa52c..5a37de7 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,21 @@ The samples require the following to run. ### Python sample via VS Code 1. Open the [Python Django](https://github.com/boldbi/react-with-python/tree/master/python/django-sample-master) folder in Visual Studio Code. + 2. Install Python dependencies from the `requirements.txt` file (located in the same `python` folder). In the terminal run: - 2. Open the terminal in Visual Studio Code and execute the command `python manage.py runserver` to run the application. It will display a URL in the command line interface, typically something like http://localhost:8000. Copy this URL and paste it into your default web browser, as shown in the image below. + ```powershell + py -m pip install -r requirements.txt + ``` - ![backend image](/images/backend-api.png) + 3. Open the terminal in Visual Studio Code and execute the command `py manage.py runserver` to run the application. It will display a URL in the command line interface, typically something like http://localhost:8000. Copy this URL and paste it into your default web browser, as shown in the image below. + + If port `8000` is already in use or not accessible, run the server on a different port, for example: + + ```powershell + py manage.py runserver 9000 + ``` + + Replace the port `9000` in `apiHost` within `Dashboard.js`. ### React sample via VS Code diff --git a/React/package.json b/React/package.json index a322dbc..4c0ea8f 100644 --- a/React/package.json +++ b/React/package.json @@ -3,11 +3,11 @@ "version": "0.1.0", "private": true, "dependencies": { - "@boldbi/boldbi-embedded-sdk": "^15.1.65", + "@boldbi/boldbi-embedded-sdk": "^15.2.6", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.4.0", "@testing-library/user-event": "^7.2.1", - "axios": ">=1.12.0", + "axios": "1.13.5", "jquery": "^3.5.1", "react": "^16.12.0", "react-dom": "^16.12.0", diff --git a/python/django-sample-master/requirements.txt b/python/django-sample-master/requirements.txt new file mode 100644 index 0000000..f60ebf3 Binary files /dev/null and b/python/django-sample-master/requirements.txt differ