mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	magic-removal: changed explicit settings import to qualified settings import in django.core.context_processors
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2004 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -7,7 +7,7 @@ These are referenced from the setting TEMPLATE_CONTEXT_PROCESSORS and used by | ||||
| RequestContext. | ||||
| """ | ||||
|  | ||||
| from django.conf.settings import DEBUG, INTERNAL_IPS, LANGUAGES, LANGUAGE_CODE | ||||
| from django.conf import settings | ||||
|  | ||||
| def auth(request): | ||||
|     """ | ||||
| @@ -23,7 +23,7 @@ def auth(request): | ||||
| def debug(request): | ||||
|     "Returns context variables helpful for debugging." | ||||
|     context_extras = {} | ||||
|     if DEBUG and request.META.get('REMOTE_ADDR') in INTERNAL_IPS: | ||||
|     if settings.DEBUG and request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS: | ||||
|         context_extras['debug'] = True | ||||
|         from django.db import connection | ||||
|         context_extras['sql_queries'] = connection.queries | ||||
| @@ -31,11 +31,11 @@ def debug(request): | ||||
|  | ||||
| def i18n(request): | ||||
|     context_extras = {} | ||||
|     context_extras['LANGUAGES'] = LANGUAGES | ||||
|     context_extras['LANGUAGES'] = settings.LANGUAGES | ||||
|     if hasattr(request, 'LANGUAGE_CODE'): | ||||
|         context_extras['LANGUAGE_CODE'] = request.LANGUAGE_CODE | ||||
|     else: | ||||
|         context_extras['LANGUAGE_CODE'] = LANGUAGE_CODE | ||||
|         context_extras['LANGUAGE_CODE'] = settings.LANGUAGE_CODE | ||||
|     return context_extras | ||||
|  | ||||
| # PermWrapper and PermLookupDict proxy the permissions system into objects that | ||||
|   | ||||
		Reference in New Issue
	
	Block a user