djangosnippets.org: Latest snippets posted by tomashttps://djangosnippets.org/users/tomas/2009-07-10T03:40:51.735777-05:00tomasLocaleurl sitemap
2009-07-10T03:40:51.735777-05:00tomashttps://djangosnippets.org/snippets/1620/<p>Example of using django localeurl with sitemaps. Create sitemap instance for each combination of the sitemap section and language.</p>
<p>In your sitemap class create method
<code>def location(self, obj):
return chlocale(obj.get_absolute_url(), self.language)</code></p>
<p>or inherit it from LocaleurlSitemap class.</p>
Freely redistributableCustom nose runner
2009-06-04T09:48:23.490342-05:00tomashttps://djangosnippets.org/snippets/1551/<p>This method is replacement for django test runner. It uses nose test runner, which will discover all tests in the application (not even in tests module of applications).</p>
<p>For installing put in settings.py:
<code>TEST_RUNNER = 'nose_runner.run_tests'</code></p>
<p>where <em>nose_runner</em> is module containing the code</p>
Freely redistributable