djangosnippets.org: Latest snippets posted by timbroderhttp://djangosnippets.org/users/timbroder/2012-09-11T15:15:07.632371-05:00timbroderGenerating an InlineModelAdmin Form on the fly
2012-09-11T15:15:07.632371-05:00timbroderhttp://djangosnippets.org/snippets/2813/<p>Generate the form for an InlineModelAdmin. Usefull for ajaxing in a change in the Inline</p>
Freely redistributableShow all form errors
2012-06-15T09:09:43.064698-05:00timbroderhttp://djangosnippets.org/snippets/2769/<p>showing all the errors at the top of the page</p>
Freely redistributableGet admin url for a model
2010-02-09T12:26:42.750726-06:00timbroderhttp://djangosnippets.org/snippets/1916/<p>Add this to your model to be able to get their admin change link from anywhere</p>
<p>Useful if you want to jump to the admin screen of an object you are looking at on the front end</p>
Freely redistributableDjango Admin inline preview
2010-02-03T12:30:57.408125-06:00timbroderhttp://djangosnippets.org/snippets/1910/<p>Extend this ModelAdmin to get dynamic inline previews in the list admin
</p>
<p>also lives here: <a href="http://github.com/broderboy/django-admin-preview">http://github.com/broderboy/django-admin-preview</a>
</p>
Freely redistributableRemaining character count in django admin
2010-02-01T13:05:29.240047-06:00timbroderhttp://djangosnippets.org/snippets/1905/<p>Want to display the remaining characters on a text field in admin? (based off of maxlength or an override)</p>
<p>also lives here: <a href="http://github.com/broderboy/django-admin-remainingcharacters">http://github.com/broderboy/django-admin-remainingcharacters</a></p>
Freely redistributableOverride QuerySet.delete() (one way of preventing cascading deletes)
2010-01-07T10:23:30.876581-06:00timbroderhttp://djangosnippets.org/snippets/1851/<p>We needed to override the default QuerySet delete function to deal with a client problem that we were facing</p>
<p>Yes This is monkey-patching, and probably bad practice but if anyone needs to conditionally override the cascading delete that django does at the application level from a queryset, this is how …</p>
Freely redistributable