Skip to content

chore: Cleanup unused backend files#107

Open
fsbraun wants to merge 2 commits intomainfrom
chore/cleanup-backend
Open

chore: Cleanup unused backend files#107
fsbraun wants to merge 2 commits intomainfrom
chore/cleanup-backend

Conversation

@fsbraun
Copy link
Member

@fsbraun fsbraun commented Mar 11, 2026

Summary by Sourcery

Remove unused backend templates and adjust CMS theme models and migrations accordingly.

Enhancements:

  • Remove deprecated cms_theme FeatureHanging model via a new migration.
  • Mark certain CMS theme container models as unmanaged with clearer verbose names.

Chores:

  • Delete unused base and demo HTML templates from the backend and CMS theme.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 11, 2026

Reviewer's Guide

Removes unused backend HTML templates and adds a Django schema migration that deletes an obsolete model and updates admin metadata for two unmanaged CMS models.

ER diagram for Django model removal and option updates

erDiagram
  FEATUREHANGING {
    int id PK
  }

  CONTAINER1COLTEXT {
    int id PK
    boolean managed
    string verbose_name
  }

  CONTAINERWITHGRID {
    int id PK
    boolean managed
    string verbose_name
  }

  %% FeatureHanging table removed by migration
  %% Container1ColText and ContainerWithGrid remain but with updated options (managed false, new verbose_name)
Loading

Class diagram for Django models and migration changes

classDiagram
  class Migration {
    +list dependencies
    +list operations
  }

  class FeatureHanging {
    <<DjangoModel_removed>>
    +int id
  }

  class Container1ColText {
    <<DjangoModel_unmanaged>>
    +int id
    +bool managed
    +string verbose_name
  }

  class ContainerWithGrid {
    <<DjangoModel_unmanaged>>
    +int id
    +bool managed
    +string verbose_name
  }

  Migration --> FeatureHanging : DeleteModel
  Migration --> Container1ColText : AlterModelOptions
  Migration --> ContainerWithGrid : AlterModelOptions
Loading

File-Level Changes

Change Details Files
Add Django migration to remove an obsolete model and update options for two CMS models.
  • Introduce migration 0007 depending on 0006 in cms_theme app
  • Delete the FeatureHanging model from the schema
  • Mark container1coltext and containerwithgrid models as unmanaged and adjust their verbose_name values
cms_theme/migrations/0007_delete_featurehanging_and_more.py
Remove legacy/unused backend HTML template files from the repository.
  • Delete base backend layout template
  • Delete alternative base and bootstrap5 variant templates
  • Delete minimal backend layout template
  • Delete Whitenoise static files demo template
  • Delete unused cms_theme visual_image_with_heading component template
backend/templates/base.html
backend/templates/base2.html
backend/templates/bootstrap5.html
backend/templates/minimal.html
backend/templates/whitenoise-static-files-demo.html
cms_theme/templates/cms_theme/cms_components/visual_image_with_heading.html

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Since FeatureHanging and several templates (including cms_components/visual_image_with_heading.html and base templates) are removed, search the codebase for any remaining references to this model and these templates and update or remove them to prevent runtime errors.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since `FeatureHanging` and several templates (including `cms_components/visual_image_with_heading.html` and base templates) are removed, search the codebase for any remaining references to this model and these templates and update or remove them to prevent runtime errors.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

1 participant