djangosnippets.org: Latest snippets tagged with 'button'https://djangosnippets.org/tags/button/2013-12-10T07:17:08.280905-06:00Add admin edit form buttons (work with django 1.6)
2013-12-10T07:17:08.280905-06:00shorewardhttps://djangosnippets.org/snippets/3008/<p>I can't find any workable solution, so I wrote it.</p>
<p>(Checked it on Django 1.6)</p>
Freely redistributableRadio widget with labels after inputs
2012-07-10T08:07:28.931687-05:00avsdhttps://djangosnippets.org/snippets/2785/<p>Difference from standard Django 1.4 implementation is just structure of list. In django <code><input></code> elements are <em>wrapped</em> by their labels, and look like this::</p>
<pre><code><ul>
<li><label><input/> Label 1</label>
<li><label><input/> Label 2</label>
</ul>
</code></pre>
<p>This widget puts labels <em>after</em> input elements::</p>
<pre><code><ul class="form-button-radio">
<li><input/> <label>Label 1</label>
<li><input/> <label>Label 2</label>
</ul>
</code></pre>
<p>It makes …</p>
Freely redistributableAdmin Save and view next button html
2010-05-02T22:06:09.003180-05:00ungenio41https://djangosnippets.org/snippets/2006/<p>See <a href="http://www.djangosnippets.org/snippets/2005/">link</a> for description.
</p>
<p>Note: Requires Django 1.2.
</p>
Freely redistributableAdmin Save and view next button
2010-05-02T22:04:20.910768-05:00ungenio41https://djangosnippets.org/snippets/2005/<p>Add a Save and view next button to your admin change form.
</p>
<p>Put the code at <a href="http://www.djangosnippets.org/snippets/2006/">link</a> in a file called myapp/templates/admin/myapp/change_form.html
</p>
<p>Note: Requires Django 1.2.
</p>
Freely redistributableButton Admin
2009-12-28T20:33:07.232272-06:00delfickhttps://djangosnippets.org/snippets/1842/<p>This is an improvement on other ButtonAdmin implementations.
</p>
<p>A few features : It allows you to specify whether button appears on change form or change list; whether the form is to be saved before the resulting function is called; whether the button should be displayed
</p>
<p>Look at the bottom of …</p>
Freely redistributableSimple Admin-button linking to Databrowse
2009-04-28T11:34:07.651612-05:00magicrebirthhttps://djangosnippets.org/snippets/1472/<p>If you want all the objects in your models' admin interface to have a direct link to their databrowse page (just like the <em>history</em> link).. follow these steps: </p>
<p>1) copy the <em>change_form.html</em> admin template in mytemplates/admin/</p>
<p>2) edit <em>change_form.html</em> by adding this code right next to (before or after) the …</p>
Freely redistributable