I have this error since a long time but can\'t figure it out :
Caught TypeError while rendering: coercing to Unicode: need string or buffer, NoneType found>
In my case it was something else: the object I was saving should first have an id(e.g. save() should be called) before I could set any kind of relationship with it.