Reorder all imports

This commit is contained in:
Anna Sidwell 2019-08-19 23:53:34 +02:00
parent 73fe51ba9c
commit 3e5b41de1d
103 changed files with 240 additions and 160 deletions

View File

@ -1,9 +1,11 @@
from django.contrib.auth.models import User
from rest_framework import serializers, viewsets
from rest_framework import serializers
from rest_framework import viewsets
from rest_framework_gis import serializers as gis_serializers
from apps.files.models import File
from apps.map.models import CaseStudy, PointOfInterest
from apps.map.models import CaseStudy
from apps.map.models import PointOfInterest
class UserSerializer(serializers.HyperlinkedModelSerializer):

View File

@ -1,6 +1,6 @@
from envelope.forms import ContactForm
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from envelope.forms import ContactForm
class ContactForm(ContactForm):

View File

@ -1,3 +1,2 @@
# from django.test import TestCase
# Create your tests here.

View File

@ -1,7 +1,6 @@
from braces.views import FormMessagesMixin
from envelope.views import ContactView
from django.utils.translation import ugettext_lazy as _
from envelope.views import ContactView
from .forms import ContactForm

View File

@ -1,6 +1,7 @@
from django import forms
from .models import File, ImageFile
from .models import File
from .models import ImageFile
class FileForm(forms.ModelForm):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-04-23 02:20
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,9 +2,10 @@
# Generated by Django 1.11.6 on 2018-04-29 22:07
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,9 +2,10 @@
# Generated by Django 1.11.6 on 2018-05-26 15:47
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-05-30 03:08
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.15 on 2018-09-22 17:17
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -1,6 +1,6 @@
# Generated by Django 2.0.8 on 2018-09-28 13:23
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -1,8 +1,8 @@
# Generated by Django 2.1.1 on 2018-12-01 23:15
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -1,9 +1,8 @@
from django.contrib.auth.models import User
from django.http import QueryDict
from django.test import TestCase
from django.utils.translation import activate
from django.urls import reverse
from django.utils.translation import activate
from override_storage import override_storage
from .models import File

View File

@ -1,11 +1,9 @@
from django.conf.urls import url
from .views import (
FileUploadView,
FileDeleteView,
ImageFileUploadView,
ImageFileDeleteView,
)
from .views import FileDeleteView
from .views import FileUploadView
from .views import ImageFileDeleteView
from .views import ImageFileUploadView
app_name = "files"

View File

@ -1,10 +1,13 @@
from django.core.exceptions import PermissionDenied
from django.contrib.auth.mixins import LoginRequiredMixin
from django.core.exceptions import PermissionDenied
from django.http import JsonResponse
from django.views.generic import FormView, DetailView
from django.views.generic import DetailView
from django.views.generic import FormView
from .forms import ImageFileForm, FileForm
from .models import ImageFile, File
from .forms import FileForm
from .forms import ImageFileForm
from .models import File
from .models import ImageFile
class FileUploadView(LoginRequiredMixin, FormView):

View File

@ -1,9 +1,12 @@
from django.contrib import admin
from django import forms
from dal import autocomplete
from django import forms
from django.contrib import admin
from leaflet.admin import LeafletGeoAdmin
from .models import CaseStudy, CaseStudyDraft, SpatialRefSys, PointOfInterest
from .models import CaseStudy
from .models import CaseStudyDraft
from .models import PointOfInterest
from .models import SpatialRefSys
class CaseStudyDraftAdmin(admin.ModelAdmin):

View File

