Skip to content

Commit

Permalink
migrate and edits
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdullahBakir97 committed May 27, 2024
1 parent a7b4a4d commit a5a26fb
Show file tree
Hide file tree
Showing 20 changed files with 62 additions and 49 deletions.
Binary file modified backend/accounts/__pycache__/models.cpython-312.pyc
Binary file not shown.
13 changes: 12 additions & 1 deletion backend/accounts/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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",
Expand Down
20 changes: 20 additions & 0 deletions backend/accounts/migrations/0002_customuser_tasks.py
Original file line number Diff line number Diff line change
@@ -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"
),
),
]
35 changes: 0 additions & 35 deletions backend/accounts/migrations/0002_initial.py

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified backend/accounts/migrations/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file modified backend/db.sqlite3
Binary file not shown.
Binary file modified backend/project/__pycache__/settings.cpython-312.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions backend/project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
'rest_framework',
'djoser',
'rest_framework.authtoken',
'dj_rest_auth',
'django.contrib.sites',
'corsheaders',
'channels',
Expand Down
Binary file modified backend/tasks/__pycache__/admin.cpython-312.pyc
Binary file not shown.
Binary file modified backend/tasks/__pycache__/models.cpython-312.pyc
Binary file not shown.
Binary file modified backend/tasks/__pycache__/urls.cpython-312.pyc
Binary file not shown.
12 changes: 1 addition & 11 deletions backend/tasks/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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(
Expand Down
26 changes: 26 additions & 0 deletions backend/tasks/migrations/0002_task_assigned_to.py
Original file line number Diff line number Diff line change
@@ -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,
),
),
]
Binary file modified backend/tasks/migrations/__pycache__/0001_initial.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file modified backend/tasks/migrations/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions backend/tasks/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a5a26fb

Please sign in to comment.