id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 22351 Remove suggestion of using lambdas in model field arguments (incompatible with migrations) dimyur27@… nobody "In Django's model fields there are a lot of places where lambdas are the most obvious way to get things done. Many keyword arguments can accept callable objects which do not supposed to do complex logic, but some simple things. E.g. ForeignKey.limit_choices_to, FileField.upload_to... Example from Django Docs: limit_choices_to = lambda: {'pub_date__lte': datetime.date.utcnow()} But Django's migrations cannot cope with lambdas passed as keyword arguments, so that fact either should be mentioned in the docs (let examples use named functions rather than lambdas) or community has to put extra attention on migrations+lambdas problem. Thanks for the magnificent framework! My best regards. " Cleanup/optimization closed Documentation dev Normal fixed migrations lambdas Stefan Kögl niwi@… Ready for checkin 1 0 0 0 1 0