def download_recent_changes(request): count = int(request.GET.get('changes', 10000)) resp = HttpResponse(content_type='text/csv') resp['Content-Disposition'] = 'attachment; filename="recent_changes.csv"' download_changes(get_db(), count, resp) return resp
def download_recent_changes(request): count = int(request.GET.get('changes', 10000)) resp = HttpResponse(content_type='text/csv') resp['Content-Disposition'] = 'attachment; filename="recent_changes.csv"' download_changes(get_db(), count, resp) return resp
def handle(self, limit, filename, **options): with open(filename, 'wb') as f: download_changes(get_db(), limit, f)
def handle(self, *args, **options): limit = int(args[0]) if args else 500 file = args[1] if len(args) > 1 else 'database_changes.csv' with open(file, 'wb') as f: download_changes(get_db(), limit, f)
def handle(self, *args, **options): limit = int(args[0]) if args else 500 file = args[1] if len(args) > 1 else 'database_changes.csv' with open(file, 'wb') as f: download_changes(get_db(), limit, f)