From 855a4f0f5893925a1f3c459f4725750c0593e92a Mon Sep 17 00:00:00 2001 From: Philipp Date: Fri, 29 Nov 2024 17:36:14 +0100 Subject: [PATCH 1/4] Add project files --- django-user-management/README.md | 40 ++++++ django-user-management/requirements.txt | 1 + .../user_auth_intro/manage.py | 22 +++ .../user_auth_intro/__init__.py | 0 .../user_auth_intro/user_auth_intro/asgi.py | 16 +++ .../user_auth_intro/settings.py | 128 ++++++++++++++++++ .../user_auth_intro/user_auth_intro/urls.py | 7 + .../user_auth_intro/user_auth_intro/wsgi.py | 16 +++ .../user_auth_intro/users/__init__.py | 0 .../user_auth_intro/users/admin.py | 0 .../user_auth_intro/users/apps.py | 6 + .../user_auth_intro/users/forms.py | 6 + .../users/migrations/__init__.py | 0 .../user_auth_intro/users/models.py | 0 .../user_auth_intro/users/templates/base.html | 12 ++ .../users/templates/registration/_logout.html | 6 + .../registration/_password_reset_email.html | 3 + .../users/templates/registration/login.html | 14 ++ .../registration/password_change_done.html | 5 + .../registration/password_change_form.html | 10 ++ .../registration/password_reset_complete.html | 5 + .../registration/password_reset_confirm.html | 10 ++ .../registration/password_reset_done.html | 5 + .../registration/password_reset_form.html | 12 ++ .../users/templates/registration/sign_up.html | 12 ++ .../users/templates/users/dashboard.html | 12 ++ .../user_auth_intro/users/tests.py | 0 .../user_auth_intro/users/urls.py | 9 ++ .../user_auth_intro/users/views.py | 23 ++++ 29 files changed, 380 insertions(+) create mode 100644 django-user-management/README.md create mode 100644 django-user-management/requirements.txt create mode 100755 django-user-management/user_auth_intro/manage.py create mode 100644 django-user-management/user_auth_intro/user_auth_intro/__init__.py create mode 100644 django-user-management/user_auth_intro/user_auth_intro/asgi.py create mode 100644 django-user-management/user_auth_intro/user_auth_intro/settings.py create mode 100644 django-user-management/user_auth_intro/user_auth_intro/urls.py create mode 100644 django-user-management/user_auth_intro/user_auth_intro/wsgi.py create mode 100644 django-user-management/user_auth_intro/users/__init__.py create mode 100644 django-user-management/user_auth_intro/users/admin.py create mode 100644 django-user-management/user_auth_intro/users/apps.py create mode 100644 django-user-management/user_auth_intro/users/forms.py create mode 100644 django-user-management/user_auth_intro/users/migrations/__init__.py create mode 100644 django-user-management/user_auth_intro/users/models.py create mode 100644 django-user-management/user_auth_intro/users/templates/base.html create mode 100644 django-user-management/user_auth_intro/users/templates/registration/_logout.html create mode 100644 django-user-management/user_auth_intro/users/templates/registration/_password_reset_email.html create mode 100644 django-user-management/user_auth_intro/users/templates/registration/login.html create mode 100644 django-user-management/user_auth_intro/users/templates/registration/password_change_done.html create mode 100644 django-user-management/user_auth_intro/users/templates/registration/password_change_form.html create mode 100644 django-user-management/user_auth_intro/users/templates/registration/password_reset_complete.html create mode 100644 django-user-management/user_auth_intro/users/templates/registration/password_reset_confirm.html create mode 100644 django-user-management/user_auth_intro/users/templates/registration/password_reset_done.html create mode 100644 django-user-management/user_auth_intro/users/templates/registration/password_reset_form.html create mode 100644 django-user-management/user_auth_intro/users/templates/registration/sign_up.html create mode 100644 django-user-management/user_auth_intro/users/templates/users/dashboard.html create mode 100644 django-user-management/user_auth_intro/users/tests.py create mode 100644 django-user-management/user_auth_intro/users/urls.py create mode 100644 django-user-management/user_auth_intro/users/views.py diff --git a/django-user-management/README.md b/django-user-management/README.md new file mode 100644 index 0000000000..84618244c9 --- /dev/null +++ b/django-user-management/README.md @@ -0,0 +1,40 @@ +# Get Started With Django User Management + +Follow the [step-by-step instructions](https://realpython.com/django-user-management/) on Real Python. + +## Setup + +You can run the provided example project on your local machine by following the steps outlined below. + +Create a new virtual environment: + +```bash +$ python3 -m venv venv/ +``` + +Activate the virtual environment: + +```bash +$ source venv/bin/activate +``` + +Install the dependencies for this project if you haven't installed them yet: + +```bash +(venv) $ python -m pip install -r requirements.txt +``` + +Make and apply the migrations for the project to build your local database: + +```bash +(venv) $ python manage.py makemigrations +(venv) $ python manage.py migrate +``` + +Run the Django development server: + +```bash +(venv) $ python manage.py runserver +``` + +Navigate to `http://localhost:8000/dashboard` to see the project in action. diff --git a/django-user-management/requirements.txt b/django-user-management/requirements.txt new file mode 100644 index 0000000000..690bf680a6 --- /dev/null +++ b/django-user-management/requirements.txt @@ -0,0 +1 @@ +Django==5.1.3 diff --git a/django-user-management/user_auth_intro/manage.py b/django-user-management/user_auth_intro/manage.py new file mode 100755 index 0000000000..c67a51c556 --- /dev/null +++ b/django-user-management/user_auth_intro/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "user_auth_intro.settings") + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == "__main__": + main() diff --git a/django-user-management/user_auth_intro/user_auth_intro/__init__.py b/django-user-management/user_auth_intro/user_auth_intro/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/django-user-management/user_auth_intro/user_auth_intro/asgi.py b/django-user-management/user_auth_intro/user_auth_intro/asgi.py new file mode 100644 index 0000000000..a86a136712 --- /dev/null +++ b/django-user-management/user_auth_intro/user_auth_intro/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for user_auth_intro project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/5.1/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "user_auth_intro.settings") + +application = get_asgi_application() diff --git a/django-user-management/user_auth_intro/user_auth_intro/settings.py b/django-user-management/user_auth_intro/user_auth_intro/settings.py new file mode 100644 index 0000000000..41db9704f8 --- /dev/null +++ b/django-user-management/user_auth_intro/user_auth_intro/settings.py @@ -0,0 +1,128 @@ +""" +Django settings for user_auth_intro project. + +Generated by 'django-admin startproject' using Django 5.1.3. + +For more information on this file, see +https://docs.djangoproject.com/en/5.1/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/5.1/ref/settings/ +""" + +from pathlib import Path + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = ( + "django-insecure-%&$tji0geb7vpx8@9-&qbf3_%3$s=5*5amo4tr)yg!6&6@bbhl" +) + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + +EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" + + +# Application definition + +INSTALLED_APPS = [ + "users.apps.UsersConfig", + "django.contrib.admin", + "django.contrib.auth", + "django.contrib.contenttypes", + "django.contrib.sessions", + "django.contrib.messages", + "django.contrib.staticfiles", +] + +MIDDLEWARE = [ + "django.middleware.security.SecurityMiddleware", + "django.contrib.sessions.middleware.SessionMiddleware", + "django.middleware.common.CommonMiddleware", + "django.middleware.csrf.CsrfViewMiddleware", + "django.contrib.auth.middleware.AuthenticationMiddleware", + "django.contrib.messages.middleware.MessageMiddleware", + "django.middleware.clickjacking.XFrameOptionsMiddleware", +] + +ROOT_URLCONF = "user_auth_intro.urls" + +TEMPLATES = [ + { + "BACKEND": "django.template.backends.django.DjangoTemplates", + "DIRS": [], + "APP_DIRS": True, + "OPTIONS": { + "context_processors": [ + "django.template.context_processors.debug", + "django.template.context_processors.request", + "django.contrib.auth.context_processors.auth", + "django.contrib.messages.context_processors.messages", + ], + }, + }, +] + +WSGI_APPLICATION = "user_auth_intro.wsgi.application" + + +# Database +# https://docs.djangoproject.com/en/5.1/ref/settings/#databases + +DATABASES = { + "default": { + "ENGINE": "django.db.backends.sqlite3", + "NAME": BASE_DIR / "db.sqlite3", + } +} + + +# Password validation +# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", + }, + { + "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator", + }, + { + "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator", + }, + { + "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator", + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/5.1/topics/i18n/ + +LANGUAGE_CODE = "en-us" + +TIME_ZONE = "UTC" + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/5.1/howto/static-files/ + +STATIC_URL = "static/" + +# Default primary key field type +# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" diff --git a/django-user-management/user_auth_intro/user_auth_intro/urls.py b/django-user-management/user_auth_intro/user_auth_intro/urls.py new file mode 100644 index 0000000000..b9a774f5ea --- /dev/null +++ b/django-user-management/user_auth_intro/user_auth_intro/urls.py @@ -0,0 +1,7 @@ +from django.contrib import admin +from django.urls import include, path + +urlpatterns = [ + path("", include("users.urls")), + path("admin/", admin.site.urls), +] diff --git a/django-user-management/user_auth_intro/user_auth_intro/wsgi.py b/django-user-management/user_auth_intro/user_auth_intro/wsgi.py new file mode 100644 index 0000000000..8413683629 --- /dev/null +++ b/django-user-management/user_auth_intro/user_auth_intro/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for user_auth_intro project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/5.1/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "user_auth_intro.settings") + +application = get_wsgi_application() diff --git a/django-user-management/user_auth_intro/users/__init__.py b/django-user-management/user_auth_intro/users/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/django-user-management/user_auth_intro/users/admin.py b/django-user-management/user_auth_intro/users/admin.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/django-user-management/user_auth_intro/users/apps.py b/django-user-management/user_auth_intro/users/apps.py new file mode 100644 index 0000000000..88f7b1798e --- /dev/null +++ b/django-user-management/user_auth_intro/users/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class UsersConfig(AppConfig): + default_auto_field = "django.db.models.BigAutoField" + name = "users" diff --git a/django-user-management/user_auth_intro/users/forms.py b/django-user-management/user_auth_intro/users/forms.py new file mode 100644 index 0000000000..37ef39ddbd --- /dev/null +++ b/django-user-management/user_auth_intro/users/forms.py @@ -0,0 +1,6 @@ +from django.contrib.auth.forms import UserCreationForm + + +class CustomUserCreationForm(UserCreationForm): + class Meta(UserCreationForm.Meta): + fields = UserCreationForm.Meta.fields + ("email",) diff --git a/django-user-management/user_auth_intro/users/migrations/__init__.py b/django-user-management/user_auth_intro/users/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/django-user-management/user_auth_intro/users/models.py b/django-user-management/user_auth_intro/users/models.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/django-user-management/user_auth_intro/users/templates/base.html b/django-user-management/user_auth_intro/users/templates/base.html new file mode 100644 index 0000000000..3b233d2011 --- /dev/null +++ b/django-user-management/user_auth_intro/users/templates/base.html @@ -0,0 +1,12 @@ + + + + + User Management Intro + + +

