mirror of
				https://github.com/django/django.git
				synced 2025-11-03 21:25:09 +00:00 
			
		
		
		
	Fixed #57 -- Added some more helpful mod_python information to tutorial 2 -- thanks, Manuzhai!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@172 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		
							parent
							
								
									78206fd08c
								
							
						
					
					
						commit
						fe8ca41e63
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -67,6 +67,7 @@ Now let's take the opportunity to hook Django into Apache/mod_python. Edit your
 | 
				
			||||||
        SetHandler python-program
 | 
					        SetHandler python-program
 | 
				
			||||||
        PythonHandler django.core.handler
 | 
					        PythonHandler django.core.handler
 | 
				
			||||||
        SetEnv DJANGO_SETTINGS_MODULE myproject.settings.admin
 | 
					        SetEnv DJANGO_SETTINGS_MODULE myproject.settings.admin
 | 
				
			||||||
 | 
					        PythonDebug On
 | 
				
			||||||
    </Location>
 | 
					    </Location>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This tells Apache: "Use mod_python for any URL at or under '/admin/', using the
 | 
					This tells Apache: "Use mod_python for any URL at or under '/admin/', using the
 | 
				
			||||||
| 
						 | 
					@ -75,6 +76,11 @@ so mod_python knows which project to use. Note that we're passing the path to
 | 
				
			||||||
the ``admin`` settings, not the ``main`` settings. That's because this is the
 | 
					the ``admin`` settings, not the ``main`` settings. That's because this is the
 | 
				
			||||||
admin site, which has slightly different settings.
 | 
					admin site, which has slightly different settings.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Also, if you've manually altered your ``PYTHONPATH`` to put your project on it,
 | 
				
			||||||
 | 
					you'll need to tell mod_python::
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    PythonPath "['/path/to/project'] + sys.path"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
You can also add directives such as ``PythonAutoReload Off`` for performance.
 | 
					You can also add directives such as ``PythonAutoReload Off`` for performance.
 | 
				
			||||||
See the `mod_python documentation`_ for a full list of options.
 | 
					See the `mod_python documentation`_ for a full list of options.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue