This repository has been archived by the owner on Mar 3, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable url validation in client creation
In networks created by docker, the internal url for containers is often of the form "http://myservice". For instance, the "notes" service might reside at url "http://notes:8000". However, the client creation command did not recognize "http://notes:8000" as a valid url. To reproduce, run: from django.core.validators import URLValidator URLValidator()('http://notes:8000') This piece of code raises a django.core.exceptions.ValidationError. As a consequence, the following command fails: ./manage.py lms create_oauth2_client "http://notes:8000" ... An alternative was to use the external service url as the oauth2 client url, but this is failing on local instances, as the domain name might not be valid. Another alternative was to add aliases for the service names, but that made us jump through too many hoops, in particular for Kubernetes deployment. I'm not sure whether this is an upstream Django issue caused by incorrect URLValidator implementation. Most recent version (v2.2) still raises validation error. It's definitely more simple to solve this in the present repo.
- Loading branch information