Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions account/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Generated by Django 4.2.5 on 2023-10-12 06:07

import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone


class Migration(migrations.Migration):

initial = True

dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
]

operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('password', models.CharField(max_length=128, verbose_name='password')),
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('first_name', models.CharField(max_length=50)),
('last_name', models.CharField(max_length=50)),
('address', models.CharField(max_length=100)),
('city', models.CharField(max_length=50)),
('zip_code', models.CharField(max_length=10)),
('country', models.CharField(max_length=50)),
('email', models.EmailField(max_length=254, unique=True)),
('phone', models.CharField(max_length=20)),
('bio', models.TextField()),
('user_type', models.CharField(choices=[('Applicant', 'Applicant'), ('Employeer', 'Employeer')], default='Employeer', max_length=10)),
('is_employer', models.BooleanField(default=False)),
('is_applicant', models.BooleanField(default=False)),
('is_suspend', models.BooleanField(default=False)),
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
],
options={
'verbose_name': 'user',
'verbose_name_plural': 'users',
'abstract': False,
},
),
]
136 changes: 136 additions & 0 deletions job/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# Generated by Django 4.2.5 on 2023-10-12 06:07

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.CreateModel(
name='Application',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('status', models.CharField(choices=[('Pending', 'Pending'), ('Shortlisted', 'Shortlisted'), ('Approved', 'Approved'), ('Rejected', 'Rejected')], default='Pending', max_length=20)),
('message', models.TextField(default='', max_length=1000)),
('applicant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'Application',
'verbose_name_plural': 'Applications',
'ordering': ['-created_at'],
},
),
migrations.CreateModel(
name='Category',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(default='', max_length=50)),
('slug', models.SlugField(blank=True, null=True, unique=True)),
('description', models.TextField(default='', max_length=1000)),
],
options={
'verbose_name': 'Category',
'verbose_name_plural': 'Categories',
'ordering': ['-created_at'],
},
),
migrations.CreateModel(
name='Company',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(default='', max_length=100)),
('description', models.TextField(default='', max_length=1000)),
('website', models.URLField(default='', max_length=100)),
('logo', models.ImageField(upload_to='companies')),
('slug', models.SlugField(blank=True, null=True, unique=True)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_companies', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'Company',
'verbose_name_plural': 'Companies',
'ordering': ['-created_at'],
},
),
migrations.CreateModel(
name='Location',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(default='', max_length=50)),
('slug', models.SlugField(blank=True, null=True, unique=True)),
],
options={
'verbose_name': 'Location',
'verbose_name_plural': 'Locations',
'ordering': ['-created_at'],
},
),
migrations.CreateModel(
name='Tag',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(default='', max_length=50)),
('slug', models.SlugField(blank=True, null=True, unique=True)),
],
options={
'verbose_name': 'Tag',
'verbose_name_plural': 'Tags',
'ordering': ['-created_at'],
},
),
migrations.CreateModel(
name='Job',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('title', models.CharField(default='', max_length=100)),
('description', models.TextField(default='', max_length=1000)),
('views', models.IntegerField(default=0)),
('job_type', models.CharField(choices=[('Part Time', 'Part Time'), ('Full Time', 'Full Time'), ('Remote', 'Remote'), ('Internship', 'Internship'), ('Contract', 'Contract'), ('Temporary', 'Temporary')], default='', max_length=20)),
('vacancy', models.IntegerField(default=1)),
('salary', models.IntegerField(default=0)),
('experience', models.IntegerField(default=1)),
('image', models.ImageField(upload_to='jobs')),
('slug', models.SlugField(blank=True, null=True, unique=True)),
('is_published', models.BooleanField(default=False)),
('is_featured', models.BooleanField(default=False)),
('is_closed', models.BooleanField(default=False)),
('is_approved', models.BooleanField(default=False)),
('applicants', models.ManyToManyField(related_name='job_applicants', to=settings.AUTH_USER_MODEL)),
('applications', models.ManyToManyField(blank=True, related_name='job_applications', to='job.application')),
('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='category_jobs', to='job.category')),
('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='company_jobs', to='job.company')),
('employer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='employer_jobs', to=settings.AUTH_USER_MODEL)),
('location', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='job_location', to='job.location')),
('tags', models.ManyToManyField(related_name='job_tags', to='job.tag')),
],
options={
'verbose_name': 'Job',
'verbose_name_plural': 'Jobs',
'ordering': ['-created_at'],
},
),
migrations.AddField(
model_name='application',
name='job',
field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='job_applications', to='job.job'),
),
]
1 change: 1 addition & 0 deletions jobify/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',


# Third party apps
'core',
Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
asgiref==3.7.2
Django==4.2.5
Pillow==10.0.1
psycopg2==2.9.9
sqlparse==0.4.4
typing_extensions==4.8.0
tzdata==2023.3