Esempio n. 1
0
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
Esempio n. 2
0
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
Esempio n. 3
0
 def handle(self, limit, filename, **options):
     with open(filename, 'wb') as f:
         download_changes(get_db(), limit, f)
Esempio n. 4
0
 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)
Esempio n. 5
0
 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)