Welcome!

+ {% block content %} + {% endblock content %} + + diff --git a/django-user-management/user_auth_intro/users/templates/registration/_logout.html b/django-user-management/user_auth_intro/users/templates/registration/_logout.html new file mode 100644 index 0000000000..938250f08d --- /dev/null +++ b/django-user-management/user_auth_intro/users/templates/registration/_logout.html @@ -0,0 +1,6 @@ +
+ {% csrf_token %} + {{ form.as_p }} + + +
diff --git a/django-user-management/user_auth_intro/users/templates/registration/_password_reset_email.html b/django-user-management/user_auth_intro/users/templates/registration/_password_reset_email.html new file mode 100644 index 0000000000..b29cbc9e2d --- /dev/null +++ b/django-user-management/user_auth_intro/users/templates/registration/_password_reset_email.html @@ -0,0 +1,3 @@ +Someone asked for password reset for email {{ email }}. +Follow the link below to reset your password: +{{ protocol }}://{{ domain }}{% url "users:password_reset_confirm" uidb64=uid token=token %} diff --git a/django-user-management/user_auth_intro/users/templates/registration/login.html b/django-user-management/user_auth_intro/users/templates/registration/login.html new file mode 100644 index 0000000000..031a80676d --- /dev/null +++ b/django-user-management/user_auth_intro/users/templates/registration/login.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} +{% block content %} +

