From b222ec20f5fdd5e2d994e4dea0e1e6bad46e4bd4 Mon Sep 17 00:00:00 2001 From: Jay Date: Tue, 28 Jul 2020 08:25:29 -0700 Subject: [PATCH 1/3] Update readme.md for windows compatibility. Using python interpreter instead of bash because it ignores line endings and will work on all platforms --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9124b9f6..72762a9d 100644 --- a/README.md +++ b/README.md @@ -77,13 +77,13 @@ You can access the database through the Adminer front-end or using a local Postg 5. Create a superuser so that you can log into `http://localhost:8000/admin` by running the following in your terminal: ```bash -$ docker-compose run --rm app ./manage.py createsuperuser +$ docker-compose run --rm app python ./manage.py createsuperuser ``` 6. You can populate the database with some random test data for development purposes by running ```bash -$ docker-compose run --rm app ./manage.py init_data +$ docker-compose run --rm app python ./manage.py init_data ``` All user accounts created by this command have the password `codebuddies`. @@ -91,7 +91,7 @@ All user accounts created by this command have the password `codebuddies`. See the `init_data --help` command for more information: ```bash -$ docker-compose run --rm app ./manage.py init_data --help +$ docker-compose run --rm app python ./manage.py init_data --help usage: manage.py init_data [-h] [--clear-db] [--num-users NUM-USERS] [--num-tags NUM-TAGS] @@ -157,14 +157,14 @@ If you would like to tail the logs in the console then you remove the detach fla The following are examples of some common Django management commands that you may need to run. -- Make Migrations: `docker-compose run --rm app ./manage.py makemigrations` -- Merge Migrations: `docker-compose run --rm app ./manage.py makemigrations --merge` -- Run Migrations: `docker-compose run --rm app ./manage.py migrate` +- Make Migrations: `docker-compose run --rm app python ./manage.py makemigrations` +- Merge Migrations: `docker-compose run --rm app python ./manage.py makemigrations --merge` +- Run Migrations: `docker-compose run --rm app python ./manage.py migrate` To see the full list of management commands use `help`. ```plain -docker-compose run --rm app ./manage.py help +docker-compose run --rm app python ./manage.py help ``` ### Postman From bc1b3cd48d195b460a1f9348db9a80e08cceb47e Mon Sep 17 00:00:00 2001 From: Jay Date: Tue, 28 Jul 2020 18:34:13 -0700 Subject: [PATCH 2/3] Changed Postman Instruction to add the currect address to the right fields in dev environment --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 72762a9d..8fbbc87d 100644 --- a/README.md +++ b/README.md @@ -193,8 +193,8 @@ Linux, 2. Once you have Postman open, click on file -> import and import the .json file 3. Click on the settings gear icon on the far top right (next to the eye icon) and click to add a new environment. -4. Name your environment `dev` and create a variable called `api_url`. Give it a value of `https://localhost:8000`, which is the URL of your Django dev environment when it is running. -5. Now, as long you have the Django app (https://localhost:8000) running, you should be able to make requests like POST Create User and POST Authenticate. +4. Name your environment `dev` and create a variable called `api_url`. For both the "Initial Value" and "Current Value," fill in `http://localhost:8000` which is the URL of your Django dev environment when it is running. +5. Now, as long you have the Django app (http://localhost:8000) running, you should be able to make requests like POST Create User and POST Authenticate. Click on this link to see what you should expect: https://imgur.com/hd9VB6k - `POST` Create User will create a new user in your `localhost:8000` running Django app, @@ -202,7 +202,7 @@ Linux, ![screenshot of Postman environment variable setup](https://i.imgur.com/6Uq9XQp.png) -5. Now, as long you have the Django app (https://localhost:8000) running, you should be able to make requests like `POST Create User` and `POST Authenticate` by clicking on the blue "Send" button in Postman. +5. Now, as long you have the Django app (http://localhost:8000) running, you should be able to make requests like `POST Create User` and `POST Authenticate` by clicking on the blue "Send" button in Postman. From 163c60fcf7f6288a4823c4086d3b12b9cc2805eb Mon Sep 17 00:00:00 2001 From: Jay Date: Thu, 30 Jul 2020 17:22:30 -0700 Subject: [PATCH 3/3] Update Postman image to include Current Value field entry --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8fbbc87d..f1097370 100644 --- a/README.md +++ b/README.md @@ -200,7 +200,7 @@ Linux, - `POST` Create User will create a new user in your `localhost:8000` running Django app, - making a request to `POST Authenticate` will authenticate whether or not that user exists. -![screenshot of Postman environment variable setup](https://i.imgur.com/6Uq9XQp.png) +![screenshot of Postman environment variable setup](https://user-images.githubusercontent.com/4512699/88751261-14fa9280-d10c-11ea-80c4-2934c27254ad.png) 5. Now, as long you have the Django app (http://localhost:8000) running, you should be able to make requests like `POST Create User` and `POST Authenticate` by clicking on the blue "Send" button in Postman.