Django

Code

Show
Ignore:
Timestamp:
07/13/08 03:48:18 (4 months ago)
Author:
russellm
Message:

Fixed #7718 -- Added a naive implementation of sorted() for Python 2.3 compatibility, and modified test cases to import the function when required.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/modeltests/basic/models.py

    r7575 r7914  
    55This is a basic model with only two non-primary-key fields. 
    66""" 
    7  
     7# Python 2.3 doesn't have set as a builtin 
    88try: 
    99    set 
    1010except NameError: 
    1111    from sets import Set as set 
     12 
     13# Python 2.3 doesn't have sorted() 
     14try: 
     15    sorted 
     16except NameError: 
     17    from django.utils.itercompat import sorted 
    1218 
    1319from django.db import models