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

Warning from Django 5.0 #121

Closed
swasher opened this issue Dec 29, 2023 · 3 comments
Closed

Warning from Django 5.0 #121

swasher opened this issue Dec 29, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@swasher
Copy link

swasher commented Dec 29, 2023

Python version
3.11

Django version
5.0

Package version
0.11.0

Current behavior (bug description)
After upgrading Django to 5.0 I got following warning:

$ python.exe manage.py runserver 127.0.0.1:8000 
<...>\django\db\backends\utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
  warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)

This warning occurs from EXTRA_SETTINGS_DEFAULTS in settings.py:

EXTRA_SETTINGS_DEFAULTS = [
    {
        "name": "MARGIN",
        "type": 'int',
        "value": "7",
    },
    <...>
]

If I just comment it, warning dissapear.

It is a new behavior in Django 5.0. More information can be found here, for example.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@swasher swasher added the bug Something isn't working label Dec 29, 2023
@fabiocaccamo
Copy link
Owner

@swasher thanks for reporting it!

@fabiocaccamo
Copy link
Owner

@swasher could you please try to upgrade to 0.12.0 version and let me know?

@swasher
Copy link
Author

swasher commented Feb 27, 2024

@fabiocaccamo Thank you, now runs without warnings!

@github-project-automation github-project-automation bot moved this from Todo to Done in Open Source Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants