mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #30876 -- Moved classproperty() decorator to the django.utils.functional.
This commit is contained in:
committed by
Mariusz Felisiak
parent
31174031f1
commit
3120490912
@@ -49,6 +49,18 @@ class cached_property:
|
||||
return res
|
||||
|
||||
|
||||
class classproperty:
|
||||
def __init__(self, method=None):
|
||||
self.fget = method
|
||||
|
||||
def __get__(self, instance, cls=None):
|
||||
return self.fget(cls)
|
||||
|
||||
def getter(self, method):
|
||||
self.fget = method
|
||||
return self
|
||||
|
||||
|
||||
class Promise:
|
||||
"""
|
||||
Base class for the proxy class created in the closure of the lazy function.
|
||||
|
||||
Reference in New Issue
Block a user