Skip to content

Commit

Permalink
fix views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
submarcos committed Nov 26, 2024
1 parent ccb6f4b commit 96e8b13
Showing 1 changed file with 38 additions and 26 deletions.
64 changes: 38 additions & 26 deletions geotrek/common/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,56 +12,68 @@
from django.conf import settings
from django.contrib import messages
from django.contrib.admin.models import CHANGE, LogEntry
from django.contrib.auth.decorators import (login_required,
permission_required,
user_passes_test)
from django.contrib.auth.decorators import (
login_required,
permission_required,
user_passes_test,
)
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.gis.db.models import Extent, GeometryField
from django.core.exceptions import PermissionDenied
from django.db.models.functions import Cast
from django.http import JsonResponse, Http404, HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404, render, redirect
from django.http import Http404, HttpResponse, HttpResponseRedirect, JsonResponse
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from django.utils import timezone
from django.utils.decorators import method_decorator
from django.utils.encoding import force_str
from django.utils.translation import gettext as _
from django.views import static
from django.views.decorators.http import require_POST, require_http_methods
from django.views.decorators.http import require_http_methods, require_POST
from django.views.defaults import page_not_found
from django.views.generic import TemplateView
from django.views.generic import UpdateView
from django.views.generic import View
from django.views.generic import TemplateView, UpdateView, View
from django_celery_results.models import TaskResult
from django_large_image.rest import LargeImageFileDetailMixin
from geotrek import __version__
from geotrek.altimetry.models import Dem
from geotrek.celery import app as celery_app
from geotrek.core.models import Path
from geotrek.feedback.parsers import SuricateParser
from large_image import config
from mapentity import views as mapentity_views
from mapentity.helpers import api_bbox
from mapentity.registry import app_settings, registry
from mapentity.views import MapEntityList
from paperclip import settings as settings_paperclip
from paperclip.views import _handle_attachment_form
from rest_framework import mixins
from rest_framework import viewsets

from geotrek import __version__
from geotrek.celery import app as celery_app
from geotrek.common.filters import HDViewPointFilterSet
from geotrek.common.viewsets import GeotrekMapentityViewSet
from geotrek.feedback.parsers import SuricateParser
from .forms import (AttachmentAccessibilityForm, HDViewPointAnnotationForm,
HDViewPointForm, ImportDatasetForm,
ImportDatasetFormWithFile, ImportSuricateForm)
from .mixins.views import BookletMixin, CompletenessMixin, DocumentPortalMixin, DocumentPublicMixin
from rest_framework import mixins, viewsets

from .filters import HDViewPointFilterSet
from .forms import (
AttachmentAccessibilityForm,
HDViewPointAnnotationForm,
HDViewPointForm,
ImportDatasetForm,
ImportDatasetFormWithFile,
ImportSuricateForm,
)
from .mixins.views import (
BookletMixin,
CompletenessMixin,
DocumentPortalMixin,
DocumentPublicMixin,
)
from .models import AccessibilityAttachment, HDViewPoint
from .permissions import PublicOrReadPermMixin, RelatedPublishedPermission
from .serializers import HDViewPointGeoJSONSerializer, HDViewPointSerializer, HDViewPointAPISerializer
from .serializers import (
HDViewPointAPISerializer,
HDViewPointGeoJSONSerializer,
HDViewPointSerializer,
)
from .tasks import import_datas, import_datas_from_web
from .utils import leaflet_bounds
from .utils.import_celery import (create_tmp_destination,
discover_available_parsers)
from ..altimetry.models import Dem
from ..core.models import Path
from .utils.import_celery import create_tmp_destination, discover_available_parsers
from .viewsets import GeotrekMapentityViewSet

logger = logging.getLogger(__name__)

Expand Down

0 comments on commit 96e8b13

Please sign in to comment.