Django

Code

Show
Ignore:
Timestamp:
08/05/08 12:15:33 (4 months ago)
Author:
jbronn
Message:

gis: Merged revisions 7981-8001,8003-8011,8013-8033,8035-8036,8038-8039,8041-8063,8065-8076,8078-8139,8141-8154,8156-8214 via svnmerge from trunk.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/gis

    • Property svnmerge-integrated changed from /django/trunk:1-7978 to /django/trunk:1-8214
  • django/branches/gis/django/http/__init__.py

    r7836 r8215  
    3232        self.GET, self.POST, self.COOKIES, self.META, self.FILES = {}, {}, {}, {}, {} 
    3333        self.path = '' 
     34        self.path_info = '' 
    3435        self.method = None 
    3536 
     
    3839            (pformat(self.GET), pformat(self.POST), pformat(self.COOKIES), 
    3940            pformat(self.META)) 
    40  
    41     def __getitem__(self, key): 
    42         for d in (self.POST, self.GET): 
    43             if key in d: 
    44                 return d[key] 
    45         raise KeyError, "%s not found in either POST or GET" % key 
    46  
    47     def has_key(self, key): 
    48         return key in self.GET or key in self.POST 
    49  
    50     __contains__ = has_key 
    5141 
    5242    def get_host(self): 
     
    443433    else: 
    444434        return s 
     435 
  • django/branches/gis/django/http/multipartparser.py

    r7918 r8215  
    55file upload handlers for processing. 
    66""" 
     7 
    78import cgi 
    89from django.conf import settings 
     
    1314from django.core.files.uploadhandler import StopUpload, SkipFile, StopFutureHandlers 
    1415 
    15 __all__ = ('MultiPartParser','MultiPartParserError','InputStreamExhausted') 
     16__all__ = ('MultiPartParser', 'MultiPartParserError', 'InputStreamExhausted') 
    1617 
    1718class MultiPartParserError(Exception): 
     
    163164                elif item_type == FILE: 
    164165                    # This is a file, use the handler... 
    165                     file_successful = True 
    166166                    file_name = disposition.get('filename') 
    167167                    if not file_name: 
     
    210210 
    211211                    except SkipFile, e: 
    212                         file_successful = False 
    213212                        # Just use up the rest of this file... 
    214213                        exhaust(field_stream) 
     
    516515            end = index 
    517516            next = index + len(self._boundary) 
    518             data_len = len(data) - 1 
    519517            # backup over CRLF 
    520518            if data[max(0,end-1)] == '\n': 
     
    522520            if data[max(0,end-1)] == '\r': 
    523521                end -= 1 
    524             # skip over --CRLF 
    525             #if data[min(data_len,next)] == '-': 
    526             #    next += 1 
    527             #if data[min(data_len,next)] == '-': 
    528             #    next += 1 
    529             #if data[min(data_len,next)] == '\r': 
    530             #    next += 1 
    531             #if data[min(data_len,next)] == '\n': 
    532             #    next += 1 
    533522            return end, next 
    534523