diff --git a/backend/project/api/teams/models.py b/backend/project/api/teams/models.py index b1ef70f..9d04d61 100644 --- a/backend/project/api/teams/models.py +++ b/backend/project/api/teams/models.py @@ -8,7 +8,11 @@ class Vacancy(models.Model): name = models.CharField( max_length=255, ) - age_restriction = models.DateField( + start_date = models.DateField( + blank=True, + null=True, + ) + end_date = models.DateField( blank=True, null=True, ) @@ -72,6 +76,7 @@ class Team(models.Model): author = models.ForeignKey( User, on_delete=models.CASCADE, + related_name="teams" ) def __str__(self): diff --git a/backend/project/api/teams/views.py b/backend/project/api/teams/views.py index a583df5..affb052 100644 --- a/backend/project/api/teams/views.py +++ b/backend/project/api/teams/views.py @@ -4,7 +4,7 @@ from rest_framework.response import Response from rest_framework.views import APIView from teams.models import Team -from .serializers import TeamSerializer +from api.teams.serializers import TeamSerializer class AddUserToTeam(APIView): diff --git a/backend/project/config/settings.py b/backend/project/config/settings.py index e0255e4..35facb5 100755 --- a/backend/project/config/settings.py +++ b/backend/project/config/settings.py @@ -156,6 +156,8 @@ REST_FRAMEWORK = { APPEND_SLASH = False +CORS_ORIGIN_ALLOW_ALL = True + if DEBUG and not (TESTING or MIGRATING): INSTALLED_APPS.append("debug_toolbar") MIDDLEWARE.append("debug_toolbar.middleware.DebugToolbarMiddleware") diff --git a/backend/project/notifications/migrations/0002_alter_notification_content.py b/backend/project/notifications/migrations/0002_alter_notification_content.py deleted file mode 100644 index 0bdbb42..0000000 --- a/backend/project/notifications/migrations/0002_alter_notification_content.py +++ /dev/null @@ -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='содержание'), - ), - ] diff --git a/docker-compose.yml b/docker-compose.yml index 0e9dbac..de2179a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,9 +24,6 @@ services: depends_on: postgres: condition: service_healthy - restart: unless-stopped - expose: - - 8000 environment: POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} @@ -68,5 +65,4 @@ services: volumes: postgres_data: - redis_data: pgadmin_data: diff --git a/frontend/nginx.conf b/frontend/nginx.conf index 80ab805..133ffe1 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -1,5 +1,5 @@ server { - listen 3000; + listen 80; location / { root /usr/share/nginx/html/;