title: How to get Object as String in Django?
body: <p>I'm trying to do a very simple thing but I couldn't find how to.</p>
  
  <p>I have this function defined in my model class : </p>
  
  <pre><code>def __unicode__(self):
      return "Object name = " + self.name
  </code></pre>
  
  <p>so in a template page, or in a views.py, I want to get this string.</p>
  
  <p>in a template, I tried these and they didn't work : </p>
  
  <p>{{ my_object }}
  {{ str(my_object) }}
  {{ my_object.self }}</p>
  
  <p>What is the correct way of doing this?</p>
  
  <p>Thanks !</p>