mirror of
https://github.com/jazzband/django-configurations.git
synced 2026-05-19 21:01:54 +00:00
19 lines
431 B
Python
19 lines
431 B
Python
def pristine(func):
|
|
"""
|
|
A decorator for handling pristine settings like callables.
|
|
|
|
Use it like this::
|
|
|
|
from configurations import pristine
|
|
|
|
class Develop(Settings):
|
|
|
|
@pristine
|
|
def USER_CHECK(user):
|
|
return user.check_perms()
|
|
|
|
GROUP_CHECK = pristine(lambda user: user.has_group_access())
|
|
|
|
"""
|
|
func.pristine = True
|
|
return staticmethod(func)
|