This commit is contained in:
ismail 2025-10-12 13:44:52 +03:00
parent 916cbc4fcf
commit 9a768726e5
19 changed files with 108 additions and 55 deletions

3
.gitignore vendored
View File

@ -1,4 +1,4 @@
<<<<<<< HEAD
# Byte-compiled / optimized / DLL files
__pycache__/
*.pyc
@ -110,4 +110,3 @@ local_settings.py
# If a rule in .gitignore ends with a directory separator (i.e. `/`
# character), then remove the file in the remaining pattern string and all
# files with the same name in subdirectories.
>>>>>>> 29790ab (add external integration)

View File

@ -57,7 +57,6 @@ INSTALLED_APPS = [
'django_countries',
'django_celery_results',
'django_q',
]
SITE_ID = 1
@ -252,4 +251,104 @@ Q_CLUSTER = {
'max_attempts': 1,
},
}
}
}
customColorPalette = [
{
'color': 'hsl(4, 90%, 58%)',
'label': 'Red'
},
{
'color': 'hsl(340, 82%, 52%)',
'label': 'Pink'
},
{
'color': 'hsl(291, 64%, 42%)',
'label': 'Purple'
},
{
'color': 'hsl(262, 52%, 47%)',
'label': 'Deep Purple'
},
{
'color': 'hsl(231, 48%, 48%)',
'label': 'Indigo'
},
{
'color': 'hsl(207, 90%, 54%)',
'label': 'Blue'
},
]
CKEDITOR_5_CUSTOM_CSS = 'path_to.css' # optional
CKEDITOR_5_FILE_STORAGE = "path_to_storage.CustomStorage" # optional
CKEDITOR_5_CONFIGS = {
'default': {
'toolbar': {
'items': ['heading', '|', 'bold', 'italic', 'link',
'bulletedList', 'numberedList', 'blockQuote', 'imageUpload', ],
}
},
'extends': {
'blockToolbar': [
'paragraph', 'heading1', 'heading2', 'heading3',
'|',
'bulletedList', 'numberedList',
'|',
'blockQuote',
],
'toolbar': {
'items': ['heading', '|', 'outdent', 'indent', '|', 'bold', 'italic', 'link', 'underline', 'strikethrough',
'code','subscript', 'superscript', 'highlight', '|', 'codeBlock', 'sourceEditing', 'insertImage',
'bulletedList', 'numberedList', 'todoList', '|', 'blockQuote', 'imageUpload', '|',
'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor', 'mediaEmbed', 'removeFormat',
'insertTable',
],
'shouldNotGroupWhenFull': 'true'
},
'image': {
'toolbar': ['imageTextAlternative', '|', 'imageStyle:alignLeft',
'imageStyle:alignRight', 'imageStyle:alignCenter', 'imageStyle:side', '|'],
'styles': [
'full',
'side',
'alignLeft',
'alignRight',
'alignCenter',
]
},
'table': {
'contentToolbar': [ 'tableColumn', 'tableRow', 'mergeTableCells',
'tableProperties', 'tableCellProperties' ],
'tableProperties': {
'borderColors': customColorPalette,
'backgroundColors': customColorPalette
},
'tableCellProperties': {
'borderColors': customColorPalette,
'backgroundColors': customColorPalette
}
},
'heading' : {
'options': [
{ 'model': 'paragraph', 'title': 'Paragraph', 'class': 'ck-heading_paragraph' },
{ 'model': 'heading1', 'view': 'h1', 'title': 'Heading 1', 'class': 'ck-heading_heading1' },
{ 'model': 'heading2', 'view': 'h2', 'title': 'Heading 2', 'class': 'ck-heading_heading2' },
{ 'model': 'heading3', 'view': 'h3', 'title': 'Heading 3', 'class': 'ck-heading_heading3' }
]
}
},
'list': {
'properties': {
'styles': 'true',
'startIndex': 'true',
'reversed': 'true',
}
}
}
# Define a constant in settings.py to specify file upload permissions
CKEDITOR_5_FILE_UPLOAD_PERMISSION = "staff" # Possible values: "staff", "authenticated", "any"

Binary file not shown.

View File

@ -1,4 +1,4 @@
# Generated by Django 5.2.7 on 2025-10-11 11:04
# Generated by Django 5.2.6 on 2025-10-12 10:34
import django.core.validators
import django.db.models.deletion
@ -220,6 +220,7 @@ class Migration(migrations.Migration):
('parsed_summary', models.TextField(blank=True, verbose_name='Parsed Summary')),
('applied', models.BooleanField(default=False, verbose_name='Applied')),
('stage', models.CharField(choices=[('Applied', 'Applied'), ('Exam', 'Exam'), ('Interview', 'Interview'), ('Offer', 'Offer')], default='Applied', max_length=100, verbose_name='Stage')),
('applicant_status', models.CharField(blank=True, choices=[('Applicant', 'Applicant'), ('Candidate', 'Candidate')], default='Applicant', max_length=100, null=True, verbose_name='Applicant Status')),
('exam_date', models.DateField(blank=True, null=True, verbose_name='Exam Date')),
('exam_status', models.CharField(blank=True, choices=[('Passed', 'Passed'), ('Failed', 'Failed')], max_length=100, null=True, verbose_name='Exam Status')),
('interview_date', models.DateField(blank=True, null=True, verbose_name='Interview Date')),
@ -321,9 +322,7 @@ class Migration(migrations.Migration):
name='JobPostingImage',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('post_image', models.ImageField(height_field='photo_height', upload_to='post/', width_field='photo_width')),
('post_image_height', models.PositiveIntegerField(blank=True, null=True)),
('post_image_width', models.PositiveIntegerField(blank=True, null=True)),
('post_image', models.ImageField(upload_to='post/')),
('job', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='post_images', to='recruitment.jobposting')),
],
),

View File

@ -1,26 +0,0 @@
# Generated by Django 5.2.7 on 2025-10-11 12:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('recruitment', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='jobpostingimage',
name='post_image_height',
),
migrations.RemoveField(
model_name='jobpostingimage',
name='post_image_width',
),
migrations.AlterField(
model_name='jobpostingimage',
name='post_image',
field=models.ImageField(upload_to='post/'),
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 5.2.6 on 2025-10-11 14:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('recruitment', '0003_candidate_is_resume_parsed_and_more'),
]
operations = [
migrations.AddField(
model_name='candidate',
name='applicant_status',
field=models.CharField(blank=True, choices=[('Applicant', 'Applicant'), ('Candidate', 'Candidate')], default='Applicant', max_length=100, null=True, verbose_name='Applicant Status'),
),
]

View File

@ -79,7 +79,7 @@ class JobPosting(Base):
# Job Details
description = CKEditor5Field(
'Description',
'Description',
config_name='extends' # Matches the config name you defined in settings.py
)
@ -118,7 +118,7 @@ class JobPosting(Base):
("ARCHIVED", "Archived"),
]
status = models.CharField(
max_length=20, choices=STATUS_CHOICES, default="DRAFT", null=True, blank=True
max_length=20, choices=STATUS_CHOICES, default="DRAFT"
)
# hashtags for social media
@ -250,7 +250,7 @@ class JobPosting(Base):
class JobPostingImage(models.Model):
job=models.ForeignKey('JobPosting',on_delete=models.CASCADE,related_name='post_images')
post_image = models.ImageField(upload_to='post/')
class Candidate(Base):
class Stage(models.TextChoices):