diff --git a/.gitignore b/.gitignore
index 82f9275..5475160 100644
--- a/.gitignore
+++ b/.gitignore
@@ -160,3 +160,5 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
+
+uploads/
diff --git a/Pipfile b/Pipfile
index 19b810a..848c5c8 100644
--- a/Pipfile
+++ b/Pipfile
@@ -5,6 +5,7 @@ name = "pypi"
[packages]
django = "*"
+django-email-obfuscator = "*"
[dev-packages]
black = "*"
diff --git a/Pipfile.lock b/Pipfile.lock
index 7cb56b0..3708e95 100644
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
- "sha256": "f2e0f95e2cafd500e2a1e9accc086889be2554491dce81c6582187c0225376d0"
+ "sha256": "366e8aadaad69952944187e1559a94004800b6c4eb26fff16f1a9418ae966735"
},
"pipfile-spec": 6,
"requires": {
@@ -33,6 +33,13 @@
"markers": "python_version >= '3.10'",
"version": "==5.1.2"
},
+ "django-email-obfuscator": {
+ "hashes": [
+ "sha256:055d5251ebfb4aa3431c238927461e6b4bd501f937b5207cd175f7ea50519f32"
+ ],
+ "index": "pypi",
+ "version": "==0.1.5"
+ },
"sqlparse": {
"hashes": [
"sha256:773dcbf9a5ab44a090f3441e2180efe2560220203dc2f8c0b0fa141e18b505e4",
diff --git a/pages/admin.py b/pages/admin.py
index 2a54049..cbca48f 100644
--- a/pages/admin.py
+++ b/pages/admin.py
@@ -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)
diff --git a/pages/migrations/0001_initial.py b/pages/migrations/0001_initial.py
new file mode 100644
index 0000000..a316255
--- /dev/null
+++ b/pages/migrations/0001_initial.py
@@ -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)),
+ ],
+ ),
+ ]
diff --git a/pages/models.py b/pages/models.py
index 409fd9d..d593553 100644
--- a/pages/models.py
+++ b/pages/models.py
@@ -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()
diff --git a/pages/templates/pages/resume.html b/pages/templates/pages/resume.html
new file mode 100644
index 0000000..d830601
--- /dev/null
+++ b/pages/templates/pages/resume.html
@@ -0,0 +1,74 @@
+{% extends "base.html" %}
+{% load static %}
+{% load email_obfuscator %}
+{% block resume_page_content %}
+
+
+
+
+
+
+
Resume
+
Work Experience
+
+
+
+
+
Summary
+
+
{{ summary.name }}
+
{{ summary.bio }}
+
+ - {{ summary.address }}
+ - {{ summary.telephone }}
+ -
+ {{ summary.email|obfuscate_mailto }}
+
+
+
+
+
Education
+
+ {% for edu in education %}
+
+
{{ edu.location }}
+ {{ edu.date_attended}}
+ {{ edu.study_details|safe }}
+
+ {% endfor %}
+
+
Skills
+
+
Technical Skills
+
+ {% for s in technical_skills %}
+ - {{ s.skill }}
+ {% endfor %}
+
+
+
+
Languages
+
+ {% for s in language_skills %}
+ - {{ s.skill }}
+ {% endfor %}
+
+
+
+
+
Professional Experience
+ {% for exp in experience %}
+
+
{{ exp.role }}
+
{{ exp.date_attended }}
+
{{ exp.location }}
+ {{ exp.role_details|safe }}
+
+ {% endfor %}
+
+
+
+
+
+
+{% endblock resume_page_content %}
\ No newline at end of file
diff --git a/pages/views.py b/pages/views.py
index 35737bc..aa50b50 100644
--- a/pages/views.py
+++ b/pages/views.py
@@ -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)
diff --git a/personal_portfolio/settings.py b/personal_portfolio/settings.py
index b6e70f7..e8c529c 100644
--- a/personal_portfolio/settings.py
+++ b/personal_portfolio/settings.py
@@ -37,6 +37,7 @@
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
+ "email_obfuscator",
# local apps
"pages.apps.PagesConfig",
"projects.apps.ProjectsConfig",
diff --git a/templates/base.html b/templates/base.html
index d44116c..734532e 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -50,8 +50,8 @@
I'm a passionate software engineer and web developer