Django Crispy Multichoices Form (Foreignkey) is printing "Object" instead of Object.name
<p>I have this model.py </p>

<pre><code>class BD(models.Model):
    b_Name = models.CharField(max_length=200)

    def __unicode__(self):
        return self.b_Name


class Data(models.Model):
    o_name = models.CharField(verbose_name='Enter your Name', max_length=100)
    d_name = models.CharField(max_length=100)
    b = models.ForeignKey(BD)
</code></pre>

<p>And I have this form.py : </p>

<pre><code>from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit, Layout, Field
from crispy_forms.bootstrap import (
    PrependedText, PrependedAppendedText, FormActions)

from .models import Data, BD


class Form(forms.ModelForm):
    class Meta:
        model = Data
        fields = ('o_name', 'd_name', 'b')
    helper = FormHelper()
    helper.form_method = 'POST'
    helper.add_input(Submit('Submit', 'Submit', css_class='btn-primary'))
</code></pre>

<p>The problem lies with b. 
So if I understand correctly how this works, the foreign key makes django get some object contained in a table called "data_DB" on my postgresql server.<br>
What I don't get is that, for b, crispy should generate a listbox containing the b_name of each row of my postgresql table whereas it only displays "BD object" as a choice, as much time as there are rows in my table. </p>

<p>I thought the function : </p>

<pre><code>def __unicode__(self):
        return self.b_Name
</code></pre>

<p>was meant to return what i was interested in the object instead of the object itself. </p>

<p>What did I misunderstand ?  </p>

<p>EDIT : that's the HTML output : </p>

<pre><code>&lt;select class="select form-control" id="id_b" name="b"&gt;
&lt;option value="" selected="selected"&gt;---------&lt;/option&gt;
&lt;option value="2"&gt;BData object&lt;/option&gt;
&lt;option value="1"&gt;BData object&lt;/option&gt;
&lt;option value="3"&gt;BData object&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>Value should be BDdate.b_Name </p>