убрал все упоминания decouple
This commit is contained in:
parent
5731f7316b
commit
d12a3b69f7
|
|
@ -6,8 +6,6 @@ from rest_framework import status
|
||||||
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
|
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
|
||||||
from django.shortcuts import get_object_or_404, get_list_or_404
|
from django.shortcuts import get_object_or_404, get_list_or_404
|
||||||
from rest_framework.permissions import IsAuthenticated
|
from rest_framework.permissions import IsAuthenticated
|
||||||
from decouple import config
|
|
||||||
from urllib.parse import urljoin
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from .schemas import SongSchema, DeleteSongSchema
|
from .schemas import SongSchema, DeleteSongSchema
|
||||||
|
|
@ -46,8 +44,8 @@ class SongViewSet(GenericViewSet):
|
||||||
}
|
}
|
||||||
#Если трека нету в базе
|
#Если трека нету в базе
|
||||||
else:
|
else:
|
||||||
file_url = urljoin(config('URL_PROD'), f'/api/station/it-radio/file/{request.data['azura_id']}')
|
file_url = f'http://82.97.242.49:10084/api/station/it-radio/file/{request.data['azura_id']}'
|
||||||
API_KEY = config('API_KEY')
|
API_KEY = "49226d3488aac3f5:18d88659c6c1c5e131a0ce0a94d55235"
|
||||||
headers = {
|
headers = {
|
||||||
"Authorization": f"Bearer {API_KEY}"
|
"Authorization": f"Bearer {API_KEY}"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
SECRET_KEY = 'django-insecure-z242=*-knp4h=0l1*o-nyid^y0bwt4bvg3tf*wvr(qszj&!8$c'
|
|
||||||
API_KEY = "49226d3488aac3f5:18d88659c6c1c5e131a0ce0a94d55235"
|
|
||||||
DEBUG = True
|
|
||||||
URL_PROD = http://82.97.242.49:10084
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import os
|
import os
|
||||||
from decouple import config
|
|
||||||
|
|
||||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue