I have a view that allows me to download, but I can't download from Django admin. This is my view that allows me to download. How do I put similar logic in the admin?
def script_download(request, script_id): scripts = Scripts.objects.get(id=script_id) fsock = open(str(scripts.zipfile_file_name),'r') response = HttpResponse(fsock, content_type='application/zip') response['Content-Disposition'] = "attachment; filename=%s "% str( scripts.zipfile_file_name) return response -- 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/760e012c-5aef-43b3-ba60-452d067459f6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.