|
3 | 3 |
|
4 | 4 | from rest_framework.views import APIView |
5 | 5 | from rest_framework.viewsets import ViewSet |
6 | | -from rest_framework.renderers import BrowsableAPIRenderer, JSONRenderer, TemplateHTMLRenderer |
7 | 6 | from rest_framework.response import Response |
8 | | -from rest_framework.decorators import api_view |
9 | | -from rest_framework.exceptions import NotAcceptable, Throttled |
| 7 | +from rest_framework.exceptions import Throttled |
10 | 8 | from django.core.exceptions import ObjectDoesNotExist |
11 | 9 | from django.shortcuts import redirect |
12 | | -from datetime import datetime, timezone, timedelta |
13 | 10 |
|
14 | | -from django.contrib.sessions.models import Session |
15 | | -from django.db import transaction |
16 | | -from django.db.utils import DatabaseError |
17 | 11 | from django.http.response import ( |
18 | 12 | Http404, |
19 | 13 | HttpResponseNotFound, |
20 | | - HttpResponseForbidden, |
21 | | - HttpResponseBadRequest, |
22 | | - StreamingHttpResponse, |
23 | 14 | HttpResponse, |
24 | 15 | ) |
25 | 16 | from drf_spectacular.utils import extend_schema |
26 | 17 | from dynaconf import settings |
27 | | -from itertools import chain |
28 | | -from packaging.utils import canonicalize_name |
29 | | -from urllib.parse import urljoin, urlparse, urlunsplit |
30 | 18 | from pathlib import PurePath |
| 19 | +from urllib import urljoin |
31 | 20 |
|
32 | | -from pulpcore.plugin.viewsets import OperationPostponedResponse |
33 | | -from pulpcore.plugin.tasking import dispatch |
34 | | -from pulpcore.plugin.util import get_domain, get_url |
| 21 | +from pulpcore.plugin.util import get_domain |
35 | 22 |
|
36 | 23 | from pulp_rust.app.models import RustDistribution, RustRepository, RustContent |
37 | 24 | from pulp_rust.app.serializers import ( |
38 | 25 | IndexRootSerializer, |
39 | 26 | RustContentSerializer, |
40 | 27 | ) |
41 | | -from pulp_rust.app import tasks |
42 | 28 |
|
43 | 29 | log = logging.getLogger(__name__) |
44 | 30 |
|
|
0 commit comments