I am working on a web application that provides a "qibla en ligne" feature, allowing users to find the direction of the Qibla based on their location. I've deployed the application on PythonAnywhere, but I'm encountering issues with the Qibla direction not displaying correctly.
Here are the specifics of the problem:
Functionality Issue: The Qibla direction calculation seems to be correct when running locally but shows discrepancies on the PythonAnywhere server. I'm using the qibla library to calculate the direction based on latitude and longitude.
Deployment Details: The application is a Django project with a PostgreSQL database. I've ensured that the correct environment variables are set on PythonAnywhere.
Error Messages: No specific error messages are being logged, but the Qibla direction displayed is consistently incorrect.
Code Snippet: Below is a simplified version of the code used to calculate the Qibla direction: from qibla import Qibla
def get_qibla_direction(latitude, longitude): qibla = Qibla() return qibla.calculate(latitude, longitude) Configuration Check: I've checked the configuration settings related to timezone and location data on PythonAnywhere and they seem to be set correctly.
Could anyone provide guidance on why the Qibla direction might be displaying incorrectly when deployed on PythonAnywhere? Are there specific configurations or considerations for deploying such applications on PythonAnywhere that could be affecting the Qibla direction calculation?
Any help or suggestions would be greatly appreciated!