Example of a simple client for the Profiles API using jQuery.
Before this will work with the profiles api project, the following changes must be made:
- Install
django-cors-headerswith pip. - Add
corsheaderstoINSTALLED_APPSin settings.py. - Add
'corsheaders.middleware.CorsMiddleware',abovedjango.middleware.common.CommonMiddlewareinMIDDLEWAREof settings.py - Add
CORS_ORIGIN_ALLOW_ALL = Trueto the bottom of settings.py.
Once that is done, restart the API and simply open the registration.html file.