{{{
>>> 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.
--
Ticket URL: <https://code.djangoproject.com/ticket/35116>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* 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>
* status: new => closed
* resolution: => invalid
--
Ticket URL: <https://code.djangoproject.com/ticket/35116#comment:2>
Comment (by Mariusz Felisiak):
I'm not sure what do you want to achieve, but Django doesn't use `MIGRATE`
setting. If you need it you can define it in your project.
--
Ticket URL: <https://code.djangoproject.com/ticket/35116#comment:3>
Comment (by Tobias Krönke):
Replying to [comment:3 Mariusz Felisiak]:
> I'm not sure what do you want to achieve, but Django doesn't use
`MIGRATE` setting. If you need it you can define it in your project.
Yes, thx and sorry. I misread the docs and had thought `MIGRATE` was a
global setting, but it's actually sub DB test setting.
--
Ticket URL: <https://code.djangoproject.com/ticket/35116#comment:4>