Ticket #10153: related_field_lookup_patch_1.diff

File related_field_lookup_patch_1.diff, 723 bytes (added by joelhooks, 16 years ago)

added 'gte' and 'lte' to the list.

  • django/db/models/fields/related.py

    ### Eclipse Workspace Patch 1.0
    #P Django_Trunk
     
    155155        # get_(next/prev)_by_date work; other lookups are not allowed since that
    156156        # gets messy pretty quick. This is a good candidate for some refactoring
    157157        # in the future.
    158         if lookup_type in ['exact', 'gt', 'lt']:
     158        if lookup_type in ['exact', 'gt', 'lt', 'gte', 'lte']:
    159159            return [pk_trace(value)]
    160160        if lookup_type in ('range', 'in'):
    161161            return [pk_trace(v) for v in value]
Back to Top