See you all ! I am running a Linux LMDE5 on py where I have created a Django API endpoint to retrieve data from sqlite3 database. I cannot access the API endpoint from another network machine. I can retrieve the data locally but not from another machine. The query application address also works (windows) if they are on the same machine
In the settings.py file I have made the following settings
ALLOWED_HOSTS = ["192.168.4.0/24","127.0.0.1","127.0.0.1:8000"]
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'corsheaders',
]
CORS_ORIGIN_ALLOW_ALL = True
Can you help me why it is not working ?
#Linux LMDE5 API
3 messages · Page 1 of 1 (latest)
I think I'm probably missing some context here, but the first thing I'd ask is whether or not the server is listening on 0.0.0.0 or 127.0.0.1
I think it works because I can access the database interface by entering 127.0.0.1:8000/admin. So I think the API works locally