Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33096fef8d |
@ -5,9 +5,9 @@ name: default
|
||||
steps:
|
||||
- name: build
|
||||
commands:
|
||||
- docker build --no-cache -t izaac-master:latest .
|
||||
- docker tag izaac-master:latest registry.knck.pl:5000/izaac-master:latest
|
||||
- docker push registry.knck.pl:5000/izaac-master:latest
|
||||
- docker build --no-cache -t izaac-develop:latest .
|
||||
- docker tag izaac-develop:latest registry.izaac.pl:5000/izaac-develop:latest
|
||||
- docker push registry.izaac.pl:5000/izaac-develop:latest
|
||||
|
||||
- name: delete
|
||||
environment:
|
||||
@ -23,4 +23,4 @@ steps:
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
- develop
|
||||
@ -1,4 +1,4 @@
|
||||
FROM python:3.12-alpine
|
||||
FROM python:alpine
|
||||
|
||||
WORKDIR /usr/scr/app
|
||||
|
||||
@ -8,8 +8,6 @@ ENV REACT_CLIENT_ID="rrgNLSEqlcl45RVMQa0LxQLOHOgZ2L7ZlGpXUrCp"
|
||||
ENV REACT_CLIENT_SECRET="lKsmraeSmihY8rTQgd8TTGIncUloW7XokR8WLI0oZq8jCJ59guAkopg9ZOUeXFdyrqwuLi6TyXLZJDp1KB8DWEus05ttS3NQHoLvfRoOQtJpQaxzyIo85oykjQn25Keb"
|
||||
RUN pip install --upgrade pip
|
||||
COPY ./requirements.txt .
|
||||
RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev
|
||||
RUN pip install psycopg2
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
ENV DJANGO_SETTINGS_MODULE=izaac.settings
|
||||
|
||||
342
Untitled-1.json
342
Untitled-1.json
@ -1,342 +0,0 @@
|
||||
[
|
||||
{
|
||||
"posting_option": "S",
|
||||
"company_name": "Global Solutions Ltd.",
|
||||
"name": "System Analyst",
|
||||
"content": "<h1>Quality Assurance</h1><p>Join our team at Innovatech as a UI/UX Designer. We are looking for a motivated individual with experience in software development. This position is located in Paris.</p>",
|
||||
"min_salary": 43789,
|
||||
"max_salary": 90334,
|
||||
"localization": "Toronto",
|
||||
"experience_level": "A",
|
||||
"employment_type": "B2B",
|
||||
"work_from_home": "wfh",
|
||||
"skill_levels": [
|
||||
{
|
||||
"skill_id": "38",
|
||||
"skill_level": "M"
|
||||
},
|
||||
{
|
||||
"skill_id": "21",
|
||||
"skill_level": "E"
|
||||
},
|
||||
{
|
||||
"skill_id": "13",
|
||||
"skill_level": "B"
|
||||
}
|
||||
],
|
||||
"contact_email": "info@companyemail.com",
|
||||
"first_name": "John",
|
||||
"last_name": "Doe",
|
||||
"category": "B",
|
||||
"webpage": "https://www.companywebsite.com",
|
||||
"image": "https://www.companywebsite.com/image.jpg",
|
||||
"require_salary": False,
|
||||
"vat_number": "123456789"
|
||||
},
|
||||
{
|
||||
"posting_option": "S",
|
||||
"company_name": "Tech Pioneers",
|
||||
"name": "Project Manager",
|
||||
"content": "<h1>Project Manager</h1><p>Join our team at Innovatech as a Senior Developer. We are looking for a motivated individual with experience in software development. This position is located in London.</p>",
|
||||
"min_salary": 42524,
|
||||
"max_salary": 102194,
|
||||
"localization": "New York",
|
||||
"experience_level": "B",
|
||||
"employment_type": "FT",
|
||||
"work_from_home": "off",
|
||||
"skill_levels": [
|
||||
{
|
||||
"skill_id": "28",
|
||||
"skill_level": "E"
|
||||
},
|
||||
{
|
||||
"skill_id": "7",
|
||||
"skill_level": "M"
|
||||
},
|
||||
{
|
||||
"skill_id": "1",
|
||||
"skill_level": "B"
|
||||
}
|
||||
],
|
||||
"contact_email": "info@companyemail.com",
|
||||
"first_name": "John",
|
||||
"last_name": "Doe",
|
||||
"category": "C",
|
||||
"webpage": "https://www.companywebsite.com",
|
||||
"image": "https://www.companywebsite.com/image.jpg",
|
||||
"require_salary": False,
|
||||
"vat_number": "123456789"
|
||||
},
|
||||
{
|
||||
"posting_option": "S",
|
||||
"company_name": "Digitally Inspired",
|
||||
"name": "Senior Developer",
|
||||
"content": "<h1>System Analyst</h1><p>Join our team at Innovatech as a DevOps Engineer. We are looking for a motivated individual with experience in software development. This position is located in Paris.</p>",
|
||||
"min_salary": 40657,
|
||||
"max_salary": 107155,
|
||||
"localization": "Toronto",
|
||||
"experience_level": "C",
|
||||
"employment_type": "FT",
|
||||
"work_from_home": "off",
|
||||
"skill_levels": [
|
||||
{
|
||||
"skill_id": "4",
|
||||
"skill_level": "B"
|
||||
},
|
||||
{
|
||||
"skill_id": "30",
|
||||
"skill_level": "M"
|
||||
},
|
||||
{
|
||||
"skill_id": "3",
|
||||
"skill_level": "B"
|
||||
}
|
||||
],
|
||||
"contact_email": "info@companyemail.com",
|
||||
"first_name": "John",
|
||||
"last_name": "Doe",
|
||||
"category": "D",
|
||||
"webpage": "https://www.companywebsite.com",
|
||||
"image": "https://www.companywebsite.com/image.jpg",
|
||||
"require_salary": False,
|
||||
"vat_number": "123456789"
|
||||
},
|
||||
{
|
||||
"posting_option": "S",
|
||||
"company_name": "Tech Innovations Inc.",
|
||||
"name": "Product Manager",
|
||||
"content": "<h1>DevOps Engineer</h1><p>Join our team at Creative Minds LLC as a DevOps Engineer. We are looking for a motivated individual with experience in software development. This position is located in Singapore.</p>",
|
||||
"min_salary": 56868,
|
||||
"max_salary": 101327,
|
||||
"localization": "Berlin",
|
||||
"experience_level": "C",
|
||||
"employment_type": "INT",
|
||||
"work_from_home": "wfh",
|
||||
"skill_levels": [
|
||||
{
|
||||
"skill_id": "28",
|
||||
"skill_level": "E"
|
||||
},
|
||||
{
|
||||
"skill_id": "1",
|
||||
"skill_level": "E"
|
||||
},
|
||||
{
|
||||
"skill_id": "4",
|
||||
"skill_level": "E"
|
||||
}
|
||||
],
|
||||
"contact_email": "info@companyemail.com",
|
||||
"first_name": "John",
|
||||
"last_name": "Doe",
|
||||
"category": "E",
|
||||
"webpage": "https://www.companywebsite.com",
|
||||
"image": "https://www.companywebsite.com/image.jpg",
|
||||
"require_salary": False,
|
||||
"vat_number": "123456789"
|
||||
},
|
||||
{
|
||||
"posting_option": "S",
|
||||
"company_name": "Global Solutions Ltd.",
|
||||
"name": "Project Manager",
|
||||
"content": "<h1>Project Manager</h1><p>Join our team at Bright Future Tech as a DevOps Engineer. We are looking for a motivated individual with experience in software development. This position is located in Singapore.</p>",
|
||||
"min_salary": 62093,
|
||||
"max_salary": 98690,
|
||||
"localization": "London",
|
||||
"experience_level": "D",
|
||||
"employment_type": "FT",
|
||||
"work_from_home": "wfh",
|
||||
"skill_levels": [
|
||||
{
|
||||
"skill_id": "30",
|
||||
"skill_level": "M"
|
||||
},
|
||||
{
|
||||
"skill_id": "33",
|
||||
"skill_level": "E"
|
||||
},
|
||||
{
|
||||
"skill_id": "2",
|
||||
"skill_level": "B"
|
||||
}
|
||||
],
|
||||
"contact_email": "info@companyemail.com",
|
||||
"first_name": "John",
|
||||
"last_name": "Doe",
|
||||
"category": "F",
|
||||
"webpage": "https://www.companywebsite.com",
|
||||
"image": "https://www.companywebsite.com/image.jpg",
|
||||
"require_salary": False,
|
||||
"vat_number": "123456789"
|
||||
},
|
||||
{
|
||||
"posting_option": "S",
|
||||
"company_name": "CodeCrafters",
|
||||
"name": "Data Scientist",
|
||||
"content": "<h1>Senior Developer</h1><p>Join our team at Tech Innovations Inc. as a Software Engineer. We are looking for a motivated individual with experience in software development. This position is located in San Francisco.</p>",
|
||||
"min_salary": 50492,
|
||||
"max_salary": 70097,
|
||||
"localization": "Sydney",
|
||||
"experience_level": "F",
|
||||
"employment_type": "MC",
|
||||
"work_from_home": "hyb",
|
||||
"skill_levels": [
|
||||
{
|
||||
"skill_id": "7",
|
||||
"skill_level": "M"
|
||||
},
|
||||
{
|
||||
"skill_id": "27",
|
||||
"skill_level": "E"
|
||||
},
|
||||
{
|
||||
"skill_id": "34",
|
||||
"skill_level": "B"
|
||||
}
|
||||
],
|
||||
"contact_email": "info@companyemail.com",
|
||||
"first_name": "John",
|
||||
"last_name": "Doe",
|
||||
"category": "G",
|
||||
"webpage": "https://www.companywebsite.com",
|
||||
"image": "https://www.companywebsite.com/image.jpg",
|
||||
"require_salary": False,
|
||||
"vat_number": "123456789"
|
||||
},
|
||||
{
|
||||
"posting_option": "S",
|
||||
"company_name": "Digitally Inspired",
|
||||
"name": "UI/UX Designer",
|
||||
"content": "<h1>DevOps Engineer</h1><p>Join our team at Digitally Inspired as a Product Manager. We are looking for a motivated individual with experience in software development. This position is located in Berlin.</p>",
|
||||
"min_salary": 59399,
|
||||
"max_salary": 110461,
|
||||
"localization": "Sydney",
|
||||
"experience_level": "E",
|
||||
"employment_type": "CW",
|
||||
"work_from_home": "hyb",
|
||||
"skill_levels": [
|
||||
{
|
||||
"skill_id": "19",
|
||||
"skill_level": "E"
|
||||
},
|
||||
{
|
||||
"skill_id": "13",
|
||||
"skill_level": "E"
|
||||
},
|
||||
{
|
||||
"skill_id": "36",
|
||||
"skill_level": "B"
|
||||
}
|
||||
],
|
||||
"contact_email": "info@companyemail.com",
|
||||
"first_name": "John",
|
||||
"last_name": "Doe",
|
||||
"category": "H",
|
||||
"webpage": "https://www.companywebsite.com",
|
||||
"image": "https://www.companywebsite.com/image.jpg",
|
||||
"require_salary": False,
|
||||
"vat_number": "123456789"
|
||||
},
|
||||
{
|
||||
"posting_option": "S",
|
||||
"company_name": "CodeCrafters",
|
||||
"name": "Project Manager",
|
||||
"content": "<h1>System Analyst</h1><p>Join our team at Digitally Inspired as a Data Scientist. We are looking for a motivated individual with experience in software development. This position is located in Sydney.</p>",
|
||||
"min_salary": 62307,
|
||||
"max_salary": 103344,
|
||||
"localization": "Sydney",
|
||||
"experience_level": "C",
|
||||
"employment_type": "B2B",
|
||||
"work_from_home": "wfh",
|
||||
"skill_levels": [
|
||||
{
|
||||
"skill_id": "14",
|
||||
"skill_level": "M"
|
||||
},
|
||||
{
|
||||
"skill_id": "5",
|
||||
"skill_level": "M"
|
||||
},
|
||||
{
|
||||
"skill_id": "15",
|
||||
"skill_level": "E"
|
||||
}
|
||||
],
|
||||
"contact_email": "info@companyemail.com",
|
||||
"first_name": "John",
|
||||
"last_name": "Doe",
|
||||
"category": "J",
|
||||
"webpage": "https://www.companywebsite.com",
|
||||
"image": "https://www.companywebsite.com/image.jpg",
|
||||
"require_salary": False,
|
||||
"vat_number": "123456789"
|
||||
},
|
||||
{
|
||||
"posting_option": "S",
|
||||
"company_name": "CodeCrafters",
|
||||
"name": "DevOps Engineer",
|
||||
"content": "<h1>System Analyst</h1><p>Join our team at Tech Pioneers as a System Analyst. We are looking for a motivated individual with experience in software development. This position is located in Paris.</p>",
|
||||
"min_salary": 52962,
|
||||
"max_salary": 107338,
|
||||
"localization": "Toronto",
|
||||
"experience_level": "C",
|
||||
"employment_type": "B2B",
|
||||
"work_from_home": "wfh",
|
||||
"skill_levels": [
|
||||
{
|
||||
"skill_id": "11",
|
||||
"skill_level": "M"
|
||||
},
|
||||
{
|
||||
"skill_id": "31",
|
||||
"skill_level": "B"
|
||||
},
|
||||
{
|
||||
"skill_id": "29",
|
||||
"skill_level": "M"
|
||||
}
|
||||
],
|
||||
"contact_email": "info@companyemail.com",
|
||||
"first_name": "John",
|
||||
"last_name": "Doe",
|
||||
"category": "Z",
|
||||
"webpage": "https://www.companywebsite.com",
|
||||
"image": "https://www.companywebsite.com/image.jpg",
|
||||
"require_salary": False,
|
||||
"vat_number": "123456789"
|
||||
},
|
||||
{
|
||||
"posting_option": "S",
|
||||
"company_name": "CodeCrafters",
|
||||
"name": "Project Manager",
|
||||
"content": "<h1>Quality Assurance</h1><p>Join our team at Future Horizons as a UI/UX Designer. We are looking for a motivated individual with experience in software development. This position is located in Singapore.</p>",
|
||||
"min_salary": 48580,
|
||||
"max_salary": 104717,
|
||||
"localization": "Singapore",
|
||||
"experience_level": "G",
|
||||
"employment_type": "FT",
|
||||
"work_from_home": "off",
|
||||
"skill_levels": [
|
||||
{
|
||||
"skill_id": "16",
|
||||
"skill_level": "E"
|
||||
},
|
||||
{
|
||||
"skill_id": "14",
|
||||
"skill_level": "B"
|
||||
},
|
||||
{
|
||||
"skill_id": "8",
|
||||
"skill_level": "B"
|
||||
}
|
||||
],
|
||||
"contact_email": "info@companyemail.com",
|
||||
"first_name": "John",
|
||||
"last_name": "Doe",
|
||||
"category": "A",
|
||||
"webpage": "https://www.companywebsite.com",
|
||||
"image": "https://www.companywebsite.com/image.jpg",
|
||||
"require_salary": False,
|
||||
"vat_number": "123456789"
|
||||
}
|
||||
]
|
||||
@ -14,7 +14,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: izaac-backend
|
||||
image: registry.knck.pl:5000/izaac-master:latest
|
||||
image: registry.knck.pl:5000/izaac-develop:latest
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
volumeMounts:
|
||||
|
||||
@ -30,16 +30,9 @@ SECRET_KEY = "django-insecure-ztiqj957k(j*@ms=-^9j+=j7wd+cyo*+9g&hkfh1bji-@#&6(e
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = ['https://izaac.knck.pl', 'izaac.knck.pl', 'localhost', 'izaac-backend', 'izaac-frontend']
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
CORS_ALLOWED_ORIGNS = [
|
||||
"https://izaac.knck.pl",
|
||||
"http://izaac.knck.pl",
|
||||
"http://izaac-frontend",
|
||||
"http://izaac-backend",
|
||||
]
|
||||
|
||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||
CORS_ALLOW_ALL_ORIGINS = True
|
||||
|
||||
# CORS_ALLOWED_ORIGIN = [
|
||||
# "http://localhost:8000",
|
||||
|
||||
@ -21,27 +21,6 @@ from jobposting.serializers import (
|
||||
MainJobOfferSerializer
|
||||
)
|
||||
|
||||
def remove_none_from_filters(filter: int|str, filter_type: str) -> int|str|None:
|
||||
if filter_type == 'int':
|
||||
if filter is not None or filter != '':
|
||||
try:
|
||||
filter = int(filter)
|
||||
except ValueError:
|
||||
filter = None
|
||||
except TypeError:
|
||||
filter = None
|
||||
else:
|
||||
filter = None
|
||||
else:
|
||||
if filter is not None or filter != '':
|
||||
pass
|
||||
else:
|
||||
filter = None
|
||||
|
||||
print(filter) # test only
|
||||
|
||||
return filter
|
||||
|
||||
|
||||
class MyUserViewSet(viewsets.ModelViewSet):
|
||||
# authentication_classes = [OAuth2Authentication, authentication.SessionAuthentication]
|
||||
@ -97,35 +76,20 @@ class JobOfferListView(APIView):
|
||||
authentication_classes = []
|
||||
permission_classes = []
|
||||
|
||||
|
||||
|
||||
def get(self, request, format=None):
|
||||
dict_request = dict(request.query_params)
|
||||
print(dict_request)
|
||||
categories = dict_request.get('categories[]', None)
|
||||
max_salary = remove_none_from_filters(
|
||||
request.query_params.get('max_salary', None), 'int')
|
||||
min_salary = remove_none_from_filters(
|
||||
request.query_params.get('min_salary', None), 'int')
|
||||
localization = remove_none_from_filters(
|
||||
request.query_params.get('localization', None), 'str')
|
||||
name = remove_none_from_filters(
|
||||
request.query_params.get('name', None), 'str')
|
||||
|
||||
filters = {
|
||||
'name__icontains': name,
|
||||
'min_salary__gte': min_salary,
|
||||
'max_salary__lte': max_salary,
|
||||
'localization': localization,
|
||||
'category__in': categories,
|
||||
'min_salary__gte': request.query_params.get('min_salary', None),
|
||||
'max_salary__lte': request.query_params.get('max_salary', None),
|
||||
'localization': request.query_params.get('localization', None),
|
||||
'category': request.query_params.get('category', None),
|
||||
'experience_level': request.query_params.get('experience_level', None),
|
||||
'employment_type': request.query_params.get('employment_type', None),
|
||||
'work_from_home': request.query_params.get('work_from_home', None),
|
||||
}
|
||||
|
||||
# remove None values
|
||||
# remove None values
|
||||
filters = {k: v for k, v in filters.items() if v is not None}
|
||||
print(filters)
|
||||
|
||||
job_offers = JobOffer.objects.filter(**filters)
|
||||
serializer = SlimJobOffersSerializer(job_offers, many=True)
|
||||
return Response(serializer.data)
|
||||
@ -222,7 +186,6 @@ class JobOfferCreateView(APIView):
|
||||
permission_classes = []
|
||||
|
||||
def post(self, request, format=None):
|
||||
print(request.META)
|
||||
serializer = JobOfferSerializer(data=request.data)
|
||||
if serializer.is_valid():
|
||||
if request.user.is_authenticated:
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
django
|
||||
gunicorn
|
||||
djangorestframework
|
||||
psycopg2-binary
|
||||
django-allauth
|
||||
dj-rest-auth
|
||||
django-cors-headers
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user