fusionbox / django-widgy

A CMS framework for Django built on a heterogenous tree editor.
http://wid.gy
Other
332 stars 52 forks source link

Update video widget to work with Django 1.8 #327

Closed jxcl closed 9 years ago

jxcl commented 9 years ago

In Django 1.8 to_python is not automatically called by SubfieldBase any more. Django 1.8 provides a new method: from_db_value.

See: https://docs.djangoproject.com/en/1.8/howto/custom-model-fields/#converting-values-to-python-objects https://docs.djangoproject.com/en/1.8/ref/models/fields/#django.db.models.Field.from_db_value

(Note: super() may not be called in from_db_value())

gavinwahl commented 9 years ago

(Note: super() may not be called in from_db_value())

Why?

jxcl commented 9 years ago

It's in one of the links I posted: https://docs.djangoproject.com/en/1.8/ref/models/fields/#django.db.models.Field.from_db_value

gavinwahl commented 9 years ago

Where's the test?

acatton commented 9 years ago

This should be mergeable