Login

+
+ {% csrf_token %} + {{ form.as_p }} + + +
+

+ Forgot your password? + Back to dashboard +

+{% endblock content %} diff --git a/django-user-management/user_auth_intro/users/templates/registration/password_change_done.html b/django-user-management/user_auth_intro/users/templates/registration/password_change_done.html new file mode 100644 index 0000000000..fe4de16bff --- /dev/null +++ b/django-user-management/user_auth_intro/users/templates/registration/password_change_done.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} +{% block content %} +

Password changed

+ Back to dashboard +{% endblock content %} diff --git a/django-user-management/user_auth_intro/users/templates/registration/password_change_form.html b/django-user-management/user_auth_intro/users/templates/registration/password_change_form.html new file mode 100644 index 0000000000..cb7bfa1701 --- /dev/null +++ b/django-user-management/user_auth_intro/users/templates/registration/password_change_form.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% block content %} +

Change password

+
+ {% csrf_token %} + {{ form.as_p }} + +
+ Back to dashboard +{% endblock content %} diff --git a/django-user-management/user_auth_intro/users/templates/registration/password_reset_complete.html b/django-user-management/user_auth_intro/users/templates/registration/password_reset_complete.html new file mode 100644 index 0000000000..85c89b5f22 --- /dev/null +++ b/django-user-management/user_auth_intro/users/templates/registration/password_reset_complete.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} +{% block content %} +

