diff --git a/backend/accounts/__pycache__/models.cpython-312.pyc b/backend/accounts/__pycache__/models.cpython-312.pyc index 528cdda..12d8a67 100644 Binary files a/backend/accounts/__pycache__/models.cpython-312.pyc and b/backend/accounts/__pycache__/models.cpython-312.pyc differ diff --git a/backend/accounts/migrations/0001_initial.py b/backend/accounts/migrations/0001_initial.py index 6492228..c73784e 100644 --- a/backend/accounts/migrations/0001_initial.py +++ b/backend/accounts/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 5.0.6 on 2024-05-27 15:07 +# Generated by Django 5.0.6 on 2024-05-27 15:49 import django.contrib.auth.models import django.contrib.auth.validators @@ -119,6 +119,17 @@ class Migration(migrations.Migration): verbose_name="groups", ), ), + ( + "user_permissions", + models.ManyToManyField( + blank=True, + help_text="Specific permissions for this user.", + related_name="user_set", + related_query_name="user", + to="auth.permission", + verbose_name="user permissions", + ), + ), ], options={ "verbose_name": "user", diff --git a/backend/accounts/migrations/0002_customuser_tasks.py b/backend/accounts/migrations/0002_customuser_tasks.py new file mode 100644 index 0000000..05828e3 --- /dev/null +++ b/backend/accounts/migrations/0002_customuser_tasks.py @@ -0,0 +1,20 @@ +# Generated by Django 5.0.6 on 2024-05-27 15:50 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("accounts", "0001_initial"), + ("tasks", "0002_task_assigned_to"), + ] + + operations = [ + migrations.AddField( + model_name="customuser", + name="tasks", + field=models.ManyToManyField( + blank=True, related_name="assigned_to_users", to="tasks.task" + ), + ), + ] diff --git a/backend/accounts/migrations/0002_initial.py b/backend/accounts/migrations/0002_initial.py deleted file mode 100644 index 67ce1ac..0000000 --- a/backend/accounts/migrations/0002_initial.py +++ /dev/null @@ -1,35 +0,0 @@ -# Generated by Django 5.0.6 on 2024-05-27 15:07 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - initial = True - - dependencies = [ - ("accounts", "0001_initial"), - ("auth", "0012_alter_user_first_name_max_length"), - ("tasks", "0001_initial"), - ] - - operations = [ - migrations.AddField( - model_name="customuser", - name="tasks", - field=models.ManyToManyField( - blank=True, related_name="assigned_to_users", to="tasks.task" - ), - ), - migrations.AddField( - model_name="customuser", - name="user_permissions", - field=models.ManyToManyField( - blank=True, - help_text="Specific permissions for this user.", - related_name="user_set", - related_query_name="user", - to="auth.permission", - verbose_name="user permissions", - ), - ), - ] diff --git a/backend/accounts/migrations/__pycache__/0001_initial.cpython-312.pyc b/backend/accounts/migrations/__pycache__/0001_initial.cpython-312.pyc index 9285f4f..c138363 100644 Binary files a/backend/accounts/migrations/__pycache__/0001_initial.cpython-312.pyc and b/backend/accounts/migrations/__pycache__/0001_initial.cpython-312.pyc differ diff --git a/backend/accounts/migrations/__pycache__/0002_customuser_tasks.cpython-312.pyc b/backend/accounts/migrations/__pycache__/0002_customuser_tasks.cpython-312.pyc new file mode 100644 index 0000000..df52028 Binary files /dev/null and b/backend/accounts/migrations/__pycache__/0002_customuser_tasks.cpython-312.pyc differ diff --git a/backend/accounts/migrations/__pycache__/0002_initial.cpython-312.pyc b/backend/accounts/migrations/__pycache__/0002_initial.cpython-312.pyc deleted file mode 100644 index 0d9f4f7..0000000 Binary files a/backend/accounts/migrations/__pycache__/0002_initial.cpython-312.pyc and /dev/null differ diff --git a/backend/accounts/migrations/__pycache__/__init__.cpython-312.pyc b/backend/accounts/migrations/__pycache__/__init__.cpython-312.pyc index bfa086a..f55dd60 100644 Binary files a/backend/accounts/migrations/__pycache__/__init__.cpython-312.pyc and b/backend/accounts/migrations/__pycache__/__init__.cpython-312.pyc differ diff --git a/backend/db.sqlite3 b/backend/db.sqlite3 index 597ce6c..12ba8b5 100644 Binary files a/backend/db.sqlite3 and b/backend/db.sqlite3 differ diff --git a/backend/project/__pycache__/settings.cpython-312.pyc b/backend/project/__pycache__/settings.cpython-312.pyc index a236274..fea2f9b 100644 Binary files a/backend/project/__pycache__/settings.cpython-312.pyc and b/backend/project/__pycache__/settings.cpython-312.pyc differ diff --git a/backend/project/settings.py b/backend/project/settings.py index c920617..798cbfe 100644 --- a/backend/project/settings.py +++ b/backend/project/settings.py @@ -44,6 +44,7 @@ 'rest_framework', 'djoser', 'rest_framework.authtoken', + 'dj_rest_auth', 'django.contrib.sites', 'corsheaders', 'channels', diff --git a/backend/tasks/__pycache__/admin.cpython-312.pyc b/backend/tasks/__pycache__/admin.cpython-312.pyc index ca55ab8..a91e43b 100644 Binary files a/backend/tasks/__pycache__/admin.cpython-312.pyc and b/backend/tasks/__pycache__/admin.cpython-312.pyc differ diff --git a/backend/tasks/__pycache__/models.cpython-312.pyc b/backend/tasks/__pycache__/models.cpython-312.pyc index 46fe79b..1ac99ef 100644 Binary files a/backend/tasks/__pycache__/models.cpython-312.pyc and b/backend/tasks/__pycache__/models.cpython-312.pyc differ diff --git a/backend/tasks/__pycache__/urls.cpython-312.pyc b/backend/tasks/__pycache__/urls.cpython-312.pyc index 03a41e0..fa3c335 100644 Binary files a/backend/tasks/__pycache__/urls.cpython-312.pyc and b/backend/tasks/__pycache__/urls.cpython-312.pyc differ diff --git a/backend/tasks/migrations/0001_initial.py b/backend/tasks/migrations/0001_initial.py index 39f583b..1935405 100644 --- a/backend/tasks/migrations/0001_initial.py +++ b/backend/tasks/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 5.0.6 on 2024-05-27 15:07 +# Generated by Django 5.0.6 on 2024-05-27 15:49 import django.db.models.deletion from django.conf import settings @@ -99,16 +99,6 @@ class Migration(migrations.Migration): ("end_date", models.DateField(blank=True, null=True)), ("created_at", models.DateTimeField(auto_now_add=True)), ("updated_at", models.DateTimeField(auto_now=True)), - ( - "assigned_to", - models.ForeignKey( - blank=True, - null=True, - on_delete=django.db.models.deletion.CASCADE, - related_name="assigned_tasks", - to=settings.AUTH_USER_MODEL, - ), - ), ( "project", models.ForeignKey( diff --git a/backend/tasks/migrations/0002_task_assigned_to.py b/backend/tasks/migrations/0002_task_assigned_to.py new file mode 100644 index 0000000..95d45d4 --- /dev/null +++ b/backend/tasks/migrations/0002_task_assigned_to.py @@ -0,0 +1,26 @@ +# Generated by Django 5.0.6 on 2024-05-27 15:50 + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("tasks", "0001_initial"), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.AddField( + model_name="task", + name="assigned_to", + field=models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.CASCADE, + related_name="assigned_tasks", + to=settings.AUTH_USER_MODEL, + ), + ), + ] diff --git a/backend/tasks/migrations/__pycache__/0001_initial.cpython-312.pyc b/backend/tasks/migrations/__pycache__/0001_initial.cpython-312.pyc index 432f84b..92c41c1 100644 Binary files a/backend/tasks/migrations/__pycache__/0001_initial.cpython-312.pyc and b/backend/tasks/migrations/__pycache__/0001_initial.cpython-312.pyc differ diff --git a/backend/tasks/migrations/__pycache__/0002_task_assigned_to.cpython-312.pyc b/backend/tasks/migrations/__pycache__/0002_task_assigned_to.cpython-312.pyc new file mode 100644 index 0000000..1ba4c66 Binary files /dev/null and b/backend/tasks/migrations/__pycache__/0002_task_assigned_to.cpython-312.pyc differ diff --git a/backend/tasks/migrations/__pycache__/__init__.cpython-312.pyc b/backend/tasks/migrations/__pycache__/__init__.cpython-312.pyc index 6ca103e..d036505 100644 Binary files a/backend/tasks/migrations/__pycache__/__init__.cpython-312.pyc and b/backend/tasks/migrations/__pycache__/__init__.cpython-312.pyc differ diff --git a/backend/tasks/urls.py b/backend/tasks/urls.py index 93f1376..f3b813f 100644 --- a/backend/tasks/urls.py +++ b/backend/tasks/urls.py @@ -3,11 +3,11 @@ from .views import TaskViewSet, TimeEntryViewSet, CommentViewSet, ProjectViewSet, FileViewSet, EventViewSet router = DefaultRouter() +router.register(r'projects', ProjectViewSet) router.register(r'tasks', TaskViewSet) +router.register(r'files', FileViewSet) router.register(r'time-entries', TimeEntryViewSet) router.register(r'comments', CommentViewSet) -router.register(r'projects', ProjectViewSet) -router.register(r'files', FileViewSet) router.register(r'events', EventViewSet) urlpatterns = router.urls