1
This commit is contained in:
parent
80538c5f7e
commit
854bc3fb41
Binary file not shown.
BIN
core/__pycache__/forms.cpython-311.pyc
Normal file
BIN
core/__pycache__/forms.cpython-311.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +1,4 @@
|
||||
from django.contrib import admin
|
||||
from .models import StudentProfile
|
||||
|
||||
# Register your models here.
|
||||
admin.site.register(StudentProfile)
|
||||
|
||||
16
core/forms.py
Normal file
16
core/forms.py
Normal file
@ -0,0 +1,16 @@
|
||||
from django import forms
|
||||
from .models import StudentProfile
|
||||
|
||||
class StudentProfileForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = StudentProfile
|
||||
fields = ['education', 'interests', 'aptitude_scores', 'skills',
|
||||
'resume_id', 'digilocker_id', 'languages',
|
||||
'consent_for_portfolio', 'career_preferences']
|
||||
widgets = {
|
||||
'interests': forms.Textarea(attrs={'rows': 3}),
|
||||
'aptitude_scores': forms.Textarea(attrs={'rows': 3}),
|
||||
'skills': forms.Textarea(attrs={'rows': 3}),
|
||||
'languages': forms.Textarea(attrs={'rows': 3}),
|
||||
'career_preferences': forms.Textarea(attrs={'rows': 3}),
|
||||
}
|
||||
38
core/migrations/0001_initial.py
Normal file
38
core/migrations/0001_initial.py
Normal file
@ -0,0 +1,38 @@
|
||||
# Generated by Django 5.2.7 on 2025-12-03 17:18
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Skill',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=255, unique=True)),
|
||||
('description', models.TextField(blank=True, null=True)),
|
||||
('proficiency_levels', models.JSONField(blank=True, null=True)),
|
||||
('related_jobs', models.JSONField(blank=True, null=True)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CareerPath',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('title', models.CharField(max_length=255, unique=True)),
|
||||
('description', models.TextField(blank=True, null=True)),
|
||||
('typical_roles', models.JSONField(blank=True, null=True)),
|
||||
('clusters', models.JSONField(blank=True, null=True)),
|
||||
('salary_range', models.CharField(blank=True, max_length=255, null=True)),
|
||||
('growth_trends', models.TextField(blank=True, null=True)),
|
||||
('sample_roadmap_id', models.CharField(blank=True, max_length=255, null=True)),
|
||||
('required_skills', models.ManyToManyField(related_name='career_paths', to='core.skill')),
|
||||
],
|
||||
),
|
||||
]
|
||||
32
core/migrations/0002_studentprofile.py
Normal file
32
core/migrations/0002_studentprofile.py
Normal file
@ -0,0 +1,32 @@
|
||||
# Generated by Django 5.2.7 on 2025-12-03 17:20
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0001_initial'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='StudentProfile',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('education', models.CharField(blank=True, max_length=255, null=True)),
|
||||
('interests', models.JSONField(blank=True, null=True)),
|
||||
('aptitude_scores', models.JSONField(blank=True, null=True)),
|
||||
('skills', models.JSONField(blank=True, null=True)),
|
||||
('resume_id', models.CharField(blank=True, max_length=255, null=True)),
|
||||
('digilocker_id', models.CharField(blank=True, max_length=255, null=True)),
|
||||
('languages', models.JSONField(blank=True, null=True)),
|
||||
('consent_for_portfolio', models.BooleanField(default=False)),
|
||||
('career_preferences', models.JSONField(blank=True, null=True)),
|
||||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
]
|
||||
BIN
core/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
BIN
core/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
Binary file not shown.
BIN
core/migrations/__pycache__/0002_studentprofile.cpython-311.pyc
Normal file
BIN
core/migrations/__pycache__/0002_studentprofile.cpython-311.pyc
Normal file
Binary file not shown.
@ -1,3 +1,44 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
class Skill(models.Model):
|
||||
name = models.CharField(max_length=255, unique=True)
|
||||
description = models.TextField(blank=True, null=True)
|
||||
proficiency_levels = models.JSONField(blank=True, null=True) # e.g., ["Beginner", "Intermediate", "Advanced"]
|
||||
related_jobs = models.JSONField(blank=True, null=True) # e.g., ["Software Engineer", "Data Scientist"]
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
class CareerPath(models.Model):
|
||||
title = models.CharField(max_length=255, unique=True)
|
||||
description = models.TextField(blank=True, null=True)
|
||||
required_skills = models.ManyToManyField(Skill, related_name='career_paths') # Many-to-Many relationship with Skill
|
||||
typical_roles = models.JSONField(blank=True, null=True) # e.g., ["Junior Developer", "Senior Developer"]
|
||||
clusters = models.JSONField(blank=True, null=True) # e.g., ["Software Development", "AI/ML"]
|
||||
salary_range = models.CharField(max_length=255, blank=True, null=True) # e.g., "$50k - $80k"
|
||||
growth_trends = models.TextField(blank=True, null=True)
|
||||
sample_roadmap_id = models.CharField(max_length=255, blank=True, null=True) # Reference to a roadmap
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.db.models import JSONField # Import JSONField
|
||||
|
||||
User = get_user_model()
|
||||
|
||||
class StudentProfile(models.Model):
|
||||
user = models.OneToOneField(User, on_delete=models.CASCADE)
|
||||
education = models.CharField(max_length=255, blank=True, null=True)
|
||||
interests = JSONField(blank=True, null=True)
|
||||
aptitude_scores = JSONField(blank=True, null=True)
|
||||
skills = JSONField(blank=True, null=True)
|
||||
resume_id = models.CharField(max_length=255, blank=True, null=True)
|
||||
digilocker_id = models.CharField(max_length=255, blank=True, null=True)
|
||||
languages = JSONField(blank=True, null=True)
|
||||
consent_for_portfolio = models.BooleanField(default=False)
|
||||
career_preferences = JSONField(blank=True, null=True)
|
||||
|
||||
def __str__(self):
|
||||
return f"Profile for {self.user.username}"
|
||||
|
||||
@ -3,7 +3,9 @@
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>{% block title %}Knowledge Base{% endblock %}</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Poppins:wght@600;700&display=swap" rel="stylesheet">
|
||||
{% if project_description %}
|
||||
<meta name="description" content="{{ project_description }}">
|
||||
<meta property="og:description" content="{{ project_description }}">
|
||||
@ -19,6 +21,28 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{% url 'home' %}">AI Career Advisor</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'home' %}">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'career_explorer' %}">Career Explorer</a>
|
||||
</li>
|
||||
{% if user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'student_profile' %}">My Profile</a>
|
||||
</li>
|
||||
{% endif %} </ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
|
||||
|
||||
80
core/templates/core/career_explorer.html
Normal file
80
core/templates/core/career_explorer.html
Normal file
@ -0,0 +1,80 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}Career Explorer - AI Career Advisor{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="career-explorer-hero">
|
||||
<div class="container">
|
||||
<h1>Explore Career Paths</h1>
|
||||
<p>Discover various career opportunities and the skills required to achieve them.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container my-5">
|
||||
<section id="career-paths">
|
||||
<h2>Available Career Paths</h2>
|
||||
<div class="row">
|
||||
{% for career_path in career_paths %}
|
||||
<div class="col-md-4 mb-4">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ career_path.title }}</h5>
|
||||
<p class="card-text">{{ career_path.description }}</p>
|
||||
<h6>Required Skills:</h6>
|
||||
<ul>
|
||||
{% for skill in career_path.required_skills.all %}
|
||||
<li>{{ skill.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if career_path.typical_roles %}
|
||||
<h6>Typical Roles:</h6>
|
||||
<ul>
|
||||
{% for role in career_path.typical_roles %}
|
||||
<li>{{ role }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if career_path.salary_range %}
|
||||
<p><strong>Salary Range:</strong> {{ career_path.salary_range }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
<div class="col-12">
|
||||
<p>No career paths available yet.</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="skills" class="mt-5">
|
||||
<h2>Skills Catalog</h2>
|
||||
<div class="row">
|
||||
{% for skill in skills %}
|
||||
<div class="col-md-4 mb-4">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ skill.name }}</h5>
|
||||
<p class="card-text">{{ skill.description }}</p>
|
||||
{% if skill.proficiency_levels %}
|
||||
<h6>Proficiency Levels:</h6>
|
||||
<ul>
|
||||
{% for level in skill.proficiency_levels %}
|
||||
<li>{{ level }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
<div class="col-12">
|
||||
<p>No skills available yet.</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@ -1,145 +1,88 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{ project_name }}{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
:root {
|
||||
--bg-color-start: #6a11cb;
|
||||
--bg-color-end: #2575fc;
|
||||
--text-color: #ffffff;
|
||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
body::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><path d='M-10 10L110 10M10 -10L10 110' stroke-width='1' stroke='rgba(255,255,255,0.05)'/></svg>");
|
||||
animation: bg-pan 20s linear infinite;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
@keyframes bg-pan {
|
||||
0% {
|
||||
background-position: 0% 0%;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--card-bg-color);
|
||||
border: 1px solid var(--card-border-color);
|
||||
border-radius: 16px;
|
||||
padding: 2.5rem 2rem;
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: clamp(2.2rem, 3vw + 1.2rem, 3.2rem);
|
||||
font-weight: 700;
|
||||
margin: 0 0 1.2rem;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0.5rem 0;
|
||||
font-size: 1.1rem;
|
||||
opacity: 0.92;
|
||||
}
|
||||
|
||||
.loader {
|
||||
margin: 1.5rem auto;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border: 4px solid rgba(255, 255, 255, 0.25);
|
||||
border-top-color: #fff;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.runtime code {
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
padding: 0.15rem 0.45rem;
|
||||
border-radius: 4px;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
footer {
|
||||
position: absolute;
|
||||
bottom: 1rem;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 0.85rem;
|
||||
opacity: 0.75;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block title %}AI Career Advisor{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<main>
|
||||
<div class="card">
|
||||
<h1>Analyzing your requirements and generating your app…</h1>
|
||||
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
||||
<span class="sr-only">Loading…</span>
|
||||
</div>
|
||||
<p class="hint">AppWizzy AI is collecting your requirements and applying the first changes.</p>
|
||||
<p class="hint">This page will refresh automatically as the plan is implemented.</p>
|
||||
<p class="runtime">
|
||||
Runtime: Django <code>{{ django_version }}</code> · Python <code>{{ python_version }}</code>
|
||||
— UTC <code>{{ current_time|date:"Y-m-d H:i:s" }}</code>
|
||||
</p>
|
||||
</div>
|
||||
<section class="hero-section">
|
||||
<div class="container">
|
||||
<h1>Unlock Your Potential with AI Career Advisor</h1>
|
||||
<p>Get personalized career path recommendations, skill development roadmaps, and job matching powered by advanced AI.</p>
|
||||
<a href="#" class="hero-button">Start Your Assessment</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="how-it-works-section py-5">
|
||||
<div class="container text-center">
|
||||
<h2 class="mb-4">How It Works</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="icon-box p-3">
|
||||
<img src="{% static 'images/icon-assess.svg' %}" alt="Assess Icon" class="img-fluid mb-3" style="width: 80px;">
|
||||
<h3>1. Assess Your Skills</h3>
|
||||
<p>Take our AI-powered assessments to identify your strengths, interests, and potential career aptitudes.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="icon-box p-3">
|
||||
<img src="{% static 'images/icon-plan.svg' %}" alt="Plan Icon" class="img-fluid mb-3" style="width: 80px;">
|
||||
<h3>2. Plan Your Path</h3>
|
||||
<p>Receive a personalized career roadmap with recommended courses, projects, and learning resources.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="icon-box p-3">
|
||||
<img src="{% static 'images/icon-achieve.svg' %}" alt="Achieve Icon" class="img-fluid mb-3" style="width: 80px;">
|
||||
<h3>3. Achieve Your Goals</h3>
|
||||
<p>Track your progress, earn certifications, and get matched with relevant job and internship opportunities.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="success-stories-section py-5 bg-light">
|
||||
<div class="container text-center">
|
||||
<h2 class="mb-4">Success Stories</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-6 offset-md-3">
|
||||
<blockquote class="blockquote">
|
||||
<p class="mb-0">"The AI Career Advisor helped me discover my true calling and provided a clear path to achieve my dreams. I'm now pursuing a career I'm passionate about!"</p>
|
||||
<footer class="blockquote-footer">Priya S., <cite title="Source Title">Successful Software Engineer</cite></footer>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="featured-careers-section py-5">
|
||||
<div class="container text-center">
|
||||
<h2 class="mb-4">Featured Career Paths</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="career-card p-3 border rounded mb-3">
|
||||
<h4>Data Scientist</h4>
|
||||
<p>Leverage data to solve complex problems and drive business decisions.</p>
|
||||
<a href="#" class="btn btn-outline-primary">Explore Path</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="career-card p-3 border rounded mb-3">
|
||||
<h4>AI/ML Engineer</h4>
|
||||
<p>Build intelligent systems and algorithms that learn and adapt.</p>
|
||||
<a href="#" class="btn btn-outline-primary">Explore Path</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="career-card p-3 border rounded mb-3">
|
||||
<h4>Full-Stack Developer</h4>
|
||||
<p>Develop both front-end and back-end components of web applications.</p>
|
||||
<a href="#" class="btn btn-outline-primary">Explore Path</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<footer>
|
||||
Page updated: {{ current_time|date:"Y-m-d H:i:s" }} (UTC)
|
||||
</footer>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
34
core/templates/core/student_profile_form.html
Normal file
34
core/templates/core/student_profile_form.html
Normal file
@ -0,0 +1,34 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card shadow-lg p-4 custom-card">
|
||||
<h2 class="card-title text-center mb-4">
|
||||
{% if student_profile %}Edit Your Profile{% else %}Create Your Profile{% endif %}
|
||||
</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
<div class="mb-3">
|
||||
<label for="{{ field.id_for_label }}" class="form-label">{{ field.label }}</label>
|
||||
{{ field }}
|
||||
{% if field.help_text %}
|
||||
<div class="form-text text-muted">{{ field.help_text }}</div>
|
||||
{% endif %}
|
||||
{% if field.errors %}
|
||||
{% for error in field.errors %}
|
||||
<div class="text-danger">{{ error }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
<button type="submit" class="btn btn-primary w-100 mt-3">Save Profile</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
@ -1,7 +1,8 @@
|
||||
from django.urls import path
|
||||
|
||||
from .views import home
|
||||
|
||||
from .views import home, career_explorer_view, student_profile_view
|
||||
urlpatterns = [
|
||||
path("", home, name="home"),
|
||||
path("explore/", career_explorer_view, name="career_explorer"), # New URL pattern
|
||||
path("profile/", student_profile_view, name="student_profile"),
|
||||
]
|
||||
|
||||
@ -4,6 +4,7 @@ import platform
|
||||
from django import get_version as django_version
|
||||
from django.shortcuts import render
|
||||
from django.utils import timezone
|
||||
from .models import CareerPath, Skill # Import the new models
|
||||
|
||||
|
||||
def home(request):
|
||||
@ -23,3 +24,43 @@ def home(request):
|
||||
"project_image_url": os.getenv("PROJECT_IMAGE_URL", ""),
|
||||
}
|
||||
return render(request, "core/index.html", context)
|
||||
|
||||
def career_explorer_view(request):
|
||||
"""Render the career explorer page with all career paths and skills."""
|
||||
career_paths = CareerPath.objects.all().prefetch_related('required_skills')
|
||||
skills = Skill.objects.all()
|
||||
context = {
|
||||
'career_paths': career_paths,
|
||||
'skills': skills,
|
||||
}
|
||||
return render(request, 'core/career_explorer.html', context)
|
||||
|
||||
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.shortcuts import redirect
|
||||
from .forms import StudentProfileForm
|
||||
from .models import StudentProfile
|
||||
|
||||
|
||||
@login_required
|
||||
def student_profile_view(request):
|
||||
try:
|
||||
student_profile = request.user.studentprofile
|
||||
except StudentProfile.DoesNotExist:
|
||||
student_profile = None
|
||||
|
||||
if request.method == 'POST':
|
||||
form = StudentProfileForm(request.POST, instance=student_profile)
|
||||
if form.is_valid():
|
||||
profile = form.save(commit=False)
|
||||
profile.user = request.user
|
||||
profile.save()
|
||||
return redirect('student_profile') # Redirect to the same page or a success page
|
||||
else:
|
||||
form = StudentProfileForm(instance=student_profile)
|
||||
|
||||
context = {
|
||||
'form': form,
|
||||
'student_profile': student_profile
|
||||
}
|
||||
return render(request, 'core/student_profile_form.html', context)
|
||||
|
||||
@ -1,4 +1,53 @@
|
||||
/* Custom styles for the application */
|
||||
body {
|
||||
font-family: system-ui, -apple-system, sans-serif;
|
||||
:root {
|
||||
--primary-color: #0A2540;
|
||||
--secondary-color: #FFFFFF;
|
||||
--accent-color: #30C59B;
|
||||
--background-color: #F6F9FC;
|
||||
--text-color: #333333;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Lato', sans-serif;
|
||||
color: var(--text-color);
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: 'Poppins', sans-serif;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
/* Basic styling for the hero section to be implemented in index.html */
|
||||
.hero-section {
|
||||
background: linear-gradient(180deg, var(--primary-color) 0%, #1A3E62 100%);
|
||||
color: var(--secondary-color);
|
||||
padding: 100px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hero-section h1 {
|
||||
font-family: 'Poppins', sans-serif;
|
||||
color: var(--secondary-color);
|
||||
font-size: 3.5rem;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.hero-section p {
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.hero-button {
|
||||
background-color: var(--accent-color);
|
||||
color: var(--secondary-color);
|
||||
padding: 15px 30px;
|
||||
border-radius: 5px;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
font-size: 1.1rem;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.hero-button:hover {
|
||||
background-color: #28a77f; /* Slightly darker accent for hover */
|
||||
}
|
||||
3
static/images/icon-achieve.svg
Normal file
3
static/images/icon-achieve.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9 21.035L7.425 19.46L2.39 14.43L0.975 15.845L7.425 22.3L23.035 6.69L21.62 5.275L9 17.89L2.39 11.28L0.975 12.695L9 21.035Z" fill="#30C59B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 253 B |
3
static/images/icon-assess.svg
Normal file
3
static/images/icon-assess.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V15H13V17ZM13 13H11V7H13V13Z" fill="#30C59B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 260 B |
3
static/images/icon-plan.svg
Normal file
3
static/images/icon-plan.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM17 8H7V7H17V8ZM17 11H7V10H17V11ZM17 14H7V13H17V14ZM12 17H7V16H12V17Z" fill="#30C59B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 309 B |
@ -1,21 +1,53 @@
|
||||
|
||||
:root {
|
||||
--bg-color-start: #6a11cb;
|
||||
--bg-color-end: #2575fc;
|
||||
--text-color: #ffffff;
|
||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
||||
--primary-color: #0A2540;
|
||||
--secondary-color: #FFFFFF;
|
||||
--accent-color: #30C59B;
|
||||
--background-color: #F6F9FC;
|
||||
--text-color: #333333;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||
font-family: 'Lato', sans-serif;
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: 'Poppins', sans-serif;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
/* Basic styling for the hero section to be implemented in index.html */
|
||||
.hero-section {
|
||||
background: linear-gradient(180deg, var(--primary-color) 0%, #1A3E62 100%);
|
||||
color: var(--secondary-color);
|
||||
padding: 100px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hero-section h1 {
|
||||
font-family: 'Poppins', sans-serif;
|
||||
color: var(--secondary-color);
|
||||
font-size: 3.5rem;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.hero-section p {
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.hero-button {
|
||||
background-color: var(--accent-color);
|
||||
color: var(--secondary-color);
|
||||
padding: 15px 30px;
|
||||
border-radius: 5px;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
font-size: 1.1rem;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.hero-button:hover {
|
||||
background-color: #28a77f; /* Slightly darker accent for hover */
|
||||
}
|
||||
3
staticfiles/images/icon-achieve.svg
Normal file
3
staticfiles/images/icon-achieve.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9 21.035L7.425 19.46L2.39 14.43L0.975 15.845L7.425 22.3L23.035 6.69L21.62 5.275L9 17.89L2.39 11.28L0.975 12.695L9 21.035Z" fill="#30C59B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 253 B |
3
staticfiles/images/icon-assess.svg
Normal file
3
staticfiles/images/icon-assess.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V15H13V17ZM13 13H11V7H13V13Z" fill="#30C59B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 260 B |
3
staticfiles/images/icon-plan.svg
Normal file
3
staticfiles/images/icon-plan.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM17 8H7V7H17V8ZM17 11H7V10H17V11ZM17 14H7V13H17V14ZM12 17H7V16H12V17Z" fill="#30C59B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 309 B |
Loading…
x
Reference in New Issue
Block a user