LeoneBacciu / django-email-verification

A Django app that takes care of verifying a users's email address and activating their profile.
MIT License
353 stars 57 forks source link

Error: No URL to redirect to #51

Closed smjt2000 closed 2 years ago

smjt2000 commented 3 years ago

I do everything in pypi page but I got this error when send the signup form:

ImproperlyConfigured at /account/register/ No URL to redirect to. Either provide a url or define a get_absolute_url method on the Model.

I use CreateView but you use FormView it is my code:


class Register(CreateView):
    form_class = SignupForm
    template_name = "registration/register.html"

    def form_valid(self, form):
        if form.is_valid():
            user = form.save(commit=False)
            user.is_active = False
            user.is_seller = False
            user.save()
            returnVal = super(Register, self).form_valid(form)
            send_email(user)
            return returnVal```