Skip to content

Commit 0c3a2b2

Browse files
committed
fix(project): update details
1 parent edbf70e commit 0c3a2b2

File tree

7 files changed

+19
-25
lines changed

7 files changed

+19
-25
lines changed

apps/blogs/admin.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
from .choices import StatusChoices
88

99

10-
class TagInline(admin.TabularInline):
11-
model = Post.tags.through
12-
extra = 1
13-
14-
1510
@admin.register(Tag)
1611
class TagAdmin(BaseAdmin):
1712
"""Admin for Tag model."""
@@ -34,7 +29,6 @@ class PostAdmin(BaseAdmin):
3429
list_filter = ["tags", "is_available"]
3530
readonly_fields = ["pk", "slug", "created_at", "updated_at"]
3631
ordering = ["title"]
37-
inlines = [TagInline]
3832

3933

4034
@admin.register(PostReport)

apps/blogs/managers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
class TagManager(BaseManager):
11-
"""Manager for Post Model."""
11+
"""Manager for Tag Model."""
1212

1313

1414
class PostManager(BaseManager):
@@ -33,4 +33,4 @@ def get_search(self, search_term):
3333

3434

3535
class PostReportManager(BaseManager):
36-
"""Manager for Post Model."""
36+
"""Manager for PostReport Model."""

apps/blogs/views.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
class TagListView(APIView):
2727
"""
2828
View to list and create tags.
29+
NOTE: This view has been refactored into an action of the viewsets.
2930
3031
Endpoints:
3132
- GET api/v1/posts/tags/
@@ -57,6 +58,7 @@ def post(self, request):
5758
class PostListView(APIView):
5859
"""
5960
View to list and create posts.
61+
NOTE: This view has been refactored into an viewset.
6062
6163
Endpoints:
6264
- GET api/v1/posts/
@@ -101,6 +103,7 @@ def post(self, request):
101103
class PostDetailView(APIView):
102104
"""
103105
View to retrieve, update, and delete a post.
106+
NOTE: This view has been refactored into an viewset.
104107
105108
Endpoints:
106109
- GET api/v1/posts/{id}/
@@ -148,6 +151,7 @@ def delete(self, request, post_id):
148151
class PostSearchView(APIView):
149152
"""
150153
View to search posts.
154+
NOTE: This view has been refactored into an viewset.
151155
152156
Endpoints:
153157
- GET api/v1/posts/?q={query}
@@ -179,7 +183,7 @@ def get(self, request):
179183
class FeaturedPostsView(APIView):
180184
"""
181185
View to list featured posts.
182-
# ! NOTE: This view has been refactored into an action of the viewsets.
186+
NOTE: This view has been refactored into an action of the viewsets.
183187
184188
Endpoints:
185189
- GET api/v1/posts/featured/
@@ -209,7 +213,7 @@ def get(self, request):
209213
class RecentPostsView(APIView):
210214
"""
211215
View to list recent posts.
212-
# ! NOTE: This view has been refactored into an action of the viewsets.
216+
NOTE: This view has been refactored into an action of the viewsets.
213217
214218
Endpoints:
215219
- GET api/v1/posts/recent/
@@ -239,7 +243,7 @@ def get(self, request):
239243
class PostReportView(APIView):
240244
"""
241245
View for reporting a post.
242-
# ! NOTE: This view has been refactored into an action of the viewsets.
246+
NOTE: This view has been refactored into an action of the viewsets.
243247
244248
Endpoints:
245249
- POST api/v1/posts/{id}/report/
@@ -286,7 +290,7 @@ def post(self, request, post_id):
286290

287291
class ReportsView(APIView):
288292
"""View for listing all reports.
289-
# ! NOTE: This view has been refactored into an action of the viewsets.
293+
NOTE: This view has been refactored into an action of the viewsets.
290294
291295
Endpoints:
292296
- GET api/v1/posts/reports/

apps/blogs/viewsets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def create_report(self, request, *args, **kwargs):
8181
status=status.HTTP_400_BAD_REQUEST,
8282
)
8383

84+
# ! TODO: Move logic to the service layer
8485
with transaction.atomic():
8586
# Update points of the post
8687
post.points = post.points - 1

