4

I have a VueJS/Django rest framework application and working on the confirmation email when a user signup.

My frontend is on another URL than my backend so I try to configure djoser to put the activation link with the good domain.

I finally managed to do it kind of adding DOMAIN and SITE_NAME informations but the result is not as expected because my domain name is surrounded by brackets.

In my settings Django I have:

DOMAIN = 'localhost:8080',
SITE_NAME = 'Frontend',
DJOSER = {
    'PASSWORD_RESET_CONFIRM_URL': '#/password/reset/confirm/{uid}/{token}',
    'USERNAME_RESET_CONFIRM_URL': '#/username/reset/confirm/{uid}/{token}',
    'ACTIVATION_URL': 'activate/{uid}/{token}',
    'SEND_ACTIVATION_EMAIL': True,
    'SERIALIZERS': {},
}

But the result in the email is:

You're receiving this email because you need to finish activation process on ('Frontend',).

Please go to the following page to activate account:

http://('localhost:8080',)/activate/MzE/an7e2w-73af66245317921904307cc266f4983e

Thanks for using our site!

The ('Frontend',) team

Does anyone have an idea why these brackets pop here?

Tartempion34
  • 492
  • 6
  • 23

1 Answers1

8

Instead of:

DOMAIN = 'localhost:8080',

SITE_NAME = 'Frontend',

try without comma.

DOMAIN = 'localhost:8080'
SITE_NAME = 'Frontend'

A comma form a tuple.

Aprimus
  • 1,463
  • 1
  • 14
  • 12