mirror of
https://github.com/AmanTahiliani/PeerNotes.git
synced 2026-08-07 11:55:12 -04:00
Fixed flask cors and added linting
This commit is contained in:
@@ -68,7 +68,7 @@ class PollOnlineView(APIView):
|
||||
user = request.user
|
||||
try:
|
||||
data = request.data
|
||||
ip_address = data['ip']
|
||||
ip_address = data["ip"]
|
||||
print("Local IP found in request")
|
||||
except Exception as e:
|
||||
ip_address = get_client_ip(request)
|
||||
|
||||
@@ -15,7 +15,7 @@ def update_user_ip(request):
|
||||
user = request.user
|
||||
try:
|
||||
data = request.data
|
||||
ip_address = data['ip']
|
||||
ip_address = data["ip"]
|
||||
print("Local IP found in request")
|
||||
except Exception as e:
|
||||
ip_address = get_client_ip(request)
|
||||
|
||||
@@ -29,7 +29,6 @@ ALLOWED_HOSTS = ["*"]
|
||||
# ALLOWED_HOSTS = []
|
||||
|
||||
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
|
||||
@@ -19,3 +19,5 @@ tomli==2.0.1
|
||||
typing_extensions==4.10.0
|
||||
Werkzeug==3.0.1
|
||||
zipp==3.17.0
|
||||
flask
|
||||
flask-cors
|
||||
Reference in New Issue
Block a user