Skip to content

Bug: App fails to initialize when optional settings are not defined #177

Closed
@jonnyhoff

Description

@jonnyhoff

Python version
3.11.11

Django version
5.1.1

Package version
0.12.0

Current behavior (bug description)

The package crashes during Django app initialization when EXTRA_SETTINGS_VERBOSE_NAME is not defined in settings, with the following error:

AttributeError: 'Settings' object has no attribute 'EXTRA_SETTINGS_VERBOSE_NAME'

This occurs in apps.py where it directly accesses settings.EXTRA_SETTINGS_VERBOSE_NAME without providing a default value or checking for its existence.

Expected behavior

According to the package documentation, all settings should be optional. The app should initialize successfully without requiring EXTRA_SETTINGS_VERBOSE_NAME to be explicitly defined, either by:

  1. Providing a default value using getattr(settings, 'EXTRA_SETTINGS_VERBOSE_NAME', 'Extra Settings')
  2. Or handling the case when the setting is not defined

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions