Skip to content

Commit 9c7f96e

Browse files
author
Logan Gingerich
authored
Update README.md
1 parent e2d9870 commit 9c7f96e

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

python-django-magic-link-example/README.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@ A basic Django app that uses the [WorkOS Python SDK](https://github.com/workos-i
77

88
### Clone Directory
99

10-
1. In your CLI, navigate to the directory into which you want to clone this git repo.
11-
```bash
12-
$ cd ~/Desktop/
13-
```
14-
15-
2. Clone the main git repo for these Python example apps using your preferred secure method (HTTPS or SSH).
10+
1. Clone the main git repo for these Python example apps using your preferred secure method (HTTPS or SSH).
1611
```bash
1712
# HTTPS
1813
$ git clone https://github.com/workos-inc/python-django-example-applications.git
@@ -25,47 +20,47 @@ A basic Django app that uses the [WorkOS Python SDK](https://github.com/workos-i
2520
$ git clone [email protected]:workos-inc/python-django-example-applications.git
2621
```
2722

28-
3. Navigate to the Admin Portal example app within the cloned repo.
23+
2. Navigate to the Admin Portal example app within the cloned repo.
2924
```bash
3025
$ cd python-django-example-applications/python-django-magic-link-example
3126
```
3227

3328
### Install Dependencies
3429

35-
4. Create and source a Python virtual environment. You should then see `(env)` at the beginning of your command-line prompt.
30+
3. Create and source a Python virtual environment. You should then see `(env)` at the beginning of your command-line prompt.
3631
```bash
3732
$ python3 -m venv env
3833
$ source env/bin/activate
3934
(env) $
4035
```
4136

42-
5. Move in to the app directory and install the cloned app's dependencies.
37+
4. Move in to the app directory and install the cloned app's dependencies.
4338
```bash
4439
(env) $ cd magic_link_example
4540
(env) $ pip install -r requirements.txt
4641
```
4742

4843
### Set Environment Variables
4944

50-
6. Obtain and make note of the following values. In the next step, these will be set as environment variables.
45+
5. Obtain and make note of the following values. In the next step, these will be set as environment variables.
5146
- Your [WORKOS_API_KEY](https://dashboard.workos.com/api-keys)
5247
- Your `WORKOS_CLIENT_ID`, in the format `client_<random-alphanumeric-string>`, retrievable from WorkOS dashboard under Configuration.
5348

54-
7. Ensure you're in the root app directory for the example app, `magic_link_example/` where the `manage.py` file resides. 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.)
49+
6. Ensure you're in the root app directory for the example app, `magic_link_example/` where the `manage.py` file resides. 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.)
5550
```bash
5651
(env) $ touch .env
5752
(env) $ nano .env
5853
```
5954

60-
8. Once the Nano text editor opens, you can directly edit the `.env` file by listing the environment variables:
55+
7. Once the Nano text editor opens, you can directly edit the `.env` file by listing the environment variables:
6156
```bash
6257
export WORKOS_API_KEY=<value found in step 6>
6358
export WORKOS_CLIENT_ID=<value found in step 6>
6459
```
6560

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

68-
9. Source the environment variables so they are accessible to the operating system.
63+
8. Source the environment variables so they are accessible to the operating system.
6964
```bash
7065
(env) $ source .env
7166
```
@@ -76,7 +71,7 @@ A basic Django app that uses the [WorkOS Python SDK](https://github.com/workos-i
7671
(env) $ echo $WORKOS_CLIENT_ID
7772
```
7873

79-
10. Run the Django migrations. Again, ensure you're in the `magic_link_example/` directory where the `manange.py` file is.
74+
9. Run the Django migrations. Again, ensure you're in the `magic_link_example/` directory where the `manange.py` file is.
8075
```bash
8176
(env) $ python3 manage.py migrate
8277
```
@@ -91,14 +86,14 @@ A basic Django app that uses the [WorkOS Python SDK](https://github.com/workos-i
9186
. . .
9287
```
9388
94-
11. Update the default redirect URI in your WorkOS Dashboard
89+
10. Update the default redirect URI in your WorkOS Dashboard
9590
9691
To configure the page where the user will be redirected after logging in with the Magic Link you'll need to set the default redirect_uri to http://localhost:8000/success.
9792

9893

9994
## Start the server
10095

101-
12. Start the server.
96+
11. Start the server.
10297

10398
To serve static files in development while still having `debug=True` in settings.py to able to send requests to WorkOS, be sure to include the `--insecure` flag when starting the server locally.
10499
```bash
@@ -118,7 +113,7 @@ A basic Django app that uses the [WorkOS Python SDK](https://github.com/workos-i
118113
Quit the server with CONTROL-C.
119114
```
120115
121-
13. Once the server is running, navigate to http://localhost:8000 to view the home page of the app where you can enter the email you'd like to send a Magic Link to. The app will send a Magic Link to the submitted email and also bring you to a page which also has the magic link included. Click on the link and you'll be logged in!
116+
12. Once the server is running, navigate to http://localhost:8000 to view the home page of the app where you can enter the email you'd like to send a Magic Link to. The app will send a Magic Link to the submitted email and also bring you to a page which also has the magic link included. Click on the link and you'll be logged in!
122117
123118
## Need help?
124119

0 commit comments

Comments
 (0)