apps/drivers/signals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ def delete_sensitive_documents(sender, instance, **kwargs):
3030
)
3131
)
3232
except FileNotFoundError:
33-
# logger.error(f"File not found error")
3433
# ! TODO: Add sentry for logs
34+
# logger.error(f"File not found error")
3535
pass

apps/jobs/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
class Position(BaseModel):
14-
"""Model definition for JobPosition (Catalog)."""
14+
"""Model definition for Position."""
1515

1616
position = models.CharField(max_length=100, unique=True)
1717
description = models.TextField()
@@ -26,7 +26,7 @@ def __str__(self):
2626

2727

2828
class Worker(BaseModel):
29-
"""Model definition for Worker (Entity)."""
29+
"""Model definition for Worker."""
3030

3131
user_id = models.OneToOneField(User, on_delete=models.DO_NOTHING)
3232
phone_number = models.CharField(max_length=15)
@@ -59,7 +59,7 @@ def __str__(self):
5959

6060

6161
class Applicant(BaseModel):
62-
"""Model definition for Applicant (Entity)."""
62+
"""Model definition for Applicant."""
6363

6464
user_id = models.OneToOneField(User, on_delete=models.CASCADE)
6565
phone_number = models.CharField(max_length=15)

roadmap.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# Roadmap
22

3-
## Home
4-
5-
- [ ] `GET /home/kwords` Obtener todas las palabras más buscadas (AllowAny). [10]
6-
- [ ] `GET /home/restaurants` Obtener todas los restaurants más popolares (AllowAny). [10]
7-
83
## Orders [OK]
94

105
- [ ] `GET /orders/` Obtener todas las ordenes (IsAdministrator)
@@ -105,10 +100,8 @@ Pending implementation
105100
- [x] `DELETE /posts/{id}` Eliminar un post específico por su ID (IsMarketing).
106101

107102
- [x] `POST /posts/{id}/report` Reportar un post específico por su ID (IsClient).
108-
- [ ] `GET /posts/tags` Obtener una lista de todas las etiquetas (IsMarketing).
109-
- [ ] `POST /posts/tags` Crear una nueva etiqueta (IsMarketing).
110-
111-
TODO: recents and featured endpoint unificarlos con /posts agregando un filtro
103+
- [x] `GET /posts/tags` Obtener una lista de todas las etiquetas (IsMarketing).
104+
- [x] `POST /posts/tags` Crear una nueva etiqueta (IsMarketing).
112105

113106
## Jobs [OK]
114107

@@ -117,12 +110,14 @@ TODO: recents and featured endpoint unificarlos con /posts agregando un filtro
117110
- [ ] `GET /positions/{id}` Obtener los detalles de una posición de trabajo específica por su ID (IsRRHH).
118111
- [ ] `PATCH /positions/{id}` Actualizar una posición de trabajo específica por su ID (IsRRHH).
119112
- [ ] `DELETE /positions/{id}` Eliminar una posición de trabajo específica por su ID (IsRRHH).
113+
120114
- [ ] `GET /workers` Obtener una lista de todos los trabajadores (IsRRHH).
121115
- [ ] `POST /workers` Crear un nuevo trabajador (IsRRHH).
122116
- [ ] `GET /workers/{id}` Obtener los detalles de un trabajador específico por su ID (IsRRHH).
123117
- [ ] `PATCH /workers/{id}` Actualizar un trabajador específico por su ID (IsRRHH).
124118
- [ ] `DELETE /workers/{id}` Eliminar un trabajador específico por su ID (IsRRHH).
125119
- [ ] `POST /workers/{id}/terminate` Dar por terminado un contrato de trabajo (IsRRHH).
120+
126121
- [ ] `POST /applicants/{id}/status` Actualizar el estado de una solicitud de trabajo específica (IsRRHH).
127122
- [ ] `GET /contracts/` Obtener una lista de todos los contratos de trabajo (IsRRHH).
128123
- [ ] `GET /contracts/{id}` Obtener los detalles de un contrato específico por su ID (IsRRHH).

0 commit comments

Comments
 (0)