Closed yoandym closed 5 years ago
The are two problems:
First one is that we still need to cast implicitly (this one may probably be cured with definition of other special methods for numeric types)
Second is that int and co must return an appropriate type else TypeError is raised, yet get_value() won't guarante that.
There probably is a better way to mimic int and other types. Need to think it over. If you have any ideas, you're welcome.
This and other type mimic methods are available in 0.8.1 Closing this.
Please accept my change based on:
If i from setttings import my_var and my my_var was originally an integer value i would like to use it without asking if it's a PrefProxy instance and calling .get_value() on it.
It would be better if could just do int(my_var)
If i'm just using django-siteprefs in the wrong way or there is a better solution just let me know,
thanks.