Skip to content

Add Django project foundation CRASM - 4443 - #1689

Merged
nickviola merged 5 commits into
developfrom
cd_WAS_serverless_conversion
Oct 30, 2026
Merged

nickviola merged 5 commits into
developfrom
cd_WAS_serverless_conversion

Conversation

@cduhn17

@cduhn17 cduhn17 commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

🗣 Description

This PR establishes the initial Django application foundation for WAS while preserving the existing CLI-based reporting and operational workflows.

  • Adds Django 5.2 and creates the WAS Django project under backend/was/src/was_django_project.
  • Creates initial application boundaries for accounts, audit, core, operations, Qualys administration, reports, stakeholders, and tracker functionality.
  • Adds environment-backed Django, PostgreSQL, static-file, logging, cookie, and HTTP security settings.
  • Adds Mangum integration and exposes the Django ASGI application through a Lambda-compatible handler.
  • Adds CloudWatch logging support for the future Lambda environment.
  • Adds a shared template shell with page titles, navigation, Django message display, a main-content block, keyboard focus behavior, and a skip-to-content link.
  • Adds an initial WAS landing page, tracked stylesheet, and minimal /health/ endpoint.
  • Adds smoke tests covering the landing page, health endpoint, shared template, URL configuration, and Mangum handler.
  • Integrates the Django smoke tests into the existing make test target so they run in the WAS CI pipeline.
  • Documents local Django development using uv, .env, PostgreSQL, manage.py check, the development server, and Django tests.
  • Adds the required Django environment-variable placeholders to backend/was/dev.env.

This is a foundation change only. It does not migrate existing WAS CLI operations, implement the extended user model or Okta SSO, provision AWS infrastructure, or define the production static-file delivery path.

💭 Motivation and context

WAS is being incrementally transitioned from a terminal-based interface to an internal, server-rendered Django application. The transition must preserve the current report-generation, tracker, stakeholder, Qualys, and delivery behavior while new user-interface workflows are introduced in controlled follow-up changes.

A stable Django foundation is needed before frontend development, authentication, or migration of existing operations can begin. This change establishes the project structure, application boundaries, environment configuration, shared page shell, local development workflow, and automated smoke-test coverage needed for that work.

Mangum provides the initial Lambda-compatible application entry point for the planned serverless architecture. The health endpoint and CI-integrated smoke tests provide early verification that Django routing, templates, static assets, and the serverless application wrapper remain functional as later features are added.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All future TODOs are captured in issues, which are referenced in code comments.
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • AI was used for research and/or understanding purposes while creating this pull request.
  • AI was used to generate code in this PR (either fully or in part).
    • I attest that I understand the AI-generated code and its functionality.
    • I am comfortable answering questions about the implementation of the AI-generated code.
  • All new and existing tests pass.
  • Bump major, minor, patch, pre-release, and/or build versions as appropriate via the bump_version script if this repository is versioned and the changes in this PR warrant a version bump.
  • Create a pre-release (necessary if and only if the pre-release version was bumped).

@cduhn17 cduhn17 changed the title feat(was): add Django project foundation Add Django project foundation Oct 28, 2026
@cduhn17
cduhn17 marked this pull request as ready for review October 28, 2026 17:42
@cduhn17 cduhn17 changed the title Add Django project foundation Add Django project foundation CRASM - 4443 Oct 29, 2026
jayjaybunce
jayjaybunce previously approved these changes Oct 29, 2026
nickviola
nickviola previously approved these changes Oct 29, 2026

@nickviola nickviola left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me.

@nickviola nickviola left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-reviewing. LGTM

@nickviola
nickviola merged commit 7989429 into develop Oct 30, 2026
27 checks passed
@nickviola
nickviola deleted the cd_WAS_serverless_conversion branch October 30, 2026 17:00

This branch was previously deployed

2 inactive deployments
integration — 7738f0c5 Deployed Oct 30, 2026 by cduhn17 via integration #1039
staging — 7738f0c5 Deployed Oct 30, 2026 by cduhn17 via staging #1039
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants