Ticket #7538: django_models_loaded_signal.patch
File django_models_loaded_signal.patch, 1.1 KB (added by , 16 years ago) |
---|
-
db/models/loading.py
3 3 from django.conf import settings 4 4 from django.core.exceptions import ImproperlyConfigured 5 5 from django.utils.datastructures import SortedDict 6 from django.db.models import signals 7 from django.dispatch import dispatcher 6 8 7 9 import sys 8 10 import os … … 61 63 self.loaded = True 62 64 finally: 63 65 self.write_lock.release() 66 dispatcher.send(signal=signals.models_loaded) 64 67 65 68 def load_app(self, app_name, can_postpone=False): 66 69 """ … … 187 190 register_models = cache.register_models 188 191 load_app = cache.load_app 189 192 app_cache_ready = cache.app_cache_ready 193 -
db/models/signals.py
10 10 post_delete = object() 11 11 12 12 post_syncdb = object() 13 14 models_loaded = object()