#35116: Default settings.MIGRATE is missing
-------------------------------+--------------------------------------
Reporter: Tobias Krönke | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 5.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Tobias Krönke):
* has_patch: 0 => 1
Old description:
> Heyo! I hope this is an easy one. For being able to easily skip some
> tests if migrations are turned off, `settings.MIGRATE` should actually
> exist, so we are not forced define it in all of our settings files.
> Currently, the default does not exist in the `settings`:
>
> {{{
> >>> from django.conf import settings
> >>> settings.MIGRATION_MODULES
> {}
> >>> settings.MIGRATE
> Traceback (most recent call last):
> File "<input>", line 1, in <module>
> settings.MIGRATE
> File "/var/env/lib/python3.10/site-packages/django/conf/__init__.py",
> line 104, in __getattr__
> val = getattr(_wrapped, name)
> AttributeError: 'Settings' object has no attribute 'MIGRATE'
> }}}
>
> Will create a PR and link it here in a bit.
New description:
Heyo! I hope this is an easy one. For being able to easily skip some tests
if migrations are turned off, `settings.MIGRATE` should actually exist, so
we are not forced define it in all of our settings files. Currently, the
default does not exist in the `settings`:
{{{
>>> from django.conf import settings
>>> settings.MIGRATION_MODULES
{}
>>> settings.MIGRATE
Traceback (most recent call last):
File "<input>", line 1, in <module>
settings.MIGRATE
File "/var/env/lib/python3.10/site-packages/django/conf/__init__.py",
line 104, in __getattr__
val = getattr(_wrapped, name)
AttributeError: 'Settings' object has no attribute 'MIGRATE'
}}}
PR: https://github.com/django/django/pull/17738/files
--
--
Ticket URL: <https://code.djangoproject.com/ticket/35116#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018d0de2acce-e883d8a1-bc09-41d3-a471-90f9bbf2ff35-000000%40eu-central-1.amazonses.com.