-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DRF Tracking fails on Azure #12
Comments
@drdreff : can you try amending: rest_framework_tracking/base_mixins.py
to:
The .split(":")[0] should help to remove the port from the ip address if it exists. |
I applied this fix to a private branch and it works! I'll run with my fork until you're done and ready to release a full version. |
I've added this change and deployed new version 1.7.0 to pypi. |
I followed these instructions to create a django project on Azure:
https://docs.microsoft.com/en-us/azure/app-service/containers/tutorial-python-postgresql-app
My requirements.txt:
snippet from views.py for how I load and all the logging:
Everything works great locally, but on Azure, nothing is ever written to the log. The reason is hiding in this error:
The core of the problem is this psycopg2 exception:
psycopg2.errors.InvalidTextRepresentation: invalid input syntax for type inet: "24.23.134.119:43398"
which seems to be complaining about the port number that is being attached to the IP address via the middleware they're using to serve static pages.
Possible similar errors I have found googling this problem refer to nginx configuration.
Issue moved from aschn/drf-tracking#150 with additional details added.
The text was updated successfully, but these errors were encountered: