Skip to content

fix/scope: resolve 500 errors on home and project pages#765

Open
Ayush-kathil wants to merge 2 commits into
komalharshita:mainfrom
Ayush-kathil:fix/resolve-500-errors
Open

fix/scope: resolve 500 errors on home and project pages#765
Ayush-kathil wants to merge 2 commits into
komalharshita:mainfrom
Ayush-kathil:fix/resolve-500-errors

Conversation

@Ayush-kathil
Copy link
Copy Markdown

Description

This PR resolves the 500 Internal Server Errors that were crashing the application on the home page and individual project pages.

Changes Made

  • utils/data_loader.py: Initialized _projects_cache and _cache_lock at the module level to fix the NameError causing the home page crash.
  • data/projects.json: Re-assigned unique IDs (30 and 31) to "Feedback Survey Form" and "API ETL Pipeline" to fix the validation crash caused by duplicated IDs (9 and 10).
  • templates/project.html: Replaced the unsupported Django escapejs filter with Jinja2's tojson filter (line 479) to properly safely output the PROJECT_TITLE into JavaScript without crashing the template renderer.

Verification

  • All 62 automated tests in tests/test_basic.py pass.
  • The home page loads correctly and displays the project dataset without 500 errors.
  • The project detail pages render correctly without throwing Jinja2 filter errors.
  • Tested locally in the browser at http://127.0.0.1:5000.

Closes #764

- Initialize global cache variables in data_loader.py
- Fix duplicate project IDs in projects.json
- Replace Django escapejs with Jinja tojson filter in project.html
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

@Ayush-kathil is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting your first pull request to DevPath.

Before review:

  • Complete the PR template fully
  • Ensure all tests pass
  • Link your PR to an issue
  • Keep changes scoped to the issue

A maintainer will review your contribution soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 500 Internal Server Errors on Home Page and Project Details

1 participant