zoo_meta: ajoute un hook sur les classes AppConfig pour personnaliser la reconstruction des index (#19092)
This commit is contained in:
parent
efaafa575d
commit
6137d25ab9
|
@ -16,6 +16,7 @@
|
|||
|
||||
from hashlib import md5
|
||||
|
||||
from django.apps import apps
|
||||
from django.db import models, connection
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.contrib.postgres.fields import JSONField
|
||||
|
@ -133,6 +134,11 @@ class CommonSchema(models.Model):
|
|||
if m is not None:
|
||||
m(cursor, table, path)
|
||||
|
||||
# delegate index building to custom applications
|
||||
for app in apps.get_app_configs():
|
||||
if hasattr(app, 'zoo_rebuild_indexes'):
|
||||
app.zoo_rebuild_indexes(self)
|
||||
|
||||
objects = GetBySlugManager()
|
||||
|
||||
def make_caption(self, value):
|
||||
|
|
Loading…
Reference in New Issue