Changeset 3012
- Timestamp:
- 05/30/06 21:09:07 (2 years ago)
- Files:
-
- django/trunk/django/contrib/auth/handlers/modpython.py (modified) (2 diffs)
- django/trunk/docs/apache_auth.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/contrib/auth/handlers/modpython.py
r2809 r3012 11 11 os.environ.update(req.subprocess_env) 12 12 13 from django.contrib.auth.models import User14 15 13 # check for PythonOptions 16 14 _str_to_bool = lambda s: s.lower() in ('1', 'true', 'on', 'yes') … … 20 18 staff_only = _str_to_bool(options.get('DjangoRequireStaffStatus', "on")) 21 19 superuser_only = _str_to_bool(options.get('DjangoRequireSuperuserStatus', "off")) 20 settings_module = options.get('DJANGO_SETTINGS_MODULE', None) 21 if settings_module: 22 os.environ['DJANGO_SETTINGS_MODULE'] = settings_module 23 24 from django.contrib.auth.models import User 22 25 23 26 # check that the username is valid django/trunk/docs/apache_auth.txt
r1500 r3012 57 57 ================================ ========================================= 58 58 59 Note that sometimes ``SetEnv`` doesn't play well in this mod_python 60 configuration, for reasons unknown. If you're having problems getting 61 mod_python to recognize your ``DJANGO_SETTINGS_MODULE``, you can set it using 62 ``PythonOption`` instead of ``SetEnv``. Therefore, these two Apache directives 63 are equivalent:: 64 65 SetEnv DJANGO_SETTINGS_MODULE mysite.settings 66 PythonOption DJANGO_SETTINGS_MODULE mysite.settings 67 59 68 .. _authentication system: http://www.djangoproject.com/documentation/authentication/ 60 69 .. _Subversion: http://subversion.tigris.org/
