Hi, I have a csv export that runs in my view just fine in my development environment, but here I get a server error. There is nothing in the server or the error log. I am using django 1.7 and python 2.7. Here is the code:
def csv_entered(request):
queryset=Item.objects.filter(event='SilverPaws2015').exclude(aes_item_number__isnull=True)
#filter(received='Received')
response = HttpResponse(content_type='text/csv')
response['Content-Disposition'] = 'attachment; filename="aes_entered.csv"'
writer = csv.writer(response)
writer.writerow(['ID','Category','ItemName','Donor','AESItemNum','Notes','Date'])
for item in queryset:
writer.writerow([item.id,item.category,item.item,item.donor,item.aes_item_number,
item.notes,item.created_at])
return response