title: Error in admin: __str__ returned non-string (type NoneType)
body: <p>The admin returns this error when trying to add an instance to one of my models. The model itself has a correct <strong>str</strong>() method and contains no instances yet. Also tried replacing the <strong>str</strong>() method with a static method or removing it altogether. No luck.</p>
  
  <p>The error seems to point towards something going wrong in the history part of the admin. Stacktrace points to line 33.</p>
  
  <pre><code>Error during template rendering
  
  In template /Users/snirp/juis/snirpdrive/glotto/venv/lib/python3.6/site-packages/django/contrib/admin/templates/admin/change_form.html, error at line 33
  __str__ returned non-string (type NoneType)
  23  {% endblock %}
  24  {% endif %}
  25  
  26  {% block content %}&lt;div id="content-main"&gt;
  27  {% block object-tools %}
  28  {% if change %}{% if not is_popup %}
  29    &lt;ul class="object-tools"&gt;
  30      {% block object-tools-items %}
  31      &lt;li&gt;
  32          {% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %}
  33          &lt;a href="{% add_preserved_filters history_url %}" class="historylink"&gt;{% trans "History" %}&lt;/a&gt;
  34      &lt;/li&gt;
  35      {% if has_absolute_url %}&lt;li&gt;&lt;a href="{{ absolute_url }}" class="viewsitelink"&gt;{% trans "View on site" %}&lt;/a&gt;&lt;/li&gt;{% endif %}
  36      {% endblock %}
  37    &lt;/ul&gt;
  38  {% endif %}{% endif %}
  39  {% endblock %}
  40  &lt;form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.model_name }}_form" novalidate&gt;{% csrf_token %}{% block form_top %}{% endblock %}
  41  &lt;div&gt;
  42  {% if is_popup %}&lt;input type="hidden" name="{{ is_popup_var }}" value="1" /&gt;{% endif %}
  43  {% if to_field %}&lt;input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}" /&gt;{% endif %}
  </code></pre>
  
  <p>These are the relevant parts of my <code>models.py</code> and <code>admin.py</code></p>
  
  <pre><code>class UserContent(models.Model):
      created_at = models.DateTimeField(auto_now_add=True)
      updated_at = models.DateTimeField(auto_now=True)
      created_by = models.ForeignKey(User, related_name='%(class)s_creator')
      updated_by = models.ForeignKey(User, related_name='%(class)s_updater')
  
      class Meta:
          abstract = True
  
  
  class Linetrans(UserContent):
      line = models.ForeignKey(Line)
      translation = models.ForeignKey(Translation)
      text = models.CharField(max_length=400)
  
      #def __str__(self):
      #    return self.text
  
      class Meta:
          ordering = ['line']
  </code></pre>
  
  <p>and</p>
  
  <pre><code>admin.site.register(Linetrans)
  </code></pre>
  
  <p>Other model classes are very similar and do not return an error. The error also occurs when the Linetrans is added as an inline to another admin class.</p>
  
  <p>edit / update: I commented out all other str() methods in my model and sure enough the error seems to go away. Now trying to pinpoint the issue.</p>