In the admin.py i have this function:

actions = ['generar_pdf']
def generar_pdf(self, request, queryset):

... (This function make a PDF of the object selected)

And i show one button in the list_display (of the admin site) with this 
function:

def boton_mail(self,obj):
                return mark_safe('<center><img 
src="http://mypage/static/admin/img/descargar_pdf.png"; alt="Descargar PDF" 
width=30 height=25></center>')

It is posible to call the function "generar_pdf" with a link (< a >) in the 
function "boton_mail"?

(I want to call the action from a image in the list display in the admin 
site)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to