This commit is contained in:
parent
ad3d470195
commit
14ac6229d3
@ -30,7 +30,7 @@ SECRET_KEY = "django-insecure-ztiqj957k(j*@ms=-^9j+=j7wd+cyo*+9g&hkfh1bji-@#&6(e
|
|||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['izaac.izaac.pl', 'localhost', '127.0.0.1',]
|
ALLOWED_HOSTS = ['izaac.izaac.pl', 'localhost', '127.0.0.1', 'izaac']
|
||||||
|
|
||||||
CORS_ALLOW_ALL_ORIGINS = True
|
CORS_ALLOW_ALL_ORIGINS = True
|
||||||
|
|
||||||
|
|||||||
@ -111,6 +111,8 @@ class GetAuthTokenView(APIView):
|
|||||||
}
|
}
|
||||||
print(headers)
|
print(headers)
|
||||||
print("DATA READY")
|
print("DATA READY")
|
||||||
response = requests.post('http://localhost:8000/o/token/', headers=headers, data=data)
|
try:
|
||||||
print(response.text)
|
response = requests.post('http://localhost:8000/o/token/', headers=headers, data=data)
|
||||||
return Response(response.json())
|
return Response(response.json())
|
||||||
|
except:
|
||||||
|
print("ERROR")
|
||||||
Loading…
x
Reference in New Issue
Block a user