#35116 closed Bug (invalid)
Default settings.MIGRATE is missing
| Reported by: | Tobias Krönke | Owned by: | nobody |
|---|---|---|---|
| Component: | Migrations | Version: | 5.0 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
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'
Change History (4)
comment:1 by , 22 months ago
| Description: | modified (diff) |
|---|---|
| Has patch: | set |
comment:2 by , 22 months ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
follow-up: 4 comment:3 by , 22 months ago
comment:4 by , 22 months ago
Replying to Mariusz Felisiak:
I'm not sure what do you want to achieve, but Django doesn't use
MIGRATEsetting. 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 a sub DB test setting.
I'm not sure what do you want to achieve, but Django doesn't use
MIGRATEsetting. If you need it you can define it in your project.