Hi! Can you send the complete exception message whit traceback to us?
On Thu, Jun 9, 2016 at 1:07 PM, McKinley <[email protected]> wrote: > 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 [email protected]. > To post to this group, send email to [email protected]. > 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 > <https://groups.google.com/d/msgid/django-users/760e012c-5aef-43b3-ba60-452d067459f6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Ezequiel Bertti https://telegram.me/ebertti https://twitter.com/ebertti https://github.com/ebertti -- 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 [email protected]. To post to this group, send email to [email protected]. 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/CACrQMYoLwY8Ttqv7aocA_1%3DC5drNX0TCm1TwmB1rdm5-WL3x3Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

