-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from victoriajury/2-add-function-to-update-resu…
…me-sections refactor resume, add models and migrations
- Loading branch information
Showing
27 changed files
with
235 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ name = "pypi" | |
|
||
[packages] | ||
django = "*" | ||
django-email-obfuscator = "*" | ||
|
||
[dev-packages] | ||
black = "*" | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
from django.contrib import admin # noqa # pylint: disable=unused-import | ||
from django.contrib import admin | ||
from pages.models import ResumeEducation, ResumeExperience, ResumeSkill, ResumeSummary | ||
|
||
# Register your models here. | ||
|
||
class ResumeAdminSummary(admin.ModelAdmin): | ||
list_display = ["name", "address"] | ||
|
||
|
||
class ResumeAdminEducation(admin.ModelAdmin): | ||
list_display = ["location", "date_attended"] | ||
|
||
|
||
class ResumeAdminSkills(admin.ModelAdmin): | ||
list_display = ["skill", "category"] | ||
|
||
|
||
class ResumeAdminExperience(admin.ModelAdmin): | ||
list_display = ["role", "date_attended", "location"] | ||
|
||
|
||
admin.site.register(ResumeSummary, ResumeAdminSummary) | ||
admin.site.register(ResumeEducation, ResumeAdminEducation) | ||
admin.site.register(ResumeSkill, ResumeAdminSkills) | ||
admin.site.register(ResumeExperience, ResumeAdminExperience) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Generated by Django 5.1.2 on 2024-10-15 06:33 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies: list[tuple] = [] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="ResumeEducation", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("location", models.CharField(max_length=100)), | ||
("date_attended", models.CharField(max_length=50)), | ||
("study_details", models.TextField()), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name="ResumeExperience", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("role", models.CharField(max_length=100)), | ||
("date_attended", models.CharField(max_length=50)), | ||
("location", models.CharField(max_length=100)), | ||
("role_details", models.TextField()), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name="ResumeSkill", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("category", models.CharField(max_length=100)), | ||
("skill", models.CharField(max_length=50)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name="ResumeSummary", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("name", models.CharField(max_length=100)), | ||
("bio", models.CharField(max_length=100)), | ||
("address", models.CharField(max_length=100)), | ||
("telephone", models.CharField(max_length=50)), | ||
("email", models.CharField(max_length=100)), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,27 @@ | ||
from django.db import models # noqa # pylint: disable=unused-import | ||
from django.db import models | ||
|
||
# Create your models here. | ||
|
||
class ResumeSummary(models.Model): | ||
name = models.CharField(max_length=100) | ||
bio = models.CharField(max_length=100) | ||
address = models.CharField(max_length=100) | ||
telephone = models.CharField(max_length=50) | ||
email = models.CharField(max_length=100) | ||
|
||
|
||
class ResumeEducation(models.Model): | ||
location = models.CharField(max_length=100) | ||
date_attended = models.CharField(max_length=50) | ||
study_details = models.TextField() | ||
|
||
|
||
class ResumeSkill(models.Model): | ||
category = models.CharField(max_length=100) | ||
skill = models.CharField(max_length=50) | ||
|
||
|
||
class ResumeExperience(models.Model): | ||
role = models.CharField(max_length=100) | ||
date_attended = models.CharField(max_length=50) | ||
location = models.CharField(max_length=100) | ||
role_details = models.TextField() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{% extends "base.html" %} | ||
{% load static %} | ||
{% load email_obfuscator %} | ||
{% block resume_page_content %} | ||
|
||
<!-- ======= Resume Section ======= --> | ||
<section id="resume" class="resume"> | ||
<div class="container"> | ||
|
||
<div class="section-title"> | ||
<h2>Resume</h2> | ||
<p>Work Experience</p> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-lg-6"> | ||
<h3 class="resume-title">Summary</h3> | ||
<div class="resume-item pb-0"> | ||
<h4>{{ summary.name }}</h4> | ||
<p><em>{{ summary.bio }}</em></p> | ||
<ul> | ||
<li>{{ summary.address }}</li> | ||
<li>{{ summary.telephone }}</li> | ||
<li> | ||
{{ summary.email|obfuscate_mailto }} | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<h3 class="resume-title">Education</h3> | ||
|
||
{% for edu in education %} | ||
<div class="resume-item"> | ||
<h4>{{ edu.location }}</h4> | ||
<h5>{{ edu.date_attended}}</h5> | ||
{{ edu.study_details|safe }} | ||
</div> | ||
{% endfor %} | ||
|
||
<h3 class="resume-title">Skills</h3> | ||
<div class="resume-item pb-0"> | ||
<h4>Technical Skills</h4> | ||
<ul> | ||
{% for s in technical_skills %} | ||
<li>{{ s.skill }}</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
<div class="resume-item pb-0"> | ||
<h4>Languages</h4> | ||
<ul> | ||
{% for s in language_skills %} | ||
<li>{{ s.skill }}</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> | ||
<div class="col-lg-6"> | ||
<h3 class="resume-title">Professional Experience</h3> | ||
{% for exp in experience %} | ||
<div class="resume-item"> | ||
<h4>{{ exp.role }}</h4> | ||
<h5>{{ exp.date_attended }}</h5> | ||
<p><em>{{ exp.location }}</em></p> | ||
{{ exp.role_details|safe }} | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</section><!-- End Resume Section --> | ||
|
||
{% endblock resume_page_content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
from django.shortcuts import render | ||
from pages.models import ResumeEducation, ResumeExperience, ResumeSkill, ResumeSummary | ||
|
||
|
||
def home(request): | ||
return render(request, "pages/home.html", {}) | ||
resume_summary = ResumeSummary.objects.first() | ||
resume_education = ResumeEducation.objects.all() | ||
technical_skills = ResumeSkill.objects.filter(category="Technical Skills") | ||
languages = ResumeSkill.objects.filter(category="Languages") | ||
resume_experience = ResumeExperience.objects.all() | ||
context = { | ||
"summary": resume_summary, | ||
"education": resume_education, | ||
"technical_skills": technical_skills, | ||
"language_skills": languages, | ||
"experience": resume_experience, | ||
} | ||
return render(request, "pages/resume.html", context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.