Skip to content

Commit

Permalink
Adjust example directory structure authentication (#13805)
Browse files Browse the repository at this point in the history
* Adjust example directory structure authentication

The registration directory should be inside the templates directory, but that's not reflected in the example. Visually it looked like registration should be placed in the Django project folder directly (which is not the case).
Since I think the original quote should be kept, I propose to add a few non-breaking space HTML entities to signify the correct place of the registration directory.

* Reformat to code block

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
  • Loading branch information
vmeijer and hamishwillee authored Mar 13, 2022
1 parent c40cf65 commit a4e1bb9
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions files/en-us/learn/server-side/django/authentication/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,16 @@ The URLs (and implicitly, views) that we just added expect to find their associa
For this site, we'll put our HTML pages in the **templates/registration/** directory. This directory should be in your project root directory, i.e the same directory as the **catalog** and **locallibrary** folders. Please create these folders now.

> **Note:** Your folder structure should now look like the below:
> locallibrary (Django project folder) \
> \\_catalog \
> \\_locallibrary \
> \\_templates **(new)** \
> \\_registration
> ```
> locallibrary/ #Django project folder
> catalog/
> locallibrary/
> templates/
> registration/
> ```

To make the **templates** directory visible to the template loader we need to add it in the template search path. Open the project settings (**/locallibrary/locallibrary/settings.py**).
To make the **templates** directory visible to the template loader we need to add it in the template search path.
Open the project settings (**/locallibrary/locallibrary/settings.py**).

Then import the `os` module (add the following line near the top of the file).

Expand Down

0 comments on commit a4e1bb9

Please sign in to comment.