@ -1,19 +1,28 @@
from crispy_forms.bootstrap import FormActions
from crispy_forms.bootstrap import PrependedText
from crispy_forms.bootstrap import Tab
from crispy_forms.bootstrap import TabHolder
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Div
from crispy_forms.layout import Fieldset
from crispy_forms.layout import HTML
from crispy_forms.layout import Layout
from crispy_forms.layout import Submit
from dal import autocomplete
from django import forms
from django.urls import reverse, reverse_lazy
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.safestring import mark_safe
from django.utils.text import format_lazy
from django.utils.translation import ugettext_lazy as _
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit, Layout, HTML, Fieldset, Div
from crispy_forms.bootstrap import Tab, TabHolder, PrependedText, FormActions
from dal import autocomplete
from leaflet.forms.widgets import LeafletWidget
from apps.files.models import File, ImageFile
from .models import CaseStudy, SpatialRefSys, PointOfInterest
from .models import CaseStudy
from .models import PointOfInterest
from .models import SpatialRefSys
from .widgets import JSONFileListWidget
from apps.files.models import File
from apps.files.models import ImageFile
SECTOR_HELP = {

View File

@ -2,11 +2,12 @@
# Generated by Django 1.11.1 on 2017-05-19 21:42
from __future__ import unicode_literals
from django.conf import settings
import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion
import django_countries.fields
from django.conf import settings
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.10.7 on 2017-10-06 15:59
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.10.7 on 2017-10-06 20:33
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.10.7 on 2017-10-07 13:49
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,8 +2,8 @@
# Generated by Django 1.10.7 on 2017-10-07 14:23
from __future__ import unicode_literals
from django.db import migrations
import django_extensions.db.fields
from django.db import migrations
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.10.7 on 2017-10-07 15:02
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.10.7 on 2017-10-07 15:44
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,8 +2,10 @@
# Generated by Django 1.11.6 on 2017-10-11 16:06
from __future__ import unicode_literals
from django.db import migrations
from django.db import models
import apps.map.validators
from django.db import migrations, models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-10-12 15:52
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -3,8 +3,9 @@
from __future__ import unicode_literals
import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django_countries.fields
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-10-12 16:40
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-10-25 20:35
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-10-30 15:50
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-10-31 14:42
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-01 15:08
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-02 22:05
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-02 22:11
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-02 22:19
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-02 22:23
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-02 22:28
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-02 22:32
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-02 22:50
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-02 23:00
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-02 23:26
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-02 23:46
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-02 23:58
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,8 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-03 13:28
from __future__ import unicode_literals
from django.db import migrations
import multiselectfield.db.fields
from django.db import migrations
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-03 16:08
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-03 16:10
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-03 17:45
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-03 22:30
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2017-11-03 22:54
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-03-26 01:57
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-03-27 03:34
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-03-27 05:49
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-03-28 01:46
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-03-28 02:45
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-03-28 03:09
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,8 +2,8 @@
# Generated by Django 1.11.6 on 2018-03-28 06:16
from __future__ import unicode_literals
from django.db import migrations
import multiselectfield.db.fields
from django.db import migrations
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-03-28 11:22
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,9 +2,11 @@
# Generated by Django 1.11.6 on 2018-03-29 10:44
from __future__ import unicode_literals
import apps.map.validators
from django.db import migrations, models
import multiselectfield.db.fields
from django.db import migrations
from django.db import models
import apps.map.validators
class Migration(migrations.Migration):

View File

@ -2,8 +2,9 @@
# Generated by Django 1.11.6 on 2018-03-31 04:59
from __future__ import unicode_literals
from django.db import migrations, models
import phonenumber_field.modelfields
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,8 +2,9 @@
# Generated by Django 1.11.6 on 2018-03-31 05:17
from __future__ import unicode_literals
from django.db import migrations, models
import phonenumber_field.modelfields
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,8 +2,10 @@
# Generated by Django 1.11.6 on 2018-03-31 06:04
from __future__ import unicode_literals
from django.db import migrations
from django.db import models
import apps.map.validators
from django.db import migrations, models
class Migration(migrations.Migration):

View File

@ -2,8 +2,8 @@
# Generated by Django 1.11.6 on 2018-03-31 06:08
from __future__ import unicode_literals
from django.db import migrations
import multiselectfield.db.fields
from django.db import migrations
class Migration(migrations.Migration):

View File

@ -2,8 +2,9 @@
# Generated by Django 1.11.6 on 2018-03-31 09:33
from __future__ import unicode_literals
from django.db import migrations, models
import multiselectfield.db.fields
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-03-31 11:34
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,8 +2,8 @@
# Generated by Django 1.11.6 on 2018-04-02 12:37
from __future__ import unicode_literals
from django.db import migrations
import multiselectfield.db.fields
from django.db import migrations
class Migration(migrations.Migration):

View File

@ -3,8 +3,9 @@
from __future__ import unicode_literals
import django.contrib.gis.db.models.fields
from django.db import migrations, models
import multiselectfield.db.fields
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -3,9 +3,10 @@
from __future__ import unicode_literals
import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django_countries.fields
import multiselectfield.db.fields
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,9 +2,10 @@
# Generated by Django 1.11.6 on 2018-04-12 06:50
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,10 +2,11 @@
# Generated by Django 1.11.6 on 2018-04-16 03:55
from __future__ import unicode_literals
from django.conf import settings
import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,8 +2,9 @@
# Generated by Django 1.11.6 on 2018-04-19 16:50
from __future__ import unicode_literals
from django.db import migrations, models
import multiselectfield.db.fields
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-04-23 02:20
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-04-29 22:05
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,8 +2,9 @@
# Generated by Django 1.11.6 on 2018-05-19 18:01
from __future__ import unicode_literals
from django.db import migrations, models
import multiselectfield.db.fields
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-05-23 16:59
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,8 +2,9 @@
# Generated by Django 1.11.6 on 2018-05-25 00:35
from __future__ import unicode_literals
from django.db import migrations, models
import multiselectfield.db.fields
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-05-25 00:52
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-05-26 15:36
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,7 +2,8 @@
# Generated by Django 1.11.6 on 2018-05-26 15:47
from __future__ import unicode_literals
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,8 +2,9 @@
# Generated by Django 1.11.6 on 2018-05-30 02:52
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,8 +2,9 @@
# Generated by Django 1.11.15 on 2018-09-22 17:43
from __future__ import unicode_literals
from django.db import migrations, models
import multiselectfield.db.fields
from django.db import migrations
from django.db import models
string_fields = [
"additional_technical_details",

View File

@ -2,8 +2,9 @@
# Generated by Django 1.11.15 on 2018-09-22 18:06
from __future__ import unicode_literals
from django.db import migrations, models
import multiselectfield.db.fields
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -2,11 +2,12 @@
# Generated by Django 1.11.6 on 2018-10-12 22:48
from __future__ import unicode_literals
from django.conf import settings
import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields
from django.conf import settings
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -1,9 +1,9 @@
# Generated by Django 2.1.1 on 2018-12-01 23:15
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields
import multiselectfield.db.fields
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -1,6 +1,6 @@
# Generated by Django 2.1.1 on 2018-12-02 02:09
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -1,5 +1,4 @@
# Generated by Django 2.1.1 on 2018-12-02 02:23
from django.db import migrations

View File

@ -1,6 +1,6 @@
# Generated by Django 2.1.1 on 2019-03-04 20:16
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -1,6 +1,6 @@
# Generated by Django 2.1.1 on 2019-03-04 20:40
from django.db import migrations, models
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -1,7 +1,7 @@
# Generated by Django 2.1.1 on 2019-03-21 19:24
from django.db import migrations, models
import multiselectfield.db.fields
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -1,8 +1,8 @@
# Generated by Django 2.1.1 on 2019-04-07 15:30
from django.db import migrations, models
import django_countries.fields
import multiselectfield.db.fields
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -1,7 +1,7 @@
# Generated by Django 2.1.1 on 2019-04-07 16:04
from django.db import migrations, models
import multiselectfield.db.fields
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):

View File

@ -6,9 +6,8 @@ from django.contrib.gis.db import models
from django.db import connection
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext_lazy as _
from django_extensions.db.fields import AutoSlugField
from django_countries.fields import CountryField
from django_extensions.db.fields import AutoSlugField
from multiselectfield import MultiSelectField
from phonenumber_field.modelfields import PhoneNumberField

View File

@ -7,9 +7,9 @@ from django.test import TestCase
from django.urls import reverse
from django.utils.translation import activate
from .views import DraftsAPI
from .models import CaseStudy
from .models import CaseStudyDraft
from .views import DraftsAPI
class CaseStudyDraftAPITests(TestCase):

View File

@ -1,28 +1,31 @@
import logging
import json
import logging
from django.shortcuts import get_object_or_404
from dal import autocomplete
from django.conf import settings
from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.auth.mixins import UserPassesTestMixin
from django.core.mail import send_mail
from django.db.models import Q
from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import get_language
from django.views import View
from django.views.generic import DetailView
from django.views.generic.base import TemplateView
from django.views.generic.edit import CreateView, UpdateView
from django.views.generic.edit import CreateView
from django.views.generic.edit import UpdateView
from dal import autocomplete
from apps.files.models import File
from . import models
from . import forms
from .models import CaseStudy, CaseStudyDraft, SpatialRefSys
from .forms import ShortCaseStudyForm, LongCaseStudyForm
from . import models
from .forms import LongCaseStudyForm
from .forms import ShortCaseStudyForm
from .models import CaseStudy
from .models import CaseStudyDraft
from .models import SpatialRefSys
from apps.files.models import File
logger = logging.getLogger(__name__)
@ -219,7 +222,9 @@ class DraftsAPI(LoginRequiredMixin, View):
except models.CaseStudyDraft.DoesNotExist:
# If it doesn't exist, create it
CaseStudyDraft.objects.create(author=request.user, data=request.body.decode())
CaseStudyDraft.objects.create(
author=request.user, data=request.body.decode()
)
return HttpResponse(status=201) # Created
def delete(self, request):

View File

@ -1,6 +1,7 @@
import json
from django.forms import widgets
from apps.files.models import File

View File

@ -1,3 +1,2 @@
# from django.contrib import admin
# Register your models here.

View File

@ -1,5 +1,5 @@
from django.forms import ModelForm
from django.contrib.auth import get_user_model
from django.forms import ModelForm
class UpdateProfile(ModelForm):

View File

@ -1,3 +1,2 @@
# from django.db import models
# Create your models here.

View File

@ -1,3 +1,2 @@
# from django.test import TestCase
# Create your tests here.

View File

@ -9,11 +9,11 @@ https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os
import raven
from django.utils.translation import ugettext_lazy as _
from django.contrib.messages import constants as messages
from django.utils.translation import ugettext_lazy as _
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

View File

@ -1,17 +1,14 @@
from contextlib import contextmanager
import time
from contextlib import contextmanager
from django.contrib.auth.models import User
from django.test import LiveServerTestCase
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.expected_conditions import (
staleness_of,
visibility_of_element_located,
)
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support.expected_conditions import staleness_of
from selenium.webdriver.support.expected_conditions import visibility_of_element_located
from selenium.webdriver.support.select import Select
from selenium.webdriver.support.wait import WebDriverWait
from apps.map.models import CaseStudy

Some files were not shown because too many files have changed in this diff Show More