djangosnippets.org: Latest snippets tagged with 'factory'http://djangosnippets.org/tags/factory/2022-05-06T03:02:56.875945-05:00Custom model manager chaining (Python 3 re-write)
2022-05-06T03:02:56.875945-05:00Spotted1270http://djangosnippets.org/snippets/10901/<p>This is a Python 3 re-write for https://djangosnippets.org/snippets/2117/</p>
Freely redistributableArbitrary length formset
2009-09-01T15:48:38.587460-05:00Rupehttp://djangosnippets.org/snippets/1711/<p>A formset class where you can add forms as you discover the need within your code. There is also the ability to add ManagmentForm fields.</p>
<p>If you ever found yourself in a situation where 1) you have repeated forms that need to be displayed in different locations, or 2) if …</p>
Freely redistributableScript factory for monitoring django-sphinx with Nagios
2009-04-07T10:35:52.168782-05:00johnnoonehttp://djangosnippets.org/snippets/1418/<p>This snippet is used to create a script for monitoring sphinx status with Nagios via <a href="http://code.google.com/p/django-sphinx/">django-sphinx</a>.</p>
<p>It returns 0 (OK) or 2 (CRITICAL).</p>
<p>Remember to change this strings <code>ModelToMonitor</code> and <code>app_name</code>.</p>
<p>Usage :</p>
<p><code>./manage your-controls-command --log</code> > /your/script/name.py</p>
Freely redistributable