Password reset completed

+ Login +{% endblock content %} diff --git a/django-user-management/user_auth_intro/users/templates/registration/password_reset_confirm.html b/django-user-management/user_auth_intro/users/templates/registration/password_reset_confirm.html new file mode 100644 index 0000000000..1f98383069 --- /dev/null +++ b/django-user-management/user_auth_intro/users/templates/registration/password_reset_confirm.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% block content %} +

Confirm password reset

+
+ {% csrf_token %} + {{ form.as_p }} + +
+ Back to dashboard +{% endblock content %} diff --git a/django-user-management/user_auth_intro/users/templates/registration/password_reset_done.html b/django-user-management/user_auth_intro/users/templates/registration/password_reset_done.html new file mode 100644 index 0000000000..d6aa80f9db --- /dev/null +++ b/django-user-management/user_auth_intro/users/templates/registration/password_reset_done.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} +{% block content %} +

Password reset link sent

+ Back to dashboard +{% endblock content %} diff --git a/django-user-management/user_auth_intro/users/templates/registration/password_reset_form.html b/django-user-management/user_auth_intro/users/templates/registration/password_reset_form.html new file mode 100644 index 0000000000..fb3ce5c3e4 --- /dev/null +++ b/django-user-management/user_auth_intro/users/templates/registration/password_reset_form.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} +{% block content %} +

Send password reset link

+
+ {% csrf_token %} + {{ form.as_p }} + +
+

+ Back to dashboard +

+{% endblock content %} diff --git a/django-user-management/user_auth_intro/users/templates/registration/sign_up.html b/django-user-management/user_auth_intro/users/templates/registration/sign_up.html new file mode 100644 index 0000000000..0e1785b302 --- /dev/null +++ b/django-user-management/user_auth_intro/users/templates/registration/sign_up.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} +{% block content %} +

Sign Up

+
+ {% csrf_token %} + {{ form.as_p }} + +
+

+ Back to dashboard +

