title: Django doctests in views.py
body: <p>The Django 1.4 <a href="https://docs.djangoproject.com/en/1.4/topics/testing/#writing-doctests" rel="noreferrer">documentation on tests</a> states:</p>
  <blockquote>
  <p>For a given Django application, the test runner looks for doctests in two places:</p>
  <ul>
  <li><p>The <code>models.py</code> file. You can define module-level doctests and/or a doctest for individual models. It's common practice to put application-level doctests in the module docstring and model-level doctests in the model docstrings.</p>
  </li>
  <li><p>A file called <code>tests.py</code> in the application directory -- i.e., the directory that holds models.py. This file is a hook for any and all doctests you want to write that aren't necessarily related to models.</p>
  </li>
  </ul>
  </blockquote>
  <p>Out of curiosity I'd like to know why Django's testrunner is limited to the doctests in <code>models.py</code>, but more practically I'd like to know how one could expand the testrunner's doctests to include (for example) <code>views.py</code> and other modules when running <code>manage.py test</code>.</p>
  <p>I'd be grateful for any input.</p>
  <p>Thank you.</p>
  <p>Brian</p>