Hey All,
My webapp uses a third party ip locator API that needs the user's IP address to extract the city of the user. The API is embedded in my views.py file. When im running the django project on localhost, its showing my IP and city just fine, the way it should. However, when i running the project on pythonAnywhere( as a paying user ) im being allocated an IP from Ashburn, USA. That is incorrect as i am not logging in from Ashburn. User's city plays a major role in my code therefore with the wrong city, it just breaks everything. I have tried with different API providers but i get the same city when hitting them through pythonAnywhere, Ashburn.
Any solution would be really appreciated since this will be my first webapp. thank you!