From f6b6813924d0ebf6dbdc464abece1f9b6621219c Mon Sep 17 00:00:00 2001 From: Henrik Mildner Date: Fri, 17 Jan 2025 17:02:20 +0100 Subject: [PATCH] Created Accounts App --- core/accounts/__init__.py | 0 core/accounts/admin.py | 3 +++ core/accounts/apps.py | 6 ++++++ core/accounts/migrations/__init__.py | 0 core/accounts/models.py | 3 +++ core/accounts/tests.py | 3 +++ core/accounts/urls.py | 6 ++++++ core/accounts/views.py | 5 +++++ core/core/urls.py | 3 ++- 9 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 core/accounts/__init__.py create mode 100644 core/accounts/admin.py create mode 100644 core/accounts/apps.py create mode 100644 core/accounts/migrations/__init__.py create mode 100644 core/accounts/models.py create mode 100644 core/accounts/tests.py create mode 100644 core/accounts/urls.py create mode 100644 core/accounts/views.py diff --git a/core/accounts/__init__.py b/core/accounts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/accounts/admin.py b/core/accounts/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/core/accounts/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/core/accounts/apps.py b/core/accounts/apps.py new file mode 100644 index 0000000..3e3c765 --- /dev/null +++ b/core/accounts/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class AccountsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'accounts' diff --git a/core/accounts/migrations/__init__.py b/core/accounts/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/accounts/models.py b/core/accounts/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/core/accounts/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/core/accounts/tests.py b/core/accounts/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/core/accounts/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/core/accounts/urls.py b/core/accounts/urls.py new file mode 100644 index 0000000..6a2709e --- /dev/null +++ b/core/accounts/urls.py @@ -0,0 +1,6 @@ +from django.urls import path # type: ignore +from . import views + +urlpatterns = [ + path('', views.home) +] \ No newline at end of file diff --git a/core/accounts/views.py b/core/accounts/views.py new file mode 100644 index 0000000..d622f30 --- /dev/null +++ b/core/accounts/views.py @@ -0,0 +1,5 @@ +from django.shortcuts import render + +# Create your views here. +def home(request): + return render(request, 'accounts/home.html') diff --git a/core/core/urls.py b/core/core/urls.py index de52446..2ad69db 100644 --- a/core/core/urls.py +++ b/core/core/urls.py @@ -14,9 +14,10 @@ Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ -from django.contrib import admin +from django.contrib import admin # type: ignore from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), + path('', include('accounts.urls')) ]