Ticket #2848: comment_test.diff
File comment_test.diff, 665 bytes (added by , 18 years ago) |
---|
-
usr/local/www/django/trunk/django/contrib/comments/models.py
33 33 def get_rating_options(self, rating_string): 34 34 """ 35 35 Given a rating_string, this returns a tuple of (rating_range, options). 36 37 >>> cm = CommentManager() 36 38 >>> s = "scale:1-10|First_category|Second_category" 37 >>> get_rating_options(s)39 >>> cm.get_rating_options(s) 38 40 ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], ['First category', 'Second category']) 39 41 """ 40 42 rating_range, options = rating_string.split('|', 1)