Code

Opened 3 years ago

Closed 3 years ago

#16631 closed Bug (fixed)

Logic in check_settings() in staticfiles app when no base_file is given is wrong

Reported by: andialbrecht Owned by: nobody
Component: contrib.staticfiles Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: no UI/UX: no

Description

"manage.py runserver" fails even when STATIC_URL is configured in settings.py with the following exception:

Traceback (most recent call last):
File "/home/andi/devel/dlgi/django/core/management/commands/runserver.py", line 110, in inner_run
handler = self.get_handler(*args, **options)
File "/home/andi/devel/dlgi/django/contrib/staticfiles/management/commands/runserver.py", line 26, in get_handler
handler = StaticFilesHandler(handler)
File "/home/andi/devel/dlgi/django/contrib/staticfiles/handlers.py", line 21, in init
self.base_url = urlparse(self.get_base_url())
File "/home/andi/devel/dlgi/django/contrib/staticfiles/handlers.py", line 28, in get_base_url
utils.check_settings()
File "/home/andi/devel/dlgi/django/contrib/staticfiles/utils.py", line 49, in check_settings
"You're using the staticfiles app "
django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the required STATIC_URL setting.

Attachments (1)

staticfiles_logic.diff (478 bytes) - added by andialbrecht 3 years ago.

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by andialbrecht

comment:1 Changed 3 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

In [16618]:

Fixed #16631 -- Fixed embarrassing typo introduced in r16617. Thanks, Andi Albrecht.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.