From 3c97ba2a0d3a03e89b27a7a895562e5282018613 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Thu, 25 Aug 2016 00:23:16 +0300 Subject: [PATCH] Replaced property() usage with decorator in a couple places. --- django/contrib/admin/options.py | 2 +- django/db/models/query.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 53801a981b4..052a1d5a9a6 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -560,9 +560,9 @@ class ModelAdmin(BaseModelAdmin): ] return urlpatterns + @property def urls(self): return self.get_urls() - urls = property(urls) @property def media(self): diff --git a/django/db/models/query.py b/django/db/models/query.py index 7a2ef08ba27..f69c7754f4c 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -993,6 +993,7 @@ class QuerySet(object): # PUBLIC INTROSPECTION ATTRIBUTES # ################################### + @property def ordered(self): """ Returns True if the QuerySet is ordered -- i.e. has an order_by() @@ -1004,7 +1005,6 @@ class QuerySet(object): return True else: return False - ordered = property(ordered) @property def db(self):