Changeset 711
- Timestamp:
- 09/27/05 11:33:25 (3 years ago)
- Files:
-
- django/trunk/django/utils/httpwrappers.py (modified) (1 diff)
- django/trunk/docs/request_response.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/utils/httpwrappers.py
r672 r711 20 20 return d[key] 21 21 raise KeyError, "%s not found in either POST or GET" % key 22 23 def has_key(self, key): 24 return self.GET.has_key(key) or self.POST.has_key(key) 22 25 23 26 def get_full_path(self): django/trunk/docs/request_response.txt
r668 r711 110 110 Methods 111 111 ------- 112 113 ``__getitem__(key)`` 114 Returns the GET/POST value for the given key, checking POST first, then 115 GET. Raises ``KeyError`` if the key doesn't exist. 116 117 This lets you use dictionary-accessing syntax on an ``HttpRequest`` 118 instance. Example: ``request["foo"]`` would return ``True`` if either 119 ``request.POST`` or ``request.GET`` had a ``"foo"`` key. 120 121 ``has_key()`` 122 Returns ``True`` or ``False``, designating whether ``request.GET`` or 123 ``request.POST`` has the given key. 112 124 113 125 ``get_full_path()``
