From a4e1bb9684f7cac4a66352389e19b10970628825 Mon Sep 17 00:00:00 2001 From: Virginia Meijer Date: Mon, 14 Mar 2022 00:36:34 +0100 Subject: [PATCH] Adjust example directory structure authentication (#13805) * 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 --- .../server-side/django/authentication/index.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/files/en-us/learn/server-side/django/authentication/index.md b/files/en-us/learn/server-side/django/authentication/index.md index 31f47a9aa975403..652b361b7c054a8 100644 --- a/files/en-us/learn/server-side/django/authentication/index.md +++ b/files/en-us/learn/server-side/django/authentication/index.md @@ -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).