kopia lustrzana https://github.com/wagtail/wagtail
TagSearchable needs to be removed from migrations
rodzic
ea7a9a29f6
commit
367c71dbaa
docs/releases
wagtail
tests/testapp/migrations
wagtaildocs/migrations
wagtailimages/migrations
|
@ -45,3 +45,30 @@ The ``choices`` field on the ``wagtailforms.models.AbstractFormField`` model has
|
|||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The ``wagtailimages.Filter`` model has been removed, and replaced with a ``Filter`` class instead. This class can be imported from the same location as the model: ``wagtail.wagtailimages.models.Filter``. The ``Filter`` class has the same API as the ``Filter`` model did, with the exception that Model methods such as ``Filter.save()``, and ``Filter.objects.get()`` have been removed.
|
||||
|
||||
``TagSearchable`` needs removing from custom image / document model migrations
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The mixin class ``wagtail.wagtailadmin.taggable.TagSearchable``, used internally by image and document models, has been deprecated. If you are using custom image or document models in your project, the migration(s) which created them will contain frozen references to ``wagtail.wagtailadmin.taggable.TagSearchable``, which must now be removed. The line:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import wagtail.wagtailadmin.taggable
|
||||
|
||||
should be replaced by:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import wagtail.wagtailsearch.index
|
||||
|
||||
and the line:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
bases=(models.Model, wagtail.wagtailadmin.taggable.TagSearchable),
|
||||
|
||||
should be updated to:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
bases=(models.Model, wagtail.wagtailsearch.index.Indexed),
|
||||
|
|
|
@ -9,11 +9,11 @@ import taggit.managers
|
|||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
import wagtail.wagtailadmin.taggable
|
||||
import wagtail.wagtailcore.blocks
|
||||
import wagtail.wagtailcore.fields
|
||||
import wagtail.wagtailimages.blocks
|
||||
import wagtail.wagtailimages.models
|
||||
import wagtail.wagtailsearch.index
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -145,7 +145,7 @@ class Migration(migrations.Migration):
|
|||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model, wagtail.wagtailadmin.taggable.TagSearchable),
|
||||
bases=(models.Model, wagtail.wagtailsearch.index.Indexed),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CustomImageFilePath',
|
||||
|
@ -167,7 +167,7 @@ class Migration(migrations.Migration):
|
|||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model, wagtail.wagtailadmin.taggable.TagSearchable),
|
||||
bases=(models.Model, wagtail.wagtailsearch.index.Indexed),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CustomManagerPage',
|
||||
|
|
|
@ -5,7 +5,7 @@ import taggit.managers
|
|||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
import wagtail.wagtailadmin.taggable
|
||||
import wagtail.wagtailsearch.index
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -46,6 +46,6 @@ class Migration(migrations.Migration):
|
|||
],
|
||||
options={
|
||||
},
|
||||
bases=(models.Model, wagtail.wagtailadmin.taggable.TagSearchable),
|
||||
bases=(models.Model, wagtail.wagtailsearch.index.Indexed),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -5,8 +5,8 @@ import taggit.managers
|
|||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
import wagtail.wagtailadmin.taggable
|
||||
import wagtail.wagtailimages.models
|
||||
import wagtail.wagtailsearch.index
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -54,7 +54,7 @@ class Migration(migrations.Migration):
|
|||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model, wagtail.wagtailadmin.taggable.TagSearchable),
|
||||
bases=(models.Model, wagtail.wagtailsearch.index.Indexed),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Rendition',
|
||||
|
|
Ładowanie…
Reference in New Issue