mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #18196 -- Improved loaddata error messages.
This commit is contained in:
@@ -4,7 +4,6 @@ import time
|
||||
from django.conf import settings
|
||||
from django.db import connections
|
||||
from django.dispatch import receiver, Signal
|
||||
from django.template import context
|
||||
from django.utils import timezone
|
||||
|
||||
template_rendered = Signal(providing_args=["template", "context"])
|
||||
@@ -48,9 +47,17 @@ def update_connections_time_zone(**kwargs):
|
||||
@receiver(setting_changed)
|
||||
def clear_context_processors_cache(**kwargs):
|
||||
if kwargs['setting'] == 'TEMPLATE_CONTEXT_PROCESSORS':
|
||||
from django.template import context
|
||||
context._standard_context_processors = None
|
||||
|
||||
|
||||
@receiver(setting_changed)
|
||||
def clear_serializers_cache(**kwargs):
|
||||
if kwargs['setting'] == 'SERIALIZATION_MODULES':
|
||||
from django.core import serializers
|
||||
serializers._serializers = {}
|
||||
|
||||
|
||||
@receiver(setting_changed)
|
||||
def language_changed(**kwargs):
|
||||
if kwargs['setting'] in ('LOCALE_PATHS', 'LANGUAGE_CODE'):
|
||||
|
||||
Reference in New Issue
Block a user