Assigning to migrations, but could also be an app-refactor issue?
--
Ticket URL: <https://code.djangoproject.com/ticket/22645>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => andrewgodwin
* status: new => assigned
Comment:
I'll look into this. Probably a simple fix.
--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:1>
Comment (by aaugustin):
IIRC SpatialSysRef is a model, so it should be imported in models.py.
--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:2>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"a4737bf6ae36a5f1cb29f2232f6deeff084fabff"]:
{{{
#!CommitTicketReference repository=""
revision="a4737bf6ae36a5f1cb29f2232f6deeff084fabff"
Fixed #22645: Allow apps with no models module to still have migrations
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:3>
Comment (by andrewgodwin):
It's fine, this was just an overzealous check in MigrationLoader that I've
removed.
--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:4>
Comment (by Andrew Godwin <andrew@…>):
In [changeset:"12c72796c3a385f21bc97389bef91dcd4148c0f9"]:
{{{
#!CommitTicketReference repository=""
revision="12c72796c3a385f21bc97389bef91dcd4148c0f9"
Revert "Fixed #22645: Allow apps with no models module to still have
migrations"
This reverts commit a4737bf6ae36a5f1cb29f2232f6deeff084fabff.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:5>
* status: closed => new
* resolution: fixed =>
--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:6>
Comment (by claudep):
Should we then simply change the comment? Removing `These aliases are
provided for backwards-compatibility.`?
--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:7>
Comment (by claudep):
Even if the problem related to migrations for apps without models.py will
be solved by #23618, I still think that we should keep those imports, as
Aymeric said in comment:2, and update the comment accordingly. We have now
the `has_spatialrefsys_table` database feature for the conditional import.
--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:8>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/3716 PR] to restore the spatial
models in `models.py`.
--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:9>
Comment (by claudep):
I'm sorry, but I'm not so sure any more about recreating `models.py`. The
problem is that the presence of `SpatialRefSys/GeometryColumns` is backend
dependent, so adding them based on the default `connection` object might
break in case of multi-db setups where a non-default database has no such
tables, like MySQL.
I've just tested removing the empty `models.py` from `django.contrib.gis`
and the test suite now passes: https://github.com/django/django/pull/3724
--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:10>
Comment (by timgraham):
No objection from me.
--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:11>
Comment (by Claude Paroz <claude@…>):
In [changeset:"a5499b0916298caedfd683041515f4e3aa2c5d6d"]:
{{{
#!CommitTicketReference repository=""
revision="a5499b0916298caedfd683041515f4e3aa2c5d6d"
Removed empty gis models.py
Refs #22645.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:12>
* status: new => closed
* resolution: => fixed
--
Ticket URL: <https://code.djangoproject.com/ticket/22645#comment:13>