Skip to content

Commit e2d9870

Browse files
author
Logan Gingerich
authored
Update README.md
1 parent 70fcb11 commit e2d9870

File tree

1 file changed

+12
-17
lines changed
  • python-django-directory-sync-example

1 file changed

+12
-17
lines changed

python-django-directory-sync-example/README.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ If you get stuck, please reach out to us at [email protected] so we can help.
1313

1414
### Clone Directory
1515

16-
1. In your CLI, navigate to the directory into which you want to clone this git repo.
17-
```bash
18-
$ cd ~/Desktop/
19-
```
20-
21-
2. Clone the main git repo for these Python example apps using your preferred secure method (HTTPS or SSH).
16+
1. Clone the main git repo for these Python example apps using your preferred secure method (HTTPS or SSH).
2217
```bash
2318
# HTTPS
2419
$ git clone https://github.com/workos-inc/python-django-example-applications.git
@@ -31,46 +26,46 @@ If you get stuck, please reach out to us at [email protected] so we can help.
3126
$ git clone [email protected]:workos-inc/python-django-example-applications.git
3227
```
3328

34-
3. Navigate to the Directory Sync example app within the cloned repo.
29+
2. Navigate to the Directory Sync example app within the cloned repo.
3530
```bash
3631
$ cd python-django-example-applications/python-django-directory-sync-example
3732
````
3833

3934
### Install Dependencies
4035

41-
4. Create and source a Python virtual environment. You should then see `(env)` at the beginning of your command-line prompt.
36+
3. Create and source a Python virtual environment. You should then see `(env)` at the beginning of your command-line prompt.
4237
```bash
4338
$ python3 -m venv env
4439
$ source env/bin/activate
4540
(env) $
4641
```
4742

48-
5. Install the cloned app's dependencies. If the `pip` command doesn't work, try `pip3` instead.
43+
4. Install the cloned app's dependencies. If the `pip` command doesn't work, try `pip3` instead.
4944
```bash
5045
(env) $ pip install -r requirements.txt
5146
```
5247

5348
### Set Environment Variables
5449

55-
6. Obtain and make note of the following values. In the next step, these will be set as environment variables.
50+
5. Obtain and make note of the following values. In the next step, these will be set as environment variables.
5651
- Your [WorkOS API key](https://dashboard.workos.com/api-keys)
5752
- Your `WEBHOOKS_SECRET`, retrievable from the URL in the WEBHOOKS area of the WorkOS dashboard. This is only required if you are utilizing the webhooks route of this application to receive and validate webhook events.
5853

59-
7. Ensure you're in the root directory for the example app, `python-django-directory-sync-example/`. Create a `.env` file to securely store the environment variables. Open this file with the Nano text editor. (This file is listed in this repo's `.gitignore` file, so your sensitive information will not be checked into version control.)
54+
6. Ensure you're in the root directory for the example app, `python-django-directory-sync-example/`. Create a `.env` file to securely store the environment variables. Open this file with the Nano text editor. (This file is listed in this repo's `.gitignore` file, so your sensitive information will not be checked into version control.)
6055
```bash
6156
(env) $ touch .env
6257
(env) $ nano .env
6358
```
6459

65-
8. Once the Nano text editor opens, you can directly edit the `.env` file by listing the environment variables:
60+
7. Once the Nano text editor opens, you can directly edit the `.env` file by listing the environment variables:
6661
```bash
6762
export WORKOS_API_KEY=<value found in step 6>
6863
export WEBHOOKS_SECRET=<value found in step 6>
6964
```
7065

7166
To exit the Nano text editor, type `CTRL + x`. When prompted to "Save modified buffer", type `Y`, then press the `Enter` or `Return` key.
7267

73-
9. Source the environment variables so they are accessible to the operating system.
68+
8. Source the environment variables so they are accessible to the operating system.
7469
```bash
7570
(env) $ source .env
7671
```
@@ -83,7 +78,7 @@ If you get stuck, please reach out to us at [email protected] so we can help.
8378

8479
### Run Django Migrations and Start Server
8580

86-
10. Run the Django migrations. Again, ensure you're in the `python-django-directory-sync-example/` directory where the `manange.py` file is.
81+
9. Run the Django migrations. Again, ensure you're in the `python-django-directory-sync-example/` directory where the `manange.py` file is.
8782
```bash
8883
(env) $ python3 manage.py migrate
8984
```
@@ -98,7 +93,7 @@ If you get stuck, please reach out to us at [email protected] so we can help.
9893
. . .
9994
```
10095
101-
11. Start the server.
96+
10. Start the server.
10297
```bash
10398
(env) $ python3 manage.py runserver
10499
```
@@ -120,14 +115,14 @@ If you get stuck, please reach out to us at [email protected] so we can help.
120115
Quit the server with CONTROL-C.
121116
```
122117

123-
12. Once the server is running, navigate to http://localhost:8000 to view the home page of the app where you can then select the view for users or groups.
118+
11. Once the server is running, navigate to http://localhost:8000 to view the home page of the app where you can then select the view for users or groups.
124119

125120
- The `/users` URL corresponds to the WorkOS API's [List Directory Users endpoint](https://workos.com/docs/reference/directory-sync/user/list)
126121
- The `/groups` URL corresponds to the WorkOS API's [List Directory Groups endpoint](https://workos.com/docs/reference/directory-sync/group/list)
127122
- You can extend this Django example app by adding views to `directory_sync/views.py` for the other available [Directory Sync API endpoints](https://workos.com/docs/reference/directory-sync).
128123

129124

130-
13. WorkOS sends Webhooks as a way of managing updates to Directory Sync connections. The Webhooks section of the WorkOS Dashboard allows you to send test webhooks to your application. The Test Webhooks section of this application allows you to visualize the validated webhooks directly in this application in real-time. [Please review the tutorial here](https://workos.com/blog/test-workos-webhooks-locally-ngrok) for details on how this can be done locally.
125+
12. WorkOS sends Webhooks as a way of managing updates to Directory Sync connections. The Webhooks section of the WorkOS Dashboard allows you to send test webhooks to your application. The Test Webhooks section of this application allows you to visualize the validated webhooks directly in this application in real-time. [Please review the tutorial here](https://workos.com/blog/test-workos-webhooks-locally-ngrok) for details on how this can be done locally.
131126

132127
## Need help?
133128

0 commit comments

Comments
 (0)