﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
2409	Call model methods on object from admin interface	Rudolph Froger	Adrian Holovaty	"It would be really nice if you could add buttons to the admin interface of an object. A click on the button calls the corresponding model method:


{{{
class Subscriber(models.Model):
    name = models.CharField('name', maxlength=40)

    def send_invoice(self):
        """"""Sends invoice by e-mail to subscriber.""""""
        pass

    class Admin:
        actions = (('send_invoice', _('Send invoice')),)
}}}

This would create a button with the text 'Send invoice' in the admin interface of the object. The ""actions"" syntax should probably also allow passing arguments to the method.
"	enhancement	closed	contrib.admin	dev	normal	wontfix			Unreviewed	0	0	0	0	0	0
