sunscrapers / djoser

REST implementation of Django authentication system.
MIT License
2.52k stars 460 forks source link

DJOSER settings dictionary #406

Open mmichealjroberts opened 5 years ago

mmichealjroberts commented 5 years ago

I believe the docs to be outdated:

https://djoser.readthedocs.io/en/latest/settings.html

DJOSER = {
    'PASSWORD_RESET_CONFIRM_URL': '#/password/reset/confirm/{uid}/{token}',
    'ACTIVATION_URL': '#/activate/{uid}/{token}',
    'SEND_ACTIVATION_EMAIL': True,
    'SERIALIZERS': {},
}

Unless what I am using is invalid (I'm using string formatting).

DJOSER = {
    'PASSWORD_RESET_CONFIRM_URL':   '{}/password/reset/confirm/{}/{}'.format(VUE_ROOT_DOMAIN, '{uid}', '{token}'),
}

I receive the following error:

AttributeError at /auth/v1/hug/password/reset/ 'Settings' object has no attribute 'PASSWORD_RESET_CONFIRM_URL':

Screenshot 2019-07-17 at 10 03 25
dekoza commented 5 years ago

Please post the full Trackback - click the "switch to copy-and-paste version" and use the result.

dekoza commented 5 years ago

:thinking: I once answered similar question on StackOverflow. Plus, try using djoser-2 which is cleaned up - maybe this bug is already solved there. If not, please do provide the traceback.