Cover cropping.
[redakcja.git] / src / cover / views.py
index b1261e6..a7b96fb 100644 (file)
@@ -8,8 +8,8 @@ from django.http import HttpResponse, HttpResponseRedirect, Http404
 from django.shortcuts import get_object_or_404, render
 from django.views.decorators.csrf import csrf_exempt
 from django.views.decorators.http import require_POST
-from catalogue.helpers import active_tab
-from catalogue.models import Chunk
+from documents.helpers import active_tab
+from documents.models import Chunk
 from cover.models import Image
 from cover import forms
 
@@ -133,8 +133,8 @@ def image_list(request):
 def add_image(request):
     form = ff = None
     if request.method == 'POST':
-        if request.POST.get('form_id') == 'flickr':
-            ff = forms.FlickrForm(request.POST)
+        if request.POST.get('form_id') == 'import':
+            ff = forms.ImportForm(request.POST)
             if ff.is_valid():
                 form = forms.ImageAddForm(ff.cleaned_data)
         else:
@@ -145,7 +145,7 @@ def add_image(request):
     if form is None:
         form = forms.ImageAddForm()
     if ff is None:
-        ff = forms.FlickrForm()
+        ff = forms.ImportForm()
     return render(request, 'cover/add_image.html', {
             'form': form,
             'ff': ff,