+
+
Sign Up
+
+ {% if messages %}
+ {% for message in messages %}
+
+ {{ message }}
+
+ {% endfor %}
+ {% endif %}
+
+
+
+
+
+
+{% endblock %}
diff --git a/synergy_pro/users/__init__.py b/synergy_pro/users/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/synergy_pro/users/admin.py b/synergy_pro/users/admin.py
new file mode 100644
index 0000000..8c38f3f
--- /dev/null
+++ b/synergy_pro/users/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/synergy_pro/users/apps.py b/synergy_pro/users/apps.py
new file mode 100644
index 0000000..72b1401
--- /dev/null
+++ b/synergy_pro/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/synergy_pro/users/forms.py b/synergy_pro/users/forms.py
new file mode 100644
index 0000000..a0b8387
--- /dev/null
+++ b/synergy_pro/users/forms.py
@@ -0,0 +1,10 @@
+from django import forms
+from django.contrib.auth.models import User
+from django.contrib.auth.forms import UserCreationForm
+
+class UserRegisterForm(UserCreationForm):
+ email = forms.EmailField(required=True)
+
+ class Meta:
+ model = User
+ fields = ['username', 'email', 'password1', 'password2']
diff --git a/synergy_pro/users/migrations/__init__.py b/synergy_pro/users/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/synergy_pro/users/models.py b/synergy_pro/users/models.py
new file mode 100644
index 0000000..71a8362
--- /dev/null
+++ b/synergy_pro/users/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/synergy_pro/users/tests.py b/synergy_pro/users/tests.py
new file mode 100644
index 0000000..7ce503c
--- /dev/null
+++ b/synergy_pro/users/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/synergy_pro/users/urls.py b/synergy_pro/users/urls.py
new file mode 100644
index 0000000..2e317d6
--- /dev/null
+++ b/synergy_pro/users/urls.py
@@ -0,0 +1,10 @@
+from django.urls import path
+from django.contrib.auth import views as auth_views
+from . import views
+
+urlpatterns = [
+ path('login/', auth_views.LoginView.as_view(template_name='users/registration/login.html'), name='login'),
+ path('logout/', auth_views.LogoutView.as_view(template_name='users/registration/logged_out.html'), name='logout'),
+ path('signup/' ,views.signup, name='signup'),
+ # Add other views like registration here later
+]
diff --git a/synergy_pro/users/views.py b/synergy_pro/users/views.py
new file mode 100644
index 0000000..c54a400
--- /dev/null
+++ b/synergy_pro/users/views.py
@@ -0,0 +1,17 @@
+from django.shortcuts import render, redirect
+from django.contrib.auth import login
+from django.contrib import messages
+from .forms import UserRegisterForm
+
+def signup(request):
+ if request.method == 'POST':
+ form = UserRegisterForm(request.POST)
+ if form.is_valid():
+ user = form.save()
+ # login(request, user) # Automatically log the user in after signup
+ print(f"User {user.username} created and logged in.") # Debug line
+ messages.success(request, "Account created successfully!")
+ return redirect('users/registration/login.html') # Redirect to the homepage after signup
+ else:
+ form = UserRegisterForm()
+ return render(request, 'users/registration/signup.html', {'form': form})
diff --git a/task_management/__pycache__/__init__.cpython-312.pyc b/task_management/__pycache__/__init__.cpython-312.pyc
deleted file mode 100644
index a63f91f..0000000
Binary files a/task_management/__pycache__/__init__.cpython-312.pyc and /dev/null differ
diff --git a/task_management/__pycache__/settings.cpython-312.pyc b/task_management/__pycache__/settings.cpython-312.pyc
deleted file mode 100644
index edbbef4..0000000
Binary files a/task_management/__pycache__/settings.cpython-312.pyc and /dev/null differ
diff --git a/task_management/__pycache__/urls.cpython-312.pyc b/task_management/__pycache__/urls.cpython-312.pyc
deleted file mode 100644
index 1e2fc30..0000000
Binary files a/task_management/__pycache__/urls.cpython-312.pyc and /dev/null differ
diff --git a/task_management/__pycache__/views.cpython-312.pyc b/task_management/__pycache__/views.cpython-312.pyc
deleted file mode 100644
index 117f480..0000000
Binary files a/task_management/__pycache__/views.cpython-312.pyc and /dev/null differ
diff --git a/task_management/__pycache__/wsgi.cpython-312.pyc b/task_management/__pycache__/wsgi.cpython-312.pyc
deleted file mode 100644
index e8e4d8f..0000000
Binary files a/task_management/__pycache__/wsgi.cpython-312.pyc and /dev/null differ
diff --git a/task_management/settings.py b/task_management/settings.py
deleted file mode 100644
index a4a728f..0000000
--- a/task_management/settings.py
+++ /dev/null
@@ -1,124 +0,0 @@
-"""
-Django settings for task_management project.
-
-Generated by 'django-admin startproject' using Django 5.1.1.
-
-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-7=6i)#%_gi@k^1wg(a%9fa=^q*fbh3zaeh_uk01b%pu6o7h(-g"
-
-# SECURITY WARNING: don't run with debug turned on in production!
-DEBUG = True
-
-ALLOWED_HOSTS = []
-
-
-# Application definition
-
-INSTALLED_APPS = [
- "django.contrib.admin",
- "django.contrib.auth",
- "django.contrib.contenttypes",
- "django.contrib.sessions",
- "django.contrib.messages",
- "django.contrib.staticfiles",
- "task_manager"
-]
-
-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 = "task_management.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 = "task_management.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/task_manager/__pycache__/__init__.cpython-312.pyc b/task_manager/__pycache__/__init__.cpython-312.pyc
index a9a716d..97b7f4d 100644
Binary files a/task_manager/__pycache__/__init__.cpython-312.pyc and b/task_manager/__pycache__/__init__.cpython-312.pyc differ
diff --git a/task_manager/__pycache__/admin.cpython-312.pyc b/task_manager/__pycache__/admin.cpython-312.pyc
index be3c580..2783ec1 100644
Binary files a/task_manager/__pycache__/admin.cpython-312.pyc and b/task_manager/__pycache__/admin.cpython-312.pyc differ
diff --git a/task_manager/__pycache__/apps.cpython-312.pyc b/task_manager/__pycache__/apps.cpython-312.pyc
index 9039902..f3d19ca 100644
Binary files a/task_manager/__pycache__/apps.cpython-312.pyc and b/task_manager/__pycache__/apps.cpython-312.pyc differ
diff --git a/task_manager/__pycache__/forms.cpython-312.pyc b/task_manager/__pycache__/forms.cpython-312.pyc
index f1f518b..bcfeb3e 100644
Binary files a/task_manager/__pycache__/forms.cpython-312.pyc and b/task_manager/__pycache__/forms.cpython-312.pyc differ
diff --git a/task_manager/__pycache__/models.cpython-312.pyc b/task_manager/__pycache__/models.cpython-312.pyc
index afcf91f..6ebdea0 100644
Binary files a/task_manager/__pycache__/models.cpython-312.pyc and b/task_manager/__pycache__/models.cpython-312.pyc differ
diff --git a/task_manager/__pycache__/urls.cpython-312.pyc b/task_manager/__pycache__/urls.cpython-312.pyc
index 030501d..b718708 100644
Binary files a/task_manager/__pycache__/urls.cpython-312.pyc and b/task_manager/__pycache__/urls.cpython-312.pyc differ
diff --git a/task_manager/__pycache__/views.cpython-312.pyc b/task_manager/__pycache__/views.cpython-312.pyc
index 718de75..41b321a 100644
Binary files a/task_manager/__pycache__/views.cpython-312.pyc and b/task_manager/__pycache__/views.cpython-312.pyc differ
diff --git a/task_manager/apps.py b/task_manager/apps.py
deleted file mode 100644
index d4f261d..0000000
--- a/task_manager/apps.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from django.apps import AppConfig
-
-
-class TaskManagerConfig(AppConfig):
- default_auto_field = "django.db.models.BigAutoField"
- name = "task_manager"
diff --git a/task_manager/migrations/__pycache__/0001_initial.cpython-312.pyc b/task_manager/migrations/__pycache__/0001_initial.cpython-312.pyc
index 20566c0..c480284 100644
Binary files a/task_manager/migrations/__pycache__/0001_initial.cpython-312.pyc and b/task_manager/migrations/__pycache__/0001_initial.cpython-312.pyc differ
diff --git a/task_manager/migrations/__pycache__/__init__.cpython-312.pyc b/task_manager/migrations/__pycache__/__init__.cpython-312.pyc
index 1c75195..350092d 100644
Binary files a/task_manager/migrations/__pycache__/__init__.cpython-312.pyc and b/task_manager/migrations/__pycache__/__init__.cpython-312.pyc differ
diff --git a/task_manager/urls.py b/task_manager/urls.py
deleted file mode 100644
index a1589d8..0000000
--- a/task_manager/urls.py
+++ /dev/null
@@ -1,10 +0,0 @@
-from django.urls import path
-from . import views
-
-urlpatterns = [
- path('', views.task_calendar, name='task_calendar'),
- path('tasks/create/