djangosnippets.org: Latest snippets posted by mjthttps://djangosnippets.org/users/mjt/2009-11-13T08:39:13.222446-06:00mjtPostgreSQL ON DELETE CASCADE
2009-11-13T08:39:13.222446-06:00mjthttps://djangosnippets.org/snippets/1796/<p>Have you always been annoyed by how you set up this elaborate big database schema and weren't able to have <strong>ON DELETE CASCADE ON UPDATE CASCADE</strong> in dbshell?</p>
<p>This solves the problem; create the two files and and empty <em><strong>init</strong>.py</em> and put them somewhere in your path.</p>
<p>Then say …</p>
Freely redistributabledjango-noserun for testing
2009-03-22T12:12:49.891008-05:00mjthttps://djangosnippets.org/snippets/1390/<p>I wanted to use Nose with Django so I came up with this.</p>
<p><code>TEST_RUNNER = 'noserun.run_tests'</code> in settings.py</p>
<p>It does not do setup/teardown implicitly between test
methods, you need to call <em>nosetest.test.flush()</em> and
<em>nosetest.test.loaddata()</em> manually if you want that.</p>
<p>Enables the method names <em>setup</em> and <em>teardown</em></p>
<p>The environment variable <em>NOSE_COVER …</em></p>
Freely redistributable