+{% endblock content %} diff --git a/django-user-management/user_auth_intro/users/templates/users/dashboard.html b/django-user-management/user_auth_intro/users/templates/users/dashboard.html new file mode 100644 index 0000000000..c54024366b --- /dev/null +++ b/django-user-management/user_auth_intro/users/templates/users/dashboard.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} +{% block content %} + Hello, {{ user.username|default:"Guest" }}! +
+ {% if user.is_authenticated %} + {% include "registration/_logout.html" %} + Change password + {% else %} + Login + Sign up + {% endif %} +{% endblock content %} diff --git a/django-user-management/user_auth_intro/users/tests.py b/django-user-management/user_auth_intro/users/tests.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/django-user-management/user_auth_intro/users/urls.py b/django-user-management/user_auth_intro/users/urls.py new file mode 100644 index 0000000000..ddbe2d3935 --- /dev/null +++ b/django-user-management/user_auth_intro/users/urls.py @@ -0,0 +1,9 @@ +from django.urls import include, path +from . import views + + +urlpatterns = [ + path("accounts/", include("django.contrib.auth.urls")), + path("dashboard/", views.dashboard, name="dashboard"), + path("sign_up/", views.sign_up, name="sign_up"), +] diff --git a/django-user-management/user_auth_intro/users/views.py b/django-user-management/user_auth_intro/users/views.py new file mode 100644 index 0000000000..65ada51345 --- /dev/null +++ b/django-user-management/user_auth_intro/users/views.py @@ -0,0 +1,23 @@ +from django.contrib.auth import login + +# Remove: from django.contrib.auth.forms import UserCreationForm +from django.shortcuts import redirect, render +from django.urls import reverse + +from .forms import CustomUserCreationForm + + +def dashboard(request): + return render(request, "users/dashboard.html") + + +def sign_up(request): + if request.method == "POST": + form = CustomUserCreationForm(request.POST) + if form.is_valid(): + user = form.save() + login(request, user) + return redirect(reverse("users:dashboard")) + else: + form = CustomUserCreationForm() + return render(request, "registration/sign_up.html", {"form": form}) From 22cca8d65817a24565b045d191dd43f77b5c799a Mon Sep 17 00:00:00 2001 From: Philipp Date: Fri, 29 Nov 2024 18:23:21 +0100 Subject: [PATCH 2/4] Fix import --- django-user-management/user_auth_intro/users/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django-user-management/user_auth_intro/users/urls.py b/django-user-management/user_auth_intro/users/urls.py index ddbe2d3935..242774ac89 100644 --- a/django-user-management/user_auth_intro/users/urls.py +++ b/django-user-management/user_auth_intro/users/urls.py @@ -1,6 +1,6 @@ from django.urls import include, path -from . import views +from . import views urlpatterns = [ path("accounts/", include("django.contrib.auth.urls")), From fedf4314537f61f438759b8d262d256b681b1a62 Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 2 Dec 2024 14:55:24 +0100 Subject: [PATCH 3/4] Remove namespaced URL relicts and delete unused file --- .../users/templates/registration/_password_reset_email.html | 3 --- .../user_auth_intro/users/templates/registration/sign_up.html | 2 +- django-user-management/user_auth_intro/users/views.py | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 django-user-management/user_auth_intro/users/templates/registration/_password_reset_email.html diff --git a/django-user-management/user_auth_intro/users/templates/registration/_password_reset_email.html b/django-user-management/user_auth_intro/users/templates/registration/_password_reset_email.html deleted file mode 100644 index b29cbc9e2d..0000000000 --- a/django-user-management/user_auth_intro/users/templates/registration/_password_reset_email.html +++ /dev/null @@ -1,3 +0,0 @@ -Someone asked for password reset for email {{ email }}. -Follow the link below to reset your password: -{{ protocol }}://{{ domain }}{% url "users:password_reset_confirm" uidb64=uid token=token %} diff --git a/django-user-management/user_auth_intro/users/templates/registration/sign_up.html b/django-user-management/user_auth_intro/users/templates/registration/sign_up.html index 0e1785b302..66894c1493 100644 --- a/django-user-management/user_auth_intro/users/templates/registration/sign_up.html +++ b/django-user-management/user_auth_intro/users/templates/registration/sign_up.html @@ -7,6 +7,6 @@

Sign Up

- Back to dashboard + Back to dashboard

{% endblock content %} diff --git a/django-user-management/user_auth_intro/users/views.py b/django-user-management/user_auth_intro/users/views.py index 65ada51345..fb0c0069c8 100644 --- a/django-user-management/user_auth_intro/users/views.py +++ b/django-user-management/user_auth_intro/users/views.py @@ -17,7 +17,7 @@ def sign_up(request): if form.is_valid(): user = form.save() login(request, user) - return redirect(reverse("users:dashboard")) + return redirect(reverse("dashboard")) else: form = CustomUserCreationForm() return render(request, "registration/sign_up.html", {"form": form}) From ce9cc173b59452564b3ff130f530a2c1d499bc02 Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 2 Dec 2024 20:55:10 +0100 Subject: [PATCH 4/4] Update Readme instructions and requirements --- django-user-management/README.md | 6 ++++++ django-user-management/requirements.txt | 2 ++ 2 files changed, 8 insertions(+) diff --git a/django-user-management/README.md b/django-user-management/README.md index 84618244c9..d70eeeb218 100644 --- a/django-user-management/README.md +++ b/django-user-management/README.md @@ -24,6 +24,12 @@ Install the dependencies for this project if you haven't installed them yet: (venv) $ python -m pip install -r requirements.txt ``` +Navigate into the project's directory: + +```bash +(venv) $ cd user_auth_intro/ +``` + Make and apply the migrations for the project to build your local database: ```bash diff --git a/django-user-management/requirements.txt b/django-user-management/requirements.txt index 690bf680a6..e2ae4cc169 100644 --- a/django-user-management/requirements.txt +++ b/django-user-management/requirements.txt @@ -1 +1,3 @@ +asgiref==3.8.1 Django==5.1.3 +sqlparse==0.5.2