favicon added and ruff formatted
This commit is contained in:
@@ -132,4 +132,3 @@ STATIC_ROOT = BASE_DIR / 'staticfiles'
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
|
||||
@@ -8,4 +8,3 @@ urlpatterns = [
|
||||
path('robots.txt/', robots),
|
||||
path('doxme/', Doxme.as_view()),
|
||||
]
|
||||
|
||||
|
||||
+4
-3
@@ -35,12 +35,13 @@ class Doxme(APIView):
|
||||
ipinfo_url = f'http://api.ipinfo.io/lite/{client_ip}?token={ipinfo_token}'
|
||||
ip_info = requests.get(ipinfo_url)
|
||||
|
||||
|
||||
ipis_token = os.getenv('IPIS_TOKEN')
|
||||
ipis_url = f'https://api.ipapi.is?q={client_ip}&key={ipis_token}'
|
||||
ipis_info = requests.get(ipis_url)
|
||||
|
||||
if ip_info.ok or ipis_info.ok:
|
||||
print('ipinfo:',ip_info)
|
||||
return Response({'method': 'get', 'ip_info': ip_info.json(),'ipis':ipis_info.json()}, status=status.HTTP_200_OK)
|
||||
print('ipinfo:', ip_info)
|
||||
return Response(
|
||||
{'method': 'get', 'ip_info': ip_info.json(), 'ipis': ipis_info.json()}, status=status.HTTP_200_OK
|
||||
)
|
||||
return Response({'message': 'error at ipinfo'}, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 185 KiB |
@@ -3,6 +3,7 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<link rel="icon" type="image/x-icon" href="{% static 'favicon.ico' %}" />
|
||||
<link rel="stylesheet" href="{% static 'styles.css' %}" />
|
||||
<title>Who are you?</title>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user