Skip to content
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

Fixed #32915 -- Refactored runserver command to restore traceback #18260

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pi-sigma
Copy link
Contributor

@pi-sigma pi-sigma commented Jun 9, 2024

Trac ticket number

ticket-32915

Branch description

The traceback for runserver --nostatic with broken/missing settings was hidden because the custom runserver command which added --nostatic to the command args was only instantiated if the settings had no errors.

Previous PRs: #1637, 14622

Checklist

  • This PR targets the main branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.
  • I have checked the "Has patch" ticket flag in the Trac system.
  • I have added or updated relevant tests.

    The traceback for `runserver --nostatic` with broken/missing
    settings was hidden because the custom runserver command which
    added `--nostatic` to the command args was only instantiated if
    the settings had no errors.
@@ -6,6 +6,7 @@
from datetime import datetime

from django.conf import settings
from django.contrib.staticfiles.handlers import StaticFilesHandler
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this going or be problem if django.contrib.staticfiles is not part of INSTALLED_APPS?

I think that changes should be made to the staticfiles provided command instead if any.

https://github.com/django/django/blob/main/django/contrib/staticfiles/management/commands/runserver.py

The moment django.contrib.staticfiles is added to INSTALLED_APPS calling runserver should resolve to the override in staticfiles.

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