Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
victoriajury committed Dec 11, 2024
1 parent 964cbab commit 0e59a91
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions projects/views.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
from profile.models import ResumeSummary

from django.shortcuts import render
from projects.models import IMAGE_COUNT, Project
from profile.models import ResumeSummary


def project_index(request):
projects = Project.objects.all().order_by("-date")
resume_summary = ResumeSummary.objects.first()
context = {
"projects": projects,
"summary": resume_summary
}
context = {"projects": projects, "summary": resume_summary}
return render(request, "projects/project_index.html", context)


def project_detail(request, pk):
project = Project.objects.get(pk=pk)
project_images = [project.__getattribute__(f"image{i}") for i in range(1, IMAGE_COUNT + 1)]
resume_summary = ResumeSummary.objects.first()
context = {
"project": project,
"project_images": project_images,
"summary": resume_summary
}
context = {"project": project, "project_images": project_images, "summary": resume_summary}
return render(request, "projects/project_detail.html", context)

0 comments on commit 0e59a91

Please sign in to comment.