From a02b5848ae6025ad3ef12cf6646ffd3e82a66067 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Fri, 26 Aug 2016 03:06:22 +0300 Subject: Replaced property() usage with decorator in several places. --- docs/topics/forms/media.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/topics/forms') diff --git a/docs/topics/forms/media.txt b/docs/topics/forms/media.txt index 1e2345ba20..adbd2c377e 100644 --- a/docs/topics/forms/media.txt +++ b/docs/topics/forms/media.txt @@ -188,10 +188,10 @@ For example, the static definition for our Calendar Widget could also be defined in a dynamic fashion:: class CalendarWidget(forms.TextInput): - def _media(self): + @property + def media(self): return forms.Media(css={'all': ('pretty.css',)}, js=('animations.js', 'actions.js')) - media = property(_media) See the section on `Media objects`_ for more details on how to construct return values for dynamic ``media`` properties. -- cgit v1.3