Skip to content

Add app configurations for all apps #1624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

mwvolo
Copy link
Member

@mwvolo mwvolo commented May 7, 2025

This brings enhancements to the app structure that comply with Django 3+.

Introduced apps.py files with Django AppConfig classes for all apps in the project. Updated __init__.py files to include default_app_config for each app. Enhanced WSGI configuration to use WhiteNoise for static file handling.

This brings enhancements to the app structure that comply with Django 3+.

Introduced `apps.py` files with Django AppConfig classes for all apps in the project. Updated `__init__.py` files to include `default_app_config` for each app. Enhanced WSGI configuration to use WhiteNoise for static file handling.
@mwvolo mwvolo added the maint label May 7, 2025
@mwvolo mwvolo self-assigned this May 7, 2025
@mwvolo mwvolo requested a review from Copilot May 7, 2025 04:18
Copilot

This comment was marked as outdated.

@mwvolo mwvolo requested a review from Copilot May 7, 2025 04:38
Copy link
Contributor

@Copilot 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 adds Django AppConfig configuration files and related settings updates to enhance application structure and support for Django 3+.

  • Introduces app-specific configuration in new apps.py files for apps like news, mail, global_settings, errata, donations, books, api, and accounts.
  • Updates settings modules for REST framework and OpenStax Accounts integration, along with adjustments to the WSGI configuration to support WhiteNoise.
  • Adjusts project-level settings to import these modular configuration components.

Reviewed Changes

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

Show a summary per file
File Description
openstax/settings/components/api.py Added REST framework settings configuration
openstax/settings/components/accounts.py Added Accounts-related settings with dynamic URL construction
openstax/settings/components/init.py Aggregated and exposed individual settings components
openstax/settings/init.py Updated environment-based settings loading
news/apps.py & news/init.py Introduced app config for news with default_app_config
mail/apps.py & mail/init.py Introduced app config for mail with default_app_config
global_settings/apps.py & global_settings/init.py Updated global settings app configuration and default_app_config
errata/apps.py & errata/init.py Added app configuration for errata
donations/apps.py & donations/init.py Added app configuration for donations
books/apps.py & books/init.py Added app configuration for books
api/apps.py & api/init.py Introduced app config for api with default_app_config
accounts/apps.py & accounts/init.py Introduced app config for accounts with default_app_config

Comment on lines +19 to +20
"""
# Import signal handlers if they exist
Copy link
Preview

Copilot AI May 7, 2025

Choose a reason for hiding this comment

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

[nitpick] If the commented-out signal import is not needed, consider removing it to reduce clutter, or add a note explaining its anticipated future use.

Suggested change
"""
# Import signal handlers if they exist
If signal handlers are added in the future, uncomment the line below to import them.
"""

Copilot uses AI. Check for mistakes.

Co-authored-by: Copilot <[email protected]>
@mwvolo mwvolo requested review from TomWoodward and RoyEJohnson May 8, 2025 05:42
@mwvolo mwvolo mentioned this pull request May 8, 2025
Copy link
Member

@TomWoodward TomWoodward left a comment

Choose a reason for hiding this comment

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

this is way over my head on the django stuff, my only concern is that you created a lot of configs but didn't remove any, this stuff must have existed before you rearranged it right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants