decorator for method attribute assignment
A bit cleaner syntax for method attribute assignment; used in models for 'short_description'. >from mysite.polls.models import Poll >poll = Poll.objects.get(pk=1) >poll.was_published_today.short_description >>>'Published today?'
- models
- decorator