Django

Code

Changeset 4986

Show
Ignore:
Timestamp:
04/09/07 10:35:19 (2 years ago)
Author:
adrian
Message:

Negligible space changes to django/db/models/query.py

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/db/models/query.py

    r4985 r4986  
    190190            for row in rows: 
    191191                if fill_cache: 
    192                     obj, index_end = get_cached_row(klass=self.model, row=row,  
     192                    obj, index_end = get_cached_row(klass=self.model, row=row, 
    193193                                                    index_start=0, max_depth=self._max_related_depth) 
    194194                else: 
     
    202202        Performs a SELECT COUNT() and returns the number of records as an 
    203203        integer. 
    204          
     204 
    205205        If the queryset is already cached (i.e. self._result_cache is set) this 
    206206        simply returns the length of the cached results set to avoid multiple 
     
    209209        if self._result_cache is not None: 
    210210            return len(self._result_cache) 
    211              
     211 
    212212        counter = self._clone() 
    213213        counter._order_by = () 
     
    489489        # Add additional tables and WHERE clauses based on select_related. 
    490490        if self._select_related: 
    491             fill_table_cache(opts, select, tables, where,  
    492                              old_prefix=opts.db_table,  
    493                              cache_tables_seen=[opts.db_table],  
     491            fill_table_cache(opts, select, tables, where, 
     492                             old_prefix=opts.db_table, 
     493                             cache_tables_seen=[opts.db_table], 
    494494                             max_depth=self._max_related_depth) 
    495495 
     
    739739def get_cached_row(klass, row, index_start, max_depth=0, cur_depth=0): 
    740740    """Helper function that recursively returns an object with cache filled""" 
    741      
     741 
    742742    # If we've got a max_depth set and we've exceeded that depth, bail now. 
    743743    if max_depth and cur_depth > max_depth: 
    744744        return None 
    745      
     745 
    746746    index_end = index_start + len(klass._meta.fields) 
    747747    obj = klass(*row[index_start:index_end]) 
     
    759759    place) for select_related queries. 
    760760    """ 
    761      
     761 
    762762    # If we've got a max_depth set and we've exceeded that depth, bail now. 
    763763    if max_depth and cur_depth > max_depth: 
    764764        return None 
    765      
     765 
    766766    qn = backend.quote_name 
    767767    for f in opts.fields: 
     
    827827            # all uses of None as a query value. 
    828828            if lookup_type != 'exact': 
    829                 raise ValueError, "Cannot use None as a query value"       
     829                raise ValueError, "Cannot use None as a query value" 
    830830        elif callable(value): 
    831831            value = value()