From 3b1e70f70c36e555260e74b54b257534af6192da Mon Sep 17 00:00:00 2001 From: Basile Clement Date: Tue, 24 May 2016 00:40:55 +0200 Subject: [PATCH] use the new django app loading system --- gestioncof/csv_views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gestioncof/csv_views.py b/gestioncof/csv_views.py index a8df9deb..10eda18a 100644 --- a/gestioncof/csv_views.py +++ b/gestioncof/csv_views.py @@ -1,7 +1,7 @@ import csv from django.http import HttpResponse, HttpResponseForbidden from django.template.defaultfilters import slugify -from django.db.models.loading import get_model +from django.apps import apps from django.contrib.auth.models import User def export(qs, fields=None): @@ -38,7 +38,7 @@ def admin_list_export(request, model_name, app_label, queryset=None, fields=None if not request.user.is_staff: return HttpResponseForbidden() if not queryset: - model = get_model(app_label, model_name) + model = apps.get_model(app_label, model_name) queryset = model.objects.all() filters = dict() """