mirror of
				https://github.com/django/django.git
				synced 2025-11-04 13:39:16 +00:00 
			
		
		
		
	Fixed #6979 -- Fixed the documentation cross-reference between the TIME_ZONE
setting and manual settings configuration. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9175 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		
							parent
							
								
									452ba4a8f7
								
							
						
					
					
						commit
						870a6ec20c
					
				
					 2 changed files with 12 additions and 8 deletions
				
			
		| 
						 | 
					@ -1152,8 +1152,9 @@ multiple Django-powered sites, each with a separate time-zone setting.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Normally, Django sets the ``os.environ['TZ']`` variable to the time zone you
 | 
					Normally, Django sets the ``os.environ['TZ']`` variable to the time zone you
 | 
				
			||||||
specify in the ``TIME_ZONE`` setting. Thus, all your views and models will
 | 
					specify in the ``TIME_ZONE`` setting. Thus, all your views and models will
 | 
				
			||||||
automatically operate in the correct time zone. However, if you're using the
 | 
					automatically operate in the correct time zone. However, if you're manually
 | 
				
			||||||
manual configuration option (see below), Django will *not* touch the ``TZ``
 | 
					:ref:`manually configuring settings
 | 
				
			||||||
 | 
					<settings-without-django-settings-module>`, Django will *not* touch the ``TZ``
 | 
				
			||||||
environment variable, and it'll be up to you to ensure your processes are
 | 
					environment variable, and it'll be up to you to ensure your processes are
 | 
				
			||||||
running in the correct environment.
 | 
					running in the correct environment.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -85,8 +85,8 @@ Default settings
 | 
				
			||||||
================
 | 
					================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
A Django settings file doesn't have to define any settings if it doesn't need
 | 
					A Django settings file doesn't have to define any settings if it doesn't need
 | 
				
			||||||
to. Each setting has a sensible default value. These defaults live in the file
 | 
					to. Each setting has a sensible default value. These defaults live in the
 | 
				
			||||||
``django/conf/global_settings.py``.
 | 
					module :file:`django/conf/global_settings.py`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Here's the algorithm Django uses in compiling settings:
 | 
					Here's the algorithm Django uses in compiling settings:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -176,7 +176,9 @@ itself, you likely don't want to have to set up an environment variable
 | 
				
			||||||
pointing to a settings module.
 | 
					pointing to a settings module.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
In these cases, you can configure Django's settings manually. Do this by
 | 
					In these cases, you can configure Django's settings manually. Do this by
 | 
				
			||||||
calling ``django.conf.settings.configure()``.
 | 
					calling:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.. function:: django.conf.settings.configure(default_settings, **settings)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Example::
 | 
					Example::
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -196,9 +198,10 @@ recommended -- when you're using a piece of the framework inside a larger
 | 
				
			||||||
application.
 | 
					application.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Consequently, when configured via ``settings.configure()``, Django will not
 | 
					Consequently, when configured via ``settings.configure()``, Django will not
 | 
				
			||||||
make any modifications to the process environment variables. (See the
 | 
					make any modifications to the process environment variables (see the
 | 
				
			||||||
explanation of ``TIME_ZONE``, above, for why this would normally occur.) It's
 | 
					documentation of :setting:`TIME_ZONE` for why this would normally occur). It's
 | 
				
			||||||
assumed that you're already in full control of your environment in these cases.
 | 
					assumed that you're already in full control of your environment in these
 | 
				
			||||||
 | 
					cases.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Custom default settings
 | 
					Custom default settings
 | 
				
			||||||
-----------------------
 | 
					-----------------------
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue