예제 #1
0
class MALTRowAdmin(admin.ModelAdmin):
    model = MALTRow
    list_display = ['month', 'domain_name', 'username', 'num_of_forms', 'wam']
    list_filter = ['month', 'domain_name', 'num_of_forms', 'wam']
    actions = [
        export_as_csv_action("Export selected rows as CSV", exclude=["id"])
    ]
예제 #2
0
def _malt_csv_response(month, year):
    query_month = "{year}-{month}-01".format(year=year, month=month)
    queryset = MALTRow.objects.filter(month=query_month)
    return export_as_csv_action(exclude=['id'])(MALTRowAdmin, None, queryset)
예제 #3
0
def _malt_csv_response(month, year):
    query_month = "{year}-{month}-01".format(year=year, month=month)
    queryset = MALTRow.objects.filter(month=query_month)
    return export_as_csv_action(exclude=['id'])(MALTRowAdmin, None, queryset)
예제 #4
0
class MALTRowAdmin(admin.ModelAdmin):
    model = MALTRow
    list_display = ['domain_name', 'month']
    actions = [
        export_as_csv_action("Export selected rows as CSV", exclude=["id"])
    ]