[fix] Fixes after refactoring

This commit is contained in:
ITQ
2024-04-01 12:17:38 +03:00
parent c1807ce032
commit 49a2ef525f
6 changed files with 10 additions and 25 deletions
+6 -1
View File
@@ -8,7 +8,11 @@ class Vacancy(models.Model):
name = models.CharField( name = models.CharField(
max_length=255, max_length=255,
) )
age_restriction = models.DateField( start_date = models.DateField(
blank=True,
null=True,
)
end_date = models.DateField(
blank=True, blank=True,
null=True, null=True,
) )
@@ -72,6 +76,7 @@ class Team(models.Model):
author = models.ForeignKey( author = models.ForeignKey(
User, User,
on_delete=models.CASCADE, on_delete=models.CASCADE,
related_name="teams"
) )
def __str__(self): def __str__(self):
+1 -1
View File
@@ -4,7 +4,7 @@ from rest_framework.response import Response
from rest_framework.views import APIView from rest_framework.views import APIView
from teams.models import Team from teams.models import Team
from .serializers import TeamSerializer from api.teams.serializers import TeamSerializer
class AddUserToTeam(APIView): class AddUserToTeam(APIView):
+2
View File
@@ -156,6 +156,8 @@ REST_FRAMEWORK = {
APPEND_SLASH = False APPEND_SLASH = False
CORS_ORIGIN_ALLOW_ALL = True
if DEBUG and not (TESTING or MIGRATING): if DEBUG and not (TESTING or MIGRATING):
INSTALLED_APPS.append("debug_toolbar") INSTALLED_APPS.append("debug_toolbar")
MIDDLEWARE.append("debug_toolbar.middleware.DebugToolbarMiddleware") MIDDLEWARE.append("debug_toolbar.middleware.DebugToolbarMiddleware")
@@ -1,18 +0,0 @@
# Generated by Django 4.2.11 on 2024-03-31 19:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('notifications', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='notification',
name='content',
field=models.TextField(verbose_name='содержание'),
),
]
-4
View File
@@ -24,9 +24,6 @@ services:
depends_on: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy
restart: unless-stopped
expose:
- 8000
environment: environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
@@ -68,5 +65,4 @@ services:
volumes: volumes:
postgres_data: postgres_data:
redis_data:
pgadmin_data: pgadmin_data:
+1 -1
View File
@@ -1,5 +1,5 @@
server { server {
listen 3000; listen 80;
location / { location / {
root /usr/share/nginx/html/; root /usr/share/nginx/html/;