Get flake8 running OK

This commit is contained in:
2019-08-19 23:52:27 +02:00
parent e3e3f6d5db
commit 73fe51ba9c
20 changed files with 93 additions and 109 deletions

View File

@ -2,8 +2,6 @@ from django.contrib.auth.models import User
from django.db import models
from django.utils.translation import ugettext_lazy as _
from apps.map.models import CaseStudy, CaseStudyDraft
class BaseFile(models.Model):
file = models.FileField(upload_to=".")

View File

@ -47,7 +47,7 @@ class FileTests(TestCase):
self.assertRedirects(response, login_url)
def test_post_and_delete(self):
login = self.login()
self.login()
with open("apps/map/static/map/ojuso-logo-white.png", "rb") as fp:
response = self.client.post(reverse("files:upload_image"), {"file": fp})

View File

@ -1,7 +1,6 @@
from django.core.exceptions import PermissionDenied
from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import JsonResponse
from django.shortcuts import render
from django.views.generic import FormView, DetailView
from .forms import ImageFileForm, FileForm