Changeset 7334
- Timestamp:
- 03/20/08 02:16:16 (4 months ago)
- Files:
-
- django/trunk/AUTHORS (modified) (1 diff)
- django/trunk/django/http/__init__.py (modified) (1 diff)
- django/trunk/docs/request_response.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/AUTHORS
r7330 r7334 246 246 michal@plovarna.cz 247 247 Mikko Hellsing <mikko@sorl.net> 248 Daniel Lindsley <polarcowz@gmail.com> 248 249 Orestis Markou <orestis@orestis.gr> 249 250 Slawek Mikula <slawek dot mikula at gmail dot com> django/trunk/django/http/__init__.py
r7257 r7334 82 82 def is_secure(self): 83 83 return os.environ.get("HTTPS") == "on" 84 85 def is_ajax(self): 86 return self.META.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest' 84 87 85 88 def _set_encoding(self, val): django/trunk/docs/request_response.txt
r7303 r7334 199 199 Returns ``True`` if the request is secure; that is, if it was made with 200 200 HTTPS. 201 202 ``is_ajax()`` 203 **New in Django development version** 204 205 Returns ``True`` if the request was made via an XMLHttpRequest by checking 206 the ``HTTP_X_REQUESTED_WITH`` header for the string *'XMLHttpRequest'*. The 207 following major Javascript libraries all send this header: 208 209 * jQuery 210 * Dojo 211 * MochiKit 212 * MooTools 213 * Prototype 214 * YUI 215 216 If you write your own XMLHttpRequest call (on the browser side), you will 217 have to set this header manually to use this method. 201 218 202 219 QueryDict objects
