Skip to content

Commit

Permalink
Merge pull request #3 from Mubashir12392/master
Browse files Browse the repository at this point in the history
Add some Changes
  • Loading branch information
Usman4862 committed Mar 16, 2023
2 parents 36730c9 + a686517 commit 3261dfb
Show file tree
Hide file tree
Showing 19 changed files with 603 additions and 1,236 deletions.
5 changes: 4 additions & 1 deletion JobFreedom/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path
from recruiters.views import browse_jobs, home, candidates, blogs, single_blog, contact
from recruiters.views import home, contact,post_job
from employees.views import browse_jobs, candidates, blogs, single_blog,want_job



Expand All @@ -29,6 +30,8 @@
path('candidates/', candidates, name="candidates"),
path('blogs/', blogs, name="blogs"),
path('single/blogs/', single_blog, name="single-blog"),
path('jobpost/',post_job,name='post-job'),
path('wantjob/',want_job,name='want-job'),
path('contact/', contact, name="contact"),
]
if settings.DEBUG:
Expand Down
18 changes: 18 additions & 0 deletions employees/migrations/0002_employeeprofile_location.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.1.7 on 2023-03-15 20:14

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('employees', '0001_initial'),
]

operations = [
migrations.AddField(
model_name='employeeprofile',
name='location',
field=models.CharField(default='Pakistan', max_length=30),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.1.7 on 2023-03-15 20:16

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('employees', '0002_employeeprofile_location'),
]

operations = [
migrations.RenameField(
model_name='employeeprofile',
old_name='user',
new_name='employee_name',
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.1.7 on 2023-03-15 20:22

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('employees', '0003_rename_user_employeeprofile_employee_name'),
]

operations = [
migrations.RenameField(
model_name='employeeprofile',
old_name='employee_name',
new_name='user',
),
]
1 change: 1 addition & 0 deletions employees/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class ChoicesEmployeeSkills(models.TextChoices):
skills = models.CharField(max_length=200, choices=ChoicesEmployeeSkills.choices)
education = models.CharField(max_length=100,choices=EDUCATION_CHOICES)
about = models.TextField(max_length=500)
location = models.CharField(max_length=30, default='Pakistan')
interest =models.CharField(max_length=100, choices=INTEREST_CHOICES)

def __str__(self):
Expand Down
31 changes: 30 additions & 1 deletion employees/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
from django.shortcuts import render

from recruiters.models import JobPost
from employees.models import EmployeeProfile
# Create your views here.
def browse_jobs(request):
jobs = JobPost.objects.all()
context = {
'Jobs': jobs,
}

return render(request, "browsejobs.html", context=context)

def candidates(request):
employees = EmployeeProfile.objects.all()
context = {
'employees' : employees,
}
return render(request, "candidates.html", context=context)

def blogs(request):
return render(request, "blog.html")

def single_blog(request):
return render(request, "blog-single.html")

def want_job(request):
jobs = JobPost.objects.all()
context = {
'Jobs': jobs,
}
return render(request, 'want-job.html', context=context)

18 changes: 18 additions & 0 deletions recruiters/migrations/0002_jobpost_job_timing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.1.7 on 2023-03-15 19:07

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('recruiters', '0001_initial'),
]

operations = [
migrations.AddField(
model_name='jobpost',
name='job_timing',
field=models.CharField(choices=[('Full_Time', 'Full Time'), ('Part_Time', 'Part Time'), ('Contract', 'Contract')], default='Full Time', max_length=30),
),
]
21 changes: 21 additions & 0 deletions recruiters/migrations/0003_alter_jobpost_recruiter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 4.1.7 on 2023-03-15 19:14

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


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('recruiters', '0002_jobpost_job_timing'),
]

operations = [
migrations.AlterField(
model_name='jobpost',
name='recruiter',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
),
]
19 changes: 19 additions & 0 deletions recruiters/migrations/0004_alter_jobpost_recruiter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 4.1.7 on 2023-03-15 19:15

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


class Migration(migrations.Migration):

dependencies = [
('recruiters', '0003_alter_jobpost_recruiter'),
]

operations = [
migrations.AlterField(
model_name='jobpost',
name='recruiter',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='recruiters.recruiter'),
),
]
6 changes: 6 additions & 0 deletions recruiters/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ class GenderPreference(models.TextChoices):
MALE = 'M', ('Male')
FEMALE = 'F', ('Female')
OTHERS = 'O', ('Others')

class Jobtiming(models.TextChoices):
Full_Time = 'Full_Time',('Full Time')
Part_Time = 'Part_Time', ('Part Time')
Contract = 'Contract', ('Contract')

recruiter = models.ForeignKey(Recruiter, on_delete=models.PROTECT)
job_title = models.CharField(max_length=50, null=False, blank=False)
Expand All @@ -61,6 +66,7 @@ class GenderPreference(models.TextChoices):
number_of_positions = models.PositiveIntegerField()
job_location = models.CharField(max_length=30)
minimum_qualification_required = models.CharField(max_length=20, choices=MinQualificationRequired.choices)
job_timing = models.CharField(max_length=30, choices=Jobtiming.choices,default='Full Time')
required_experience = models.CharField(max_length=30)
minimum_salary = models.PositiveIntegerField()
maximum_salary = models.PositiveIntegerField()
Expand Down
13 changes: 2 additions & 11 deletions recruiters/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,8 @@
def home(request):
return render(request, "index.html")

def browse_jobs(request):
return render(request, "browsejobs.html")

def candidates(request):
return render(request, "candidates.html")

def blogs(request):
return render(request, "blog.html")

def single_blog(request):
return render(request, "blog-single.html")
def post_job(request):
return render(request,'new-job-post.html')

def contact(request):
return render(request, "contact.html")
4 changes: 2 additions & 2 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
<li class="nav-item"><a href="{% url 'candidates' %}" class="nav-link">Canditates</a></li>
<li class="nav-item"><a href="{% url 'blogs' %}" class="nav-link">Blogs</a></li>
<li class="nav-item"><a href="{% url 'contact' %}" class="nav-link">Contact</a></li>
<li class="nav-item cta mr-md-1"><a href="new-post.html" class="nav-link">Post a Job</a></li>
<li class="nav-item cta cta-colored"><a href="job-post.html" class="nav-link">Want a Job</a></li>
<li class="nav-item cta mr-md-1"><a href="{% url 'post-job' %}" class="nav-link">Post a Job</a></li>
<li class="nav-item cta cta-colored"><a href="{% url 'want-job' %}" class="nav-link">Want a Job</a></li>

</ul>
</div>
Expand Down
Loading

0 comments on commit 3261dfb

Please sign in to comment.