idlesign / django-siteprefs

Reusable app for Django introducing site preferences system
https://github.com/idlesign/django-siteprefs
BSD 3-Clause "New" or "Revised" License
17 stars 6 forks source link

Return the actual type instead of proxy class #12

Closed aldarund closed 5 years ago

aldarund commented 9 years ago

Work with the proxyifing class differs a much from using a standard django settings actual values. For example i have DOMAIN_CACHE_DAYS = 10 in my settings. And i can do following with it: datetime.timedelta(days=settings.DOMAIN_CACHE_DAYS) or settings.STRING_SETTING.split() - which again wouldnt work in case of siteprefs but would work with default settings But if i begin to use siteprefs thats no longer possible because it return not an actual value class but a ProxyPref. So im forced to use something like settings.DOMAIN_CACHE_DAYS.get_value() - which make its not so clear, and as well break the compatibility with standard settings.

idlesign commented 9 years ago

Yes, we'll probably end up defining some special methods for that.

See also #11

idlesign commented 5 years ago

Seems to be resolved in master. Release will follow this week after some more testing. Closing this. Feel free to reopen if required.