How to add more space in `__str__` method of Django model?
<p>I want to add more spaces to <code>__str__</code> method, but method cut off spaces to 1.</p>

<p>For example:</p>

<pre><code>class Spam(models.Model):
    foo = models.IntegerField()
    bar = models.IntegerField()

    def __str__(self):
        return 'more spaces {}            {}!'.format(self.foo, self.bar)
</code></pre>

<p>This output in Django admin:
<code>more spaces 1 2</code></p>

<p>I want : <code>more spaces 1            2</code></p>

<p>How do this?</p>

<p>If you use the print method it prints ok.</p>

<p>I guess you have a problem with html? Replace whitespaces with &nbsp; (but then it looks like crap in the shell) or try a more explicit representation in admin...</p>

<p>Or you could try wrapping the string in the <code>&lt;pre&gt;</code> tag</p>

python django