Skip to content

Conversation

@PACHAKUTlQ
Copy link
Collaborator

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the web application to improve code quality by modularizing URL routing, migrating from Django forms to REST Framework serializers, implementing a logging sanitization filter, and pinning exact dependency versions. The changes focus on better separation of concerns and enhanced security.

  • Modularized URL configuration by splitting routes into app-specific URL files
  • Migrated review validation from Django forms to DRF serializers
  • Added logging sanitization filter to prevent log injection attacks

Reviewed Changes

Copilot reviewed 18 out of 25 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
website/urls.py Simplified main URL configuration by delegating to app-specific URL patterns
website/settings.py Added WEB configuration for pagination and review settings
utils/logging.py New sanitization filter to prevent log injection vulnerabilities
pyproject.toml Pinned exact dependency versions and added missing dependencies
frontend Updated frontend submodule reference
config.yaml.example Added example configuration for new WEB settings
apps/web/views.py Refactored views to use DRF generic views and added comprehensive logging
apps/web/urls.py New app-specific URL configuration for web routes
apps/web/serializers.py Added review validation logic and vote count serializer methods
apps/web/models/vote_for_review.py Removed denormalized vote counts in favor of dynamic calculation
apps/web/models/review.py Added methods to calculate vote counts and removed stored count fields
apps/web/models/forms/review_form.py Deleted Django form in favor of serializer validation
apps/web/models/forms/init.py Removed form imports
apps/web/migrations/0010_remove_review_dislike_count_and_more.py Migration to remove denormalized vote count fields
apps/spider/urls.py New app-specific URL configuration for spider routes
apps/auth/views.py Improved logging with sanitization and consistency
apps/auth/utils.py Improved logging with sanitization and consistency
apps/auth/urls.py New app-specific URL configuration for auth routes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@A-lexisL A-lexisL force-pushed the refactor/cq branch 2 times, most recently from b6b9c19 to 4ab2b75 Compare November 20, 2025 07:16
verification_data, error_response = verify_token_pwd(
request,
action="reset_password",
action="reset",
Copy link
Collaborator Author

@PACHAKUTlQ PACHAKUTlQ Dec 23, 2025

Choose a reason for hiding this comment

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

Please make naming consistent. Is it reset or reset_password? reset seems good. Please make sure the whole backend (and later the frontend) uses reset. Docs (docs/auth.nd) need to be updated too.

@A-lexisL A-lexisL merged commit e5daa4a into dev Dec 26, 2025
2 checks passed
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.

3 participants