I'm writing a JavaScript function that makes use of Django objects. I have an object, which I'll call item
, which has a field user
. So item.user
should give me an instance of a Django User object.
Now a User object has a number of subfields, including profile
. In Django, I can access this field with {{ user.profile }}
. In JavaScript, however, item.user.profile
is "undefined". Is there a different syntax, or is some other method of getting the data necessary?