This website requires JavaScript.
Explore
Help
Sign In
innov
/
django1
Watch
1
Star
0
Fork
You've already forked django1
0
Code
Issues
Pull Requests
1
Projects
Releases
Wiki
Activity
b2790f74d4
django1
/
django
/
contrib
/
postgres
/
fields
/
utils.py
4 lines
95 B
Python
Raw
Normal View
History
Unescape
Escape
Refs #23919 -- Stopped inheriting from object to define new style classes.
2017-01-19 15:39:46 +08:00
class
AttributeSetter
:
Instead of using DjangoJSONEncoder, use base_field's value_to_string. Note this means the serialization of e.g. IntegerRangeField now has strings for lower and upper, so use to_python when they came back in (same behaviour as ArrayField, hopefully, from where I also got the set_attributes_from_name function).
2015-06-06 19:55:04 +08:00
def
__init__
(
self
,
name
,
value
)
:
setattr
(
self
,
name